Monday, October 5, 2015

In Defense of The System

Roman Republic and Empire was a land of political upstarts. From Gaius Marius to Augustus himself to Diocletian, these men was born into merely middle class family or worse, but rose to eminence. In fact, the Roman had a name, novus homo, for those upstart. After the collapse of the empire, suddenly political upstarts ran away from Europe. Most glaringly, Byzantine empire, as byzantine as it was, continued to host self-made emperor: origin of Heraclius the Elder was so obscure that we continued to puzzle his birth place, yet his son claimed the purple. Meanwhile, Europe must wait for more than a millennium for an upstart to appear, in the person of Napoleon Bornaparte.

Here is the question: why did just about any political player in Medieval Europe need a lineage, while Byzantine emperors apparently did not? We like to think of competition as the gears of meritocracy. If competition is so great, then Western Europe, split into so many states and estates, should have produced tons of political upstarts, while Byzantine empire, with its intricate court and procedure and massive capital, should have frozen its imperial rank. Yet, the reverse happened. And when did upstarts start to appear again? Ah, after France squashed any kind of competition with its central power.

Modern Americans love the idea of chaos and individualism. Meanwhile, they despite the system and bureaucracy. To them, the system virtually always stands in the way. Except when it helps, of course, and they will belittle its power and assert their self-made-ness. As an extension of this, they hate government, bosses, support personnel (who work for the other side; their support personnel is useless without their genius), any team with more than maybe 5 members.

Nowhere is this more prevalent than software engineering. Frankly, I am sick of this question: "assume that you and the smartest guys are in the comfort of your own home, undisturbed by all of those, how long would it take to do foo?" The assumption? Well, bosses and earnings and teammates and geography and finance can only stand in the way. In fact, business dress of any manner generally stands in the way (SHORTS AND TSHIRTS FOR THE WIN). Only "the smart guys" matter.

But, let's be frank, smart guys are (as a rule of thumb) everywhere. Yet they succeeded in highly complicated society of Byzantine, yet failed in the supposedly free (at least freer than Byzantine) societies of Western Europe. Why? Wait, when one thinks really hard, Islam, for most of its history, supported excellence social mobility. Its founder, Prophet Mohamed Himself, started his life as a slave, and Islam spent most of its infancy fighting against richer, more established opponents. And let's not talk about China (the damned culture has almost half of its major dynasties founded by commoners and, gasp, barbarians).

Thus, the question reigns: why can't structure-free societies of Western Europe support "smart guys"? Why did they need to move to Byzantine empire and Muslim empire and China to start their dynasties? Reversely, why did they (and by "they," I meant "the Bornapartes") move back to France right after French royal unified and complicated their own court?

Here is my answer: because Byzantine and Islam and China and modern France have the system, the bureaucracy, and complications that allow smart guys to excel. I don't know if anyone notices, but most of great feats are very hard. They can't be accomplished by a few guys in a garage. Now, I don't mean to belittle a few guys in a garage: they do accomplish certain classes of things. However, building empires, turning business around, or merely crafting a feature-rich-plus-intuitive-plus-pretty-looking software for wildly different classes of customers are not among the things that a couple of guys in a garage can do.

To follow the grand tradition of root cause analysis: why can't a couple of guys in a garage build an empire? Or, less ambitiously (and more in topic), a feature-rich-plus-intuitive-plus-pretty-looking software for wildly different classes of customers? Let's tackle the empire. It's simpler. To build an empire, one needs to be trusted (surprised! Most citizens must tolerant a certain man for such man to be despot). By having a system and bureaucracy and shared culture norms in place, it's easy for one to earn trust, find accomplish (I meant, comrades), build teams, and do amazing feat. After all, those systems and bureaucracy take centuries to perfect, and culture norms take generations to root. Thus, it's easier to found a new dynasty in a well-organized (albeit complicated) society.

How about the aforementioned software? I mean, is the description of the software not enough to explain? A couple of guys in a garage setting excel at sharp focus. Without distraction (aka "support") from everyone, they are free to zero into whatever they deem important. This can produce amazing technical solutions. See the emphasize? Yeah. Technical problems can be solved with focus. However, a successful software is not merely technically superior (QWERTY keyboard debate, start!). It must also excel socially, commercially, and financially. It must woo new users with minimal initial interest. It must keep expert who controls public opinion. These requires way way more than mere technicality. Take, says, Emacs. In my opinion, its technicality is impeccably elegant: instead of trying to solve all problems with text editing, it provides a platform on which different groups can tackle different problems separately. Very smart, very elegant. Fucking hard to learn. Because the solution is so abstract (all good technical solutions are, at least for software), application demands a level of expertise that 99% of users can't supply. Guess what, Emacs is forever cursed as a niche product. An excellent product, but niche nevertheless.

Thus, we need systems. We need business people to pump the money, legal people to ensure our safety, customer service to hear from users, fulfillment center to deliver the goods, and a bunch of bosses to keep of of those out of our hair. Coding is hard. If I need to code while worrying about money and laws and customers' complain and whatnots, sorry, my brain has limits. Everyone's brain has limits. At least those limits are greater than the physical limits, which are extremely limited. Last time I check, I can't talk to customers while looking for laws to screw, I mean to help, them.

And, here comes the bureaucracy. And bosses. And lawyers. And consultants (now, I am about 90% those are truly useless).

Here is my humble opinion: complication don't necessarily make something bad. The world is wonderfully complicated: human species have studied it for way too many years to discover way too little. Yet, the world is not bad. It's wonderful, supportive to all (most of the time anyway). Similarly, bureaucracy and system and bosses ain't inherently bad and counter-productive. Occasionally they are. However, most of the time, they exist for a reason.

An engineer then has 2 choices: either fight them or use them. Which one are you using?

Sunday, June 28, 2015

Why I Dislike Libertarianism

I am a young and college-educated professional. Thus, my expected political orientation gears toward libertarianism. You know, earning good money pushes one toward the right, as taxes loom greater of a concern than, says, the amount of welfare I collect. On the other hand, youth and college education ween me off any love of medieval beliefs, such as anti-abortion, homophobia, etc. Therefore, libertarianism presents an excellent compromise: lower taxes, yet still free to explore whatever philosophy and lifestyle strike my fancy. As a matter of fact, many of my friends tend toward this school of thoughts. And too many programmers (my kin, obviously) only proclaim their fondness for this political school.
However, I myself never like libertarianism. For one, I don’t like the rolling of the tongue to get the whole word out. For my accent, I must push out like 7 syllables to pronouce it. For such a youthful wing, their failure to a better name is quite remarkable! I mean, did they not learn anything from Ayn Rand? For a philosophy from a third-rate philosopher that is anything but objective, Objectivism sounds so good that one can’t help but like it. The name plays a huge marketing role, guys, so shape it up!
Anyhow, if you have not realized that I am kidding, I am kidding. I dislike long words, but the name alone does not arouse such suspicion. I mean, I like a lot of Eastern schools of thought whose names are just ridiculous. So, bad name is a joke.
In fact, for a long time, I am not sure why I don’t like libertarianism. I used to attribute such dislike to my general principle of disliking most right-wing stuff. But every time I look at libertarianism, a huge suspicion just pops up and haunts my mind. It feels very similar to a quest to avoid sweet and embrace broccoli: you know what you are supposed to like, you motivate yourself to like what you are supposed to, all the way until some invisible force (aka the sweet tooth) breaks down your will power and jumps at the dear dear dessert. Libertarianism is the opposite of dessert to me. I even bought books on the matter, and forced myself to read it. I gave up after about 3 chapters. Just can’t do it. Given that I can crank through 800 pages on Civil War, will power alone (or there lack of) can’t explain it. Must be something else.
I searched for that “something” for a long time. After all, I pride myself as an open-minded person. I always try on the other pair of shoes. I always believe that all ideas embraced by sufficient number of people are entitled to some degree of consideration. Thus, I continuously speculated on why I can’t stand libertarianism.
And one day, it hit me. By “it,” I meant, “why I hate libertarianism.” Not libertarianism. No, I still hate that school of thought. But, at least, I know why I hate it. There are actually 2 reasons, and both of which run against my core beliefs. No wonder I can’t stand the thing. And here they are.
First, libertarianism (and, to some degrees, the whole conservatism movement) divides the world into 2 camps: the good and the bad. The good is always good, and the bad always bad; there is no mixed, no gray area. An idea is either bad, and must be destroyed; or, it is good, and must be worshiped. There is no middle ground.
According to libertarianism, the government is bad. It’s just bad. Why is it bad? It’s political, which, to many people, is synonym for “dirty” and “tyranny” and “oppressive.” It’s artificial, which is synonym for “plastic” and “poisonous” and “unnatural.” In conclusion, it’s bad. And because the government is bad, all of its creations are bad. Paper money is bad. Infrastructure is bad. Taxes are especially bad. Welfare is extremely bad.
Reversely, the market is good. By the way, the image of the market conjured up by libertarianism is especially lovely. One can imagine a civilized bazaar, where all the sellers are honest and all the buyers are all-knowing. Oh, and the market is supremely natural, and has been around since forever. Similar to above, because the market is good, all of its creations are, by default, good. In fact, they would argue, with a straight face, that monopoly is way better than regulation.
Here lies the central difference between libertarianism and classical conservatism: Conservatives are, I think, quite romantic. They define God and Demon, but they also want heroes and myths. So, despite their hatred of Lucifer, I meant the government, they love the army, the police, and the church; they long for a good old day when love, traditions, and justice prevail. This romanticism, unfortunately, gets in the way of their otherwise black-and-white vision. Libertarians, meanwhile, hold no such follies. Army? Heroism? Traditions? All begone! One thing matters above all else: the classification of Good and Bad. And, sorry Pentagon, you are on the wrong side of the grand design of the universe. So bye bye.
Oh, and another difference between libertarianism and conservatism, the difference that renders the former utterly unbearable to me, while the latter merely distasteful. Conservatism is at least practical. After all, longing the past requires some sort of practicality. Otherwise, such past can’t exist. Libertarianism requires no such sentiment. Its greatest sentiment is the purity of its grand order of the universe. Again, in such universe, the government is bad, and the market is good.
This makes quite some comical expression of the world. I mean, Conservatism has some quite funny ideas (cutting taxes always raises the revenue, anyone?), but I can at least glimpse how their minds work. Libertarian expression of the world, on the other hand, is just purely comical to me. For example, they would say something like, politics is bad: it encourage people to cheat and step on each other. This, of course, I agree with. Then, they make a great jump: market, on the other hand, is good, because people will somehow turn 180 degrees and always compete fair and square. This is where I choke. Huh? So, the cheating, cruel bastards in the political world will just compete with only in quality and prices in the market. This brings to mind the collapse of 2008, the collapse of Enron, and about half a dozen other crises and crashes without me even trying.
Plus, the divorce with observation and careful study of the world (such time consuming process can be replaced with ideology, can it not?) leads to some very funny interpretations of history and predictions of the future. For example, they will reach back in some obscure merchant laws during medieval time to prove how natural and self-relient the market has been, and claim that the market will sustain the world if we just destroy the government. Well, then why did the medieval governments appear in the first place? (Need I remind everyone how oppressive these were compared to our gentle governments?) I mean, our species started out as small bands, without any government of any sort, like a bunch of monkeys. How did something so artificial as a government appear, if the market is so omnipotent and natural? By the way, this was not meant to be a rhetoric device. I seriously wonder how a libertarian explains that.
Enough with the design of the universe. There is another big reason why I hate libertarianism. It’s how irresponsible they are.
Should a libertarian group of people read that, they would jump up in protest. No, they ain’t irresponsible. Those liberals who can’t think for themselves are the irresponsible ones. They, on the other hand, never ask for anything from the government, and thus can’t be irresponsible.
It’s frankly hard to argue against such beautifully constructed argument. It is why Conservatism can claim responsibility for so long. When one pays the bills without external support, one is responsible, right? Well, kinda.
See, there are 2 types of costs: private and public. Private costs are the bills one pays. They are the prices of most goods and services that one consumes. They are not the only costs. There are public costs. For example, let’s say that you use a car. The private cost consists of the cost of maintenance and gasoline. However, there is another set of costs: the cost of pollution, the cost of building and maintaining the roads, social impacts (eg. noises and smoke) to the surrounding communities, etc. These are public costs.
The responsibility of Conservatism generally does not include public costs. That said, as mentioned above, conservatives are a romantic bunch, and they generally accept a subset of their public costs, especially those affecting their communities and legacies. Again, Libertarianism entertains no such romanticism. Like a true corporate, they deny any liability that they have the lightest chance of winning. And remember, in their fantasy of the marketplace, it will always drive the prices down to the lowest possible point. As such, they seek to always minimize their share of costs. If a firm destroy the world to make a cheap toys, well, that’s capitalism at work.
In fact, it is amazing how disconnected their complaints and solutions are. For example, they would moan loudly about the size of public debt. Yet, they would not pay a cent to it, if not forced to by laws. And in fact, they would fight tooth and nail to reduce the amount they have to pay. Never mind the debt will naturally grow (interest rate, anyone?); never mind that the roads and infrastructure they use require maintenance. If they don’t own something, it’s not their responsibility. So laughable.
In conclusion, my dislike of libertarianism turns out to be quite rational! After all, who want to live with holier-than-thou narcissist who refuse his portion of the public costs? Phew, they make me doubt my own rationality for quite a while (a few years!), which is quite a feat. Anyhow, now you know why Libertarianism is poisonous. It’s a set of fantasy that is proven by bad math and supported by pure narcissism (at this point, selfish is such a overly used word that it lost its bite). Let’s move away from it.

Sunday, April 19, 2015

Please, for the love of all that is good, stop bashing "the Government"

You know, it is extremely hard to read from one's opponents. It's not that their ideas are so outrageous that you want to crush them under your thumbs like a bug. No, not really. Frankly, during my many many day dreams on many many issues, I have pull together strange ideas. Obviously, once I wake up and re-calibrate my reasoning system, those strange ideas fizzle out like fire under a Reno rain (in case you don't know, Reno does not have light rain; it either sparkles under the sun or storms like there is no tomorrow).

No, reading from your opponent is hard because they have strange assumptions that you just can't understand. Let's be frank here: most people have roughly the same goals (you know, get rich, be happy, make the world more just, etc.) and use roughly the same set of logical reasoning tools. Yes, most people, from far left to far right, do share the goals and the logics. They disagree because they have different starting points, or assumptions. It's like this: two people want dinner outside; they have the same goals (food!) and they drive roughly similar vehicles (cars, let's say, or scooters, or whatever); however, if one person is in New York, and another is in China, you can be pretty sure that they will eat a different places. Same goals, same tools, different assumptions will lead to very different places.

One of the biggest difference between myself (I prefer not to talk about others) and the rough collection of "conservatives" and "libertarians" crowd is this: in my mind, the government and the state are just things; you know, like guns don't kill people, people kill people; in their minds, the government (wait, it's usually like this: THE GOVERNMENT) is Satan, the source of all evils that roam the surface of the earth. I remember Mr. Obama once joked that Republican part seem to have one cure for all woes: more tax cuts. It's funny, and it actually illustrates this difference very well. From my point of view, the government is a thing, dangerous and extensive, but a thing nevertheless; from their point of view, the government is Evil and needs to be purged before anything good can happen.

What is the government? Let's start at the basics. What is, exactly the government. For that matter, what is a state? What does it do? What can it do? Why does it exist? How did it become what it is today?

Let's remind ourselves of this: all humans once lived in small bands. This is undisputed truths. From science to religion, humans started at small bands. So, back in the days, there was no extensive government, no states, no nations, nothing. Back in the days, all humans lived in egalitarian societies where no one ruled anyone else. Eden, a Christian might call it. Equality and freedom reigned supreme.

The question becomes: why would anyone, for the love of freedom and liberty and all of that romantic concepts, abandon Eden and build States? And keep this in mind, the earlier a state, the more brutal it seem to be. This question should especially trouble libertarians. After all, religious Conservatives can answer this simply: God kicked us out, so bye bye Eden. But if you disavow God, you have to find an answer to that dilemma. Why did those bastards build governments that rule us until this day, wreak us countless miseries and pain, spill so much of our blood and rob so much of our money? Why, stupid ancestors, why?

Before we continue: dear ancestor, the words above are purely rhetoric; please pardon my disrespect.

A government, simply put, is the governing body of a society. Usually, people would say things like "it makes laws, builds public works, etc." However, this actually belies an important fact. A government is a mechanism, a institution, an organization. "It" does not do anything. "It" simply obeys whatever its owners want. The government does not make laws. The people make laws through the their representatives in Congress. The government does not print money. The people authorize the money printing through selection of specialists in Federal Reserve system. The government does not make war. The people make wars through their elected officials in two branches of the government. The government is a set of institutions, laws, bureaucracies, regulations, etc. that the owners of a society use to make mutual decisions.

Thus, saying "the government robs your money" is like saying "the safe hoards money." Yes, the safe takes money out of your pocket; yes, the safe prevents you from spending that money. However, the safe does not exactly, you know, spend the money on itself or anything. Last time I checked, the safe still can't go out and buy a luxurious car or go to the bar and woo the girls. And when it can, I am pretty sure the discussion will be very different. Similarly, the government can't exactly use your money to enrich itself. I mean, the poor White House is just a fancy house. It just stands there. Now, the President, the senators, the representatives, etc. can and do use your money to enrich themselves. However, that means they are bad politicians. The government itself, as an institution, can't do that!

Talking about bad politicians: I always feel that Conservatives and Libertarians speak of "the government" and "Washington (D.C., not the state)" a bit strange. Strangest ones? The very politicians who run for office as "outsiders" and put in very bad words about "Washington." I mean, when Ron Paul or whoever (I just pick Ron Paul since I am working very very hard on a book from Libertarianism) claims that, says, "Washington" is this or that, I lost all respect for that person. When you have been in an institution for years, if not decades, when you have been the most esteemed member of that institution, you don't have a right to bash it. If it is corrupted, it is your responsibility. Claiming that you are "maverick" is a sick joke. Who is "Washington"? Why, Ron Paul is. You know, at my workplace, if you have been there for 6 months, people regard you as an old hand. You can no longer say shit like "their way is stupid." It's your way now, so fix it or shut up. Similarly, Ron Paul, Rand Paul, and the whole set of junkies should really be ashame of themselves. I have yet to hear anyone taking responsibility. They all sing the same song: "Washington" is corrupted, elect me to fix it; oh, btw, the fact that I have been there does not count. What?

Same thing, but to a lesser extend, can be said of most Conservatives who complains about "Washington." Let's face it, "Washington" is not an external monster spawned by Satan to rule you. It consist of people who you yourself, along with your fellow citizens, voted in less than 4 years ago (sometimes less than 2 years). I firmly believe that voting is not complaining; it's institution building and decision making. During an election, everyone has the responsibility and right to teach and to communicate with everyone else about the decisions and representation for the next few years. "The government of the people, by the people, for the people" cannot, by itself, corrupt. If it is corrupted, the reason lies in the very citizens who elect the corrupting elements into it.

Enough of ranting. One more important point I want to raise: many of our social goals are, by definition, governmental action. For example, what does "establish Justice" mean? It means fair laws and impartial enforcement. Both making laws and enforcing them lie in the responsibilities of the government. Thus, to establish Justice, We the People have to do it through the government (mostly through election of worthy people to draft laws, discussion and feedback about current laws, as well as vigilant monitoring of the enforcers). Similarly, "provide common defense" generally involves the government, through either militia (feudal modal, or early American model) or professional armies. Both options require central command and coordination, and this command and coordination must obey civil authority. Beside the government, few other options can satisfy this difficult position: very powerful (the army is the most violent aspect of any society) yet cannot be supreme (or dictators will prevail).

Lastly, let's never forget about what the government has allowed us to achieve over the centuries. I mean, I don't want to strip off the credit of any other mechanisms. For example, yes, markets did provide us with abundance in material goods. However, let's not kid ourselves. Even with all of the productivity gains over the centuries, we still have child labor wherever laws either allow or are not properly enforced. Laws and its impartial enforcement end child labor, along with hosts of other issues. In fact, laws allow the market to thrive. Think about it: how natural is "corporations as humans"? Or how natural is "limited liability"? An eye for an eye, blood must be paid with blood. Such were the ancient ethos. It sounds quite fair, but high risk prevents effective investment. Corporations limits both, and the market thrives. Without governmental involvement, how can such unnatural (and frankly, sometimes, unfair) thing exist, let alone thrive? Thus, the government is not pure evil: it can do good; its citizens just need to be vigilant.

Let's end this long ramble with the answer to the question posed above. Why did humans move away from Eden? Jared Diamonds (one of my favorite author) attempted in answer. He observed that efficient societies, much like well-fit species, survived and conquered inefficient ones. This makes quite a bit of sense. In such cases, one can venture this observation: a state is more efficient than egalitarian bands. But how can this be? I mean, if you believe whatever spilling of modern Libertarianism, you would conclude that early humans would simply form markets, become super productive, and never bother to form states and governments. But history proved otherwise. Humans abandoned Eden for states and governments. Why? Because they can be useful. If only their owners know how to use them.

Thus, please, for the love of all that is good, stop blaming the government. It's innocent. Blame the irresponsible politicians, the opportunist law-makers, and the half-asleep voters. In other words, let's take responsibility and blame ourselves for our messes. And let's fix them. Not blaming the evils.

Saturday, April 18, 2015

Python is a horrible horrible teaching programming language

I have never particularly liked Python. I mean, as a programmer, I consider any coercion into a particular way of doing thing an insult. Thus, the whole there-is-only-one-way-to-do it and benevolent-dictator affairs have never rhyme with my personal philosophy. But I always restrained from criticizing Python. After all, I have never used Python extensively, and my contact with it has never resulted in enough pain for me to hate it.

Well, life changed. I was forced into Python by a class. An algorithm class no less. I love algorithm and theories. Everything there is shiny and flawless, with no wiggle rooms for bugs and the likes. Plus, programming in these situation excites: the problem is well-defined, the graders favor style over pesky optimization, and the solution is polished. This is the exact reverse of profession work, where the result (not the code, but its effect) is everything, and pretty code costs night and weekend (plus lots and lots of fighting).

When I first realized that my class requires Python, excitement actually prevailed briefly. After all, if you ever search for something like "python teaching language," you would see people say all of those glorious things about how python is absolutely beautiful for teaching. I have never liked Python's tyrannical philosophy. However, well, this is a golden chance to learn Python right on its own turf. Maybe I would like it. Maybe my opinion would match that of my friend (apparently Python grew on him after a while). Maybe.

Well, Python crushed my hope with its stupidity (seriously, I have no other names for this), bad design, and generally annoyance to use.

Firstly, let me be very frank: I miss type declaration. I miss it. I mean, production code can sustain lack of type declaration much better than academic code. Why? Because you have tests and documentations and an expectation of proficiency in the language to fill in the blank. Academic code delivers on idea, not execution. So, it should be readable without compiler, without running, without tests, and with minimal documentation. For goodness' sake, the code itself is the documentation of the text (have you read computer science paper? The code explains the English). However, without type declaration, it's impossible to figure out how to use a value without context. Each solution skeleton in my class has 10 lines of comments to to explain the expected type and usage of the input and output. Like 100+ characters which can be easily written in 10 characters in Java or C#. Seriously.

Another thing on type declaration: people keep whining about how much characters they waste. Well, let's ignore my comment on the necessary comments for dynamically typed inputs and outputs, and assume for a moment that you can read the mind of the coder to know how those things should be used. Will dynamic typing save a lot of waste in that case? The answer is no. Remember, we are talking about academic, teaching situation here. The most important virtue here is readability, not efficiency. This generally leads to quite small functions with very few extra variables declaration aside from input of functions, and most of these extra variables are counters (you know, i, j, k, etc.). In most cases, the variables are values passed between functions. You will have to declare them as arguments anyway. Furthermore, because those variables are interfaces between functions, one often wants to document how they should behave, aka write out the types. Thus, the saving here is minimal, if at all. And the readability of dynamic types goes down the drain thanks to the comments.

Talking about variable declaration, since when is declared-when-first-used easy to read? Again, this may be so in production code, where everyone deals with the same set of code days over days. In academic settings, this is bullshit. To determine what the variable should be, one has to look for its first use, usually in the thick of processing. I remember how Pascal was adamant about all variables declared right at the beginning. The requirement stands for a reason: you know, loud and clear, what each variables should behave. No need to read through the code, no need to guess and assume. This helps readability of massive amount of code at once without warming up time. This helps academic code.

Well, let's get over the stupidity of variables and their types. Let's talk about Python inability as a programming language. See, my instructors seem to like something call Numpy a lot. I get it, it's for numerical computation. However, numpy imposes a different set of containers, with vaguely similar syntax but mutually incompatible with Python built-in containers. What does this mean? Either one of two things must be true: Python does not provide a set of interfaces (think List in Java and C#) that is general enough to do things with, or Numpy people are fundamentally stupid and lazy. I pick the first reason. I trust the people. I distrust dictators. This is kinda like Go and APL (never used, only passing insult here; maybe incorrect). Basically, in those languages, all users are bastards who can't do things well. Thus, the only way to actually do anything beside the wills of the language creators is to write fundamentally separated interfaces that resemble the base language. Python is worse: because the variable are dynamically typed, you can't know for sure what the hell is in there. So, if you receive an array, be sure to check where it is from (no type, remember) before doing division and put some numbers in it. Put float in an int array, which is usually OK, may destroy your program.

Oh, this refers me to a third problem: the necessary to run the program to see obvious flaws. I frankly don't understand the whole cheering over runtime error rather than compilation error. It's beyond stupid. In fact, it is an insult to the learners, consider them incapable of reading code. Why? Compilation errors are obvious. Remember, if a computer can pick it up, a reasonably-trained human can. Runtime errors, on the other hands, are subtle and hard to pick out. For example, division of a number over a string can be either a compilation error (since variable must be typed) or run time error. The former case can be picked out easily by human (let's face it, human can read a string variable declaration); the latter cannot (um, what is that variable types again?). When everything is forced to be spelled out, everything is clear. Humans can read them, with or without computers. When everything is, "trust me, it's fine," well, sorry, I don't trust myself to not mistype things.

Btw, I should also point out that this is another difference between production and teaching code. In production, most of the time, you frankly don't know what is supposed to be the solution. At least I don't. So, the usual process involves trying things out, see what happens, then finally code up a final solution based on the evidence (this is especially true for more complicated bugs or novel situations). In class, the reverse is true. The learners start with a class of knowledge to try out, and the code's purpose is to express that knowledge in a more concrete terms. This is true for both theory and more practical classes. Again, each class would have a set of concepts, and the learners should solve the problems by these before coding. Thus, most issues with the code can be picked up by compilation, either by eyes or by machine. Lastly, since teaching code demonstrates a concepts, often it does not need to be run at all. The graders would just compile it in their head, goes through the logics, and give feedback. In such case, runtime errors are terrible. They hide hideous bugs while provide incentives to hack things together. Hacking is not the point of knowledge transfer. Hacking is for production.

Finally, let's talk about indentation. Another big selling points of Python: hear ya hear ya, your code's readability is enforced by your intepreter. Yeah. Let alone the fact that the interpreter fails to detect hosts of issues until runtime, let alone the fact  that input values' behaviors are undefined by default, let alone the fact that basic types may be unusable. Python will help your cosmetic to look good! Bow down to pretty code! This sickens me every time. I used to be TA for a Scheme-based class. Every time (and I meant every time), the love of the students to Scheme would jump about 5-fold after I taught them correct indentation, and they would do this without the compiler acting like Hitler. Every programmers with a few months of experience would indent reasonably well for most C-like programming language. Furthermore, given that teaching code is usually short and sweet, this whole concept of coercion of style is generally useless. On the other hand, I have yet to notice any standardization in naming (you know, internalCapitalization vs. underscores_for_spaces). Maybe I am too green, but it seems like people just do what the hell they like here. Again, teaching code is short and sweet, so this kind of styles matter a great deal. But of course, it's impossible to enforce (maybe Python should outlaw underscore in names, or outlaw mid-name capitalization).

Frankly, here is my impression of Python and its cheerleaders: Python is great for very very beginners whose only interest is to show off. It is very fast to punch in something resembling good code. It is very fast if you don't do anything major. It is very fast to get buggy code "running." However, as soon as you put any serious logics in, Python crumbles like worms under someone's shoes. Its code needs serious context (either comments or the usage site) to make sense; its abstraction layer is lacking; its compilation system cares more about cosmetic than sustain. Basically, everything is wrong. On top of that, it lacks any kind of mind-twisting advancements (I am thinking about Lisp and Rust) or pliability for hacking and playing (I am think about Perl, of course, but C is a good example). It's like a dumb dictator: insists on minor styles but lets bigger problems go unchecked. I sincerely hope I won't cross path with it again. Ever.

Sunday, January 25, 2015

The Wrong Public Discussion

Most public discussions (at least most public discussion that I heard or read) these days aim at completely and utterly wrong goal. They are generally organized into a competition of sort, with two sides attempting to establish who is "right." Both sides would present all kinds of arguments, from real to outright made-up, from statistics to religious texts, from rational to emotional, to convince the other and an audience that they are The Right Way. Strangely enough, although they always state their goals as convincing and changing minds, this kind of discussions rarely, if ever, convince anyone or change any mind. In fact, people (from the competitors to the audience) usually believe more strongly to pre-discussion beliefs after each discussion. Now, don't get me wrong, they entertain well. They resemble gladiator fight, except more cultured and less violent. However, fun usually hinders productivity. In this case, it just throws productivity out of the window. After all, how can you reach an agreement when each discussion drives the participants a little further? Thus, the democratic government becomes tyranny of the momentary majority, who tries to push as many of their policies out as possible while they retain majority. And the whole country suffers.

When you think about it, winning rarely matters in public discussion. After all, most, if not all, countries in existence have done just about wrong things in the books. Does a country kill? When outsiders threaten the lives and dignity of her citizens, when the future of her children is at risk, a country would kill. Does a country discriminate? Citizens risking lives and limbs are treated differently, and justly so, from criminals. However, the differences between defensive and offensive wars, as well as between wars and concentration camps, as well as between medals to veterans and racism, are vast. A country killing its enemies is different from one sending minority to concentration camps; a country decorating its heroes is different from one denouncing a whole race to servitude.

Thus, for public matters, the question is not what. A country, and its government, should, and would, do anything for its citizens. The question is how and when. When a country goes to war determines its foreign policies. How a country discriminates between citizens speaks of its soul and values. All other matters are similar. A country will print money, in both deflation and hyper-inflation. A country will impose taxes and duty, in boom and in bust. A country will re-distribute wealth, upward or downward, fair or indiscriminately. Public discussions, likewise, should concern itself mostly with how and when. They should always aim at a well-rounded compromise with manageable risk.

Remember: compromise is not about lack of principles. After all, a person without principles does not need to compromise, for such person has nothing to compromise. No agreements go against his principles, because he has none. Compromise means recognition the lack of omnipotence: everyone makes mistakes, so let's manage the risk and ensure that all voices, all values contribute to the end result. Furthermore, when a person discusses with compromise in mind, her ego is not on the line, and she can decide without losing. When noone loses, everyone wins, and public discourse can proceed.

I sincerely hope that as 2016 looms, our discussion will gear away from "winning vs losing," and toward actions and results. After all, I gain nothing when my representatives win, but I will lose a lot when they spin the wheels. Let's get moving!

Sunday, December 21, 2014

The Unnecessary Inequality

As I work my way through The Second Machine Age by Erik Brynjolfsson and Andrew McAfee, a familiar argument came up: the widening inequality was a technological problem, not social or political. In other words, our digital technologies, which power the new, information-based economy, create the economic inequality. The fraud of Wall Street, the bad policies, etc. should not be blamed for such a macro problem. This argument is nothing new. I first encountered it with The Black Swan by Nassim Taleb, who argued forcefully that mega-rich people are black swan of our economies, and that the current world (post-industrial, information-based) makes it easier and easier for black swans (including mega rich people) to happen. What a beautiful argument! It resembles the original sin, religion-is-root-of-all-violence, 9/11, and various other "explanations" of inescapable problems. For one, they acknowledge that the problems (inequality, hell, the amount of bloodshed between 15th and 20th centuries, and bad economy). However, instead of finding a human cause to resolve, they blame an nonhuman force (technologies, our nature, the jerk-face bishops, the first attack on American soil in half a century). Thus, nobody is to blamed, so no fixes are needed. And all we can do is to workaround or pray for serenity.

Now, I don't have enough space to discuss the original sin or religion or 9/11 (wait, the last one is easy, but it's not the topic here). However, the link between technologies and inequality is, at best, a coincidence. In fact, this link reminds me of the story of the Russian Tsar and the doctors. The story goes like this: the Tsar noticed from the statistics that plagued areas had many doctors; to reduce the plague, thus, he ordered the execution of all doctors. Oh Tsar, how smart were you! Similarly, the rise of inequality, which is a very recent phenomenon (since late 1970s), coincides with the rise of computer and digital technologies. And no one should be blamed for the rise of inequality, right? So the technologies get the scapegoat role.

However, look at the general trend of history and technologies, and you quickly realize this does not make sense at all. After all, technologies exist to reduce labor and increase productivity. Thus, applying the argument of digital technologies, all technologies should have increased inequality. But history worked out the reverse. Each and every technology (for now, except digital ones) reduced inequality. Don't believe me? Look at history again for inequality, and compare each era against its predecessor. Let's do it here.

First, we may think of our time is so unequal. However, the difference between an average Joe, or even a relatively poor Joe, and Bill Gates pales against the difference between an average citizen and his or her king (or emperor) at the eve of World War I. Back then, most states lived under a monarch, whose wealth dwarfed the meager lots of the common people. However, this difference, again, paled against the "enlightened absolutism" of the earlier age. I mean, the name alone should tell you the difference in wealth, status, and rights. Moving further into the Medieval, and we started dealing with serfs and lords. The complaints of free citizens in 17th century must have sounded like spoiled brats to those poor land-bound souls of the earlier ages. Moving past Medieval into Classical time, and slavery came into focal point. Or, at the very least, look at the difference between a Pharaoh, who could build fabulous tombs filled with precious goods, and the poor souls labored to build those tombs. Moving out of historical time frame, and inequality is magnified to genocides: whenever a stronger people moved into an area, they wiped all natives from the face of the Earth. Example: Indo-European arrival in Europe. Moving yet further, we see how Homo sapiens cleared off each and every last of other Homos, and dominate the Earth.

As we see, each age, wielding its signature technologies, improved upon the lives of the regular people, and reduced the inequality of the previous age. Agriculture, city building, writing, empires, industrial age, electricity. All of them unleashed eras where common men and women could have better lives, enjoy more rights, and possess more political power. This great progress accumulated into the so-called middle class of the 1970s: a mass of people all equally empowered to make a better life for themselves, their families, and their world. In fact, this law of equality-induced-technologies is so powerful that a broad and rich middle class becomes the sign and the jewel of a developed country.

Until late 1970s and early 1980s, that is.

Remember that all previous technological advances have the same inequality-inducing qualities of digital technologies. All of them increase the productivity (thus reduce the amount labor needed to produce same amount of goods) and speed up communication (concentration of population, written languages, better roads, printing, better mode of transportation, telegram). Most crucially, all of them required a different skill set from the last. Farmers work differently from hunters and gatherers; city dwellers live differently from rural and forest dwellers; industrial workers need skills and discipline that farmers don't. And somehow, we assert that digital technologies are just different from the rest? That is just absurb.

Furthermore, close observation of the inequality data reveals some inconsistencies with our beautiful argument. Two main issues stand out. One, not every country experiences the spread. For example, Japan, original launch site of the transistors, barely experienced any significant spread. Neither do France and the Netherlands. Germany, which was explicitly cited in the book, is a mixed case. It inequality rose from mid-1980s to early 1990s, but then reduced in mid-1990s to 2000 (interestingly, the share of income of the top 1% crashed in early 2000s, signifying the effect of the dot com bubble?). Secondly, clear spreads (US, UK, Australia) did not coincide with the rise of the computer. They started in late 1970s in UK, early 1980s in US, and mid 1980s in Australia. However, computer technologies did not hit its stride until 1990s! What happened in late 1970 and mid-1980, you ask? Well, Thatcher rose in 1979, Reagan won in 1982, and Bob Hawke won in 1983. Thus, political events matched inequality much much better than technologies.

Last important point on this argument: digital technologies don't necessarily increase inequality. How? First, a super star actually requires a lot of supporting people, much more than our culture usually portray. Let's take Instagram, the example that The Second Machine Age held up to contrast with industrial age Kodak. Maybe it was true that creating Instagram itself did not take that many people. However, in contrast with ancient Kodak, Instagram requires active wireless internet to function. This means countless labor for building and maintaining of the wireless network, plus countless other for the smart phone itself. When you take all of these into account, well, Instagram in fact requires quite a few human hands to succeed, but we just don't think of them. Similarly, for J.K. Rowling to succeed as a writer, she need editors, graphic designers, translators, distribution channels, etc. For a movie to succeed and a few movie stars to earn big bucks, the movie needs countless experts in lightning, camera, music, scripts, etc. as well as advertisement and distribution. The problem is actually this: we don't think of these invisible people. We just think of the stars, and thus they alone gain the wealth and wield the power. Second, being a super star may not always profit the star. As pointed out by Invisibles book (by David Zweig), a hit or two on social media do not guarantee any profit. Instead, all enduring income streams require a lot of work, thus should provide jobs and share the gain. But of course, super stars don't share. Lastly, digital advance should have increased the number of "super stars," and thus driven down the actual benefits of being a super star. After all, in the age of endless personalization, there is no reason why I should read the same book, listen to the same music, or play the same game as you do. If the hype of the digital age actualizes, each small producer should have been able to easily reach out to its small niche, and thus allow for a large number of small producers, and increase competition. And what happens when competition is high? Lower profit on the side of the producers, of course. But this did not happen. Rather, we increasingly idolize a few and willfully ignore the rest.

Let's face it, digital age has not been the paradise it promised to be. No age has been, frankly. However, to blame our inequality on the digital technologies is absurd. We have the tools and the resources to educate each and every young person to pursuit his or her dream, but we don't. We have the resources to help all seniors retire in dignity, but we don't. We can bring good health care to all, but we don't. Our inequality feeds on our social and political systems, not our technologies. Therefore, let's fix the world rather than praying for serenity.

Wednesday, December 3, 2014

The Regression of Technologies

You know, when my Dell Venue 8 decided to shutdown Firefox out of nowhere for the upteenth time, I really need to vent my frustration somewhere. The state of our technologies is shameful, I tell you, shameful.

On the paper, my tablet has a 2.1 GHz dual core CPU with 1GB of RAM. Think about how marvelous this hardware is. This is above Windows Vista's recommended specification. Less than 10 years ago, with such system, I should expect a smoothly functional, graphical operating system on which I can work with office software, some small games, and read news. In parallel. And if you are willing to go just a bit back, this specification is like 5 times the recommended hardware for Windows XP, which, again, is a modern OS with graphical interface. On such powerful specification, you should be able to run suites of heavy applications (think Mozilla + Word + Outlook + games) at the same time, switching back and forth as you see fit.

However, Android could barely load itself on such capable system. And what do I run? A web-browser, a manga reader, and that's it. And, let's not pick on Dell either. My phone does similar things. Once, I was on the road, with Google Maps navigation and Audible running concurrently. At one point, the navigation told me that I will need to turn in about a mile. So I anticipated the signal to turn, and anticipated, and anticipated. After about 5 minutes (which should work about about at least 2 miles), I was confused why navigation has not told me which road to turn in yet. The mystery was easily seen once I looked at the phone: apparently, Android has decided that it ran out of memory or resources or whatever, and booted my navigation service out. No warning, no choices (seriously, given choice, Audible would go; I need navigation, no?), no nothing. Just kick it out.

I mean, guys, it's 2014. We know how to swap RAM to hard drive to emulate full memory. We have various web-based solution to divide the load between server and client. We have beautiful hardware that was unaffordable merely 10 years ago, and unthinkable 15 years ago (sounds long, but everyone using a smart phone once lived that time; it's in memory, for God's sake!). And the damned OS cannot have 2 services running at the same time. What gives?

And I don't mean Android is the only bad system, either. Have you heard of NodeJS? I still don't understand why people use it. It basically throws away every practical and theoretical advances of computer sciences in the last 20 or so years (no type checking, no multi-threading, no proper concurrent programming, no proper programming paradigm, etc.) and bills itself as, um, the greatest and latest. People talk about how fast NodeJS is. Seriously, guys. If you want to program without any modern features for speed, go and use assembly. I am about 200% sure it's faster. Hey, you can finally use more than 1 core!

The list of those "greatest and latest" go on and on. How about IDE? Emacs was ridiculed as "Eight Megabytes And Constant Swapping." How much memory any of your IDE takes? Or music. Once upon the time, people listened to vinyl. Then, it's CD. Then, it's MP3. Then, it's Youtube. Wanna talk about quality?

We keep talking about advances of technologies. However, there is this drive to reimplement everything on new platform, but the new implementation is slower, buggier, less capable than the last one. I still wonder why.