I thought about this one for a couple of years, then wrote it up, and left it untouched for another couple of years.
What prompted me to publish it now - at least the first, relatively finished part - is Steve Yegge's post, an analogy between the "liberals vs conservatives" debate in politics and some dichotomies in the professional worldviews of software developers. The core of his analogy is risk aversion: conservatives are more risk averse than liberals, both in politics and in software.
I want to draw a similar type of analogy, but from a somewhat different angle. My angle is, in politics, one thing that people view rather differently is the role of markets and competition. Some view them as mostly good and others as mostly evil. This is loosely aligned with the "right" and the "left" (with the caveat that the political right and left are very overloaded terms).
So what does this have to do with software? I will try to show that the disagreement about markets is at the core of the conflict presented in the classic essay, The Rise of Worse is Better. The essay presents two opposing design styles: Worse Is Better and The Right Thing.
I'll claim that the view of economic evolution is what underlies the Worse Is Better vs The Right Thing opposition - and not the trade-off between design simplicity and other considerations as the essay states.
So the essay says one thing, and I'll show you it really says something else. Seriously, I will.
And then I'll tell you why it's important to me, and why - in Yegge's words - "this conceptual framework became one of the most important tools in my toolkit" (though of course each of us is talking about his own analogy).
Specifically, I came to think that you can be for evolution or against it, and I'm naturally inclined to be against it, and once I got that, I've been trying hard to not overdo it.
Much of the work on technology is done in a market context. I mean "market" in a relatively broad sense - not just proprietary for-profit developments, but situations of competition. Programs compete for users, specs compete for implementers, etc.
Markets and competition have a way to evoke strong and polar opinions in people. The technology market and technical people are no exception, including the most famous and highly regarded people. Here's what Linus Torvalds has to say about competition:
Don't underestimate the power of survival of the fittest. And don't ever make the mistake that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That's giving your intelligence much too much credit.
And here's what Alan Kay has to say:
…if there’s a big idea and you have deadlines and you have expedience and you have competitors, very likely what you’ll do is take a low-pass filter on that idea and implement one part of it and miss what has to be done next. This happens over and over again.
Linus Torvalds thus views competition as a source of progress more important than anyone's ability to come up with bright ideas. Alan Kay, on the contrary, perceives market constraints as a stumbling block insurmountable for the brightest idea.
(The fact that Linux is vastly more successful than Smalltalk in "the market", whatever market one considers, is thus fully aligned with the creators' values.)
Incidentally, Linux was derived from Unix, and Smalltalk was greatly influenced by Lisp. At one point, Lisp and Unix - the cultures and the actual software - clashed in a battle for survival. The battle apparently followed a somewhat one-sided, Bambi meets Godzilla scenario: cheap Unix boxes quickly replaced sophisticated Lisp-based workstations, which became collectible items.
The aftermath is bitterly documented in The UNIX-HATERS Handbook, groundbreaking in its invention of satirical technical writing as a genre. The book's take on the role of evolution under market constraints is similar to Alan Kay's and the opposite of Linus Torvalds':
Literature avers that Unix succeeded because of its technical superiority. This is not true. Unix was evolutionarily superior to its competitors, but not technically superior. Unix became a commercial success because it was a virus. Its sole evolutionary advantage was its small size, simple design, and resulting portability.
The "Unix Haters" see evolutionary superiority as very different from technical superiority - and unlikely to coincide with it. The authors' disdain for the products of evolution isn't limited to development driven by economic factors, but extends to natural selection:
Once the human genome is fully mapped, we may discover that only a few percent of it actually describes functioning humans; the rest describes orangutans, new mutants, televangelists, and used computer sellers.
Contrast that to Linus' admiration of the human genome:
we humans have never been able to replicate something more complicated than what we ourselves are, yet natural selection did it without even thinking.
The UNIX-HATERS Handbook presents in an appendix Richard P. Gabriel's famous essay, The Rise of Worse Is Better. The essay presents what it calls two opposing software philosophies. It gives them names - The Right Thing for the philosophy underlying Lisp, and Worse Is Better for the one behind Unix - names I believe to be perfectly fitting.
The essay also attempts to capture the key characteristics of these philosophies - but in my opinion, it focuses on non-inherent embodiments of these philosophies rather than their core. The essay claims it's about the degree of importance that different designers assign to simplicity. I claim that it's ultimately not about simplicity at all.
I thus claim that the essay discusses real things and gives them the right names, but the wrong definitions - a claim somewhat hard to defend. Here's my attempt to defend it.
Worse is Better - because it's simpler?
Richard Gabriel defines "Worse Is Better" as a design style focused on simplicity, at the expense of completeness, consistency and even correctness. "The Right Thing" is outlined as the exact opposite: completeness, consistency and correctness all trump simplicity.
First, "is it real"? Does a conflict between two philosophies really exist - and not just a conflict between Lisp and Unix? I think it does exist - that's why the essay strikes a chord with people who don't care much about Lisp or Unix. For example, Jeff Atwood
…was blown away by The Rise of "Worse is Better", because it touches on a theme I've noticed emerging in my blog entries: rejection of complexity, even when complexity is the more theoretically correct approach.
This comment acknowledges the conflict is real outside the original context. It also defines it as a conflict between simplicity and complexity, similarly to the essay's definition - and contrary to my claim that "it's not about simplicity".
But then examples are given, examples of "winners" at the Worse Is Better side - and suddenly x86 shows up:
The x86 architecture that you're probably reading this webpage on is widely regarded as total piece of crap. And it is. But it's a piece of crap honed to an incredibly sharp edge.
x86 implementations starting with the out-of-order implementations from the 90s are indeed "honed to an incredibly sharp edge". But x86 is never criticized because of its simplicity - quite the contrary, it's criticized precisely because an efficient implementation can not be simple. This is why the multi-billion-dollar "honing" is necessary in the first place.
Is x86 an example of simplicity? No.
Is it a winner at the Worse is Better side? A winner - definitely. At the "Worse is Better" side - yes, I think I can show that.
But not if Worse Is Better is understood as "simplicity trumps everything", as the original essay frames it.
Worse is Better - because it's more compatible?
Unlike Unix and C, the original examples of "Worse Is Better", x86 is not easy to implement efficiently - it is its competitors, RISC and VLIW, that are easy to implement efficiently.
But despite that, we feel that x86 is "just like Unix". Not because it's simple, but because it's the winner despite being the worse competitor. Because the cleaner RISC and VLIW ought to be The Right Thing in this one.
And because x86 is winning by betting on evolutionary pressures.
Bob Colwell, Pentium's chief architect, was a design engineer at Multiflow - an early VLIW company which was failing, prompting him to join Intel to create their out-of-order x86 implementation, P6. In The Pentium Chronicles, he gives simplicity two thumbs up, acknowledges complexity as a disadvantage of x86 - and then explains why he bet on it anyway:
Throughout the 1980s, the RISC/CISC debate was boiling. RISC's general premise was that computer instruction sets … had become increasingly complicated and counterproductively large and arcane. In engineering, all other things being equal, simpler is always better, and sometimes much better.
…Some of my engineering friends thought I was either masochistic or irrational. Having just swum ashore from the sinking Multiflow ship, I immediately signed on to a "doomed" x86 design project. In their eyes, no matter how clever my design team was, we were inevitably going to be swept aside by superior technology. But … we could, in fact, import nearly all of RISC's technical advantages to a CISC design. The rest we could overcome with extra engineering, a somewhat larger die size, and the sheer economics of large product shipment volume. Although larger die sizes … imply higher production cost and higher power dissipation, in the early 1990s … easy cooling solutions were adequate. And although production costs were a factor of die size, they were much, much more dependent on volume being shipped, and in that arena, CISCs had an enormous advantage over their RISC challengers.
…because of having more users ready to buy them to run their existing software faster.
x86 is worse - as it's quite clear now when, in cell phones and tablets, easy cooling solutions are not adequate, and the RISC processor ARM wins big. But in the 1990s, because of compatibility issues, x86 was better.
Worse is Better, even if it isn't simpler - when The Right Thing is right technically, but not economically.
Worse is Better - because it's quicker?
Interestingly, Jamie Zawinski, who first spread the Worse is Better essay, followed a path somewhat similar to Colwell's. He "swum ashore" from Richard Gabriel's Lucid Inc., where he worked on what would become XEmacs, to join Netscape (named Mosiac at the time) and develop their very successful web browser. Here's what he said about the situation at Mosaic:
We were so focused on deadline it was like religion. We were shipping a finished product in six months or we were going to die trying. …we looked around the rest of the world and decided, if we're not done in six months, someone's going to beat us to it so we're going to be done in six months.
They didn't have to bootstrap the program on a small machine as in the Unix case. They didn't have to be compatible with an all-too-complicated previous version as in the x86 case. But they had to do it fast.
Yet another kind of economic constraint meaning that something else has to give. "We stripped features, definitely". And the resulting code was, according to jwz - not simple, but, plainly, not very good:
It's not so much that I was proud of the code; just that it was done. In a lot of ways the code wasn't very good because it was done very fast. But it got the job done. We shipped - that was the bottom line.
Worse code is Better than not shipping on time - Worse is Better in its plainest form. And nothing about simplicity.
Here's what jwz says about the Worse is Better essay - and, like Jeff Atwood, he gives a summary that doesn't summarize the actual text - but summarizes "what he feels it should have been":
…you should read it. It explains why mediocrity has better survival characteristics than perfection…
The essay doesn't explain that - the essay's text explains why simple-but-wrong has better survival characteristics than right-but-complex.
But as evidenced by jwz's and Atwood's comments, people want it to explain something else - something about perfection (The Right Thing) versus less than perfection (Worse is Better).
Worse is Better evolutionary
And it seems that invariably, what forces you to be less than perfection, what elects worse-than-perfect solutions, what "thinks" they're better, is economic, evolutionary constraints.
Economic constraints is what may happen to select for simplicity (Unix), compatibility (x86), development speed (Netscape) - or any other quality that might result in an otherwise worse product.
Just like Alan Kay said - but contrary to the belief of Linus Torvalds, the belief that ultimately, the result of evolution is actually better than anything that could have been achieved through design without the feedback of evolutionary pressure.
From this viewpoint, Worse Is Better ends up actually better than any real alternative - whereas from Alan Kay's viewpoint, Worse Is Better is actually worse than what's achievable.
(A bit convoluted, not? In fact, Richard Gabriel wrote several follow-ups, not being able to decide if Worse Is Better was actually better, or actually worse. I'm not trying to help decide that - just to show what makes one think it's actually better or worse.)
That's the first part - I hope to have shown that your view of evolution has a great effect on your design style.
If evolution is in the center of your worldview, if you think about viability as more important than perfection in any area, then you'll tend to design in a Worse Is Better style.
If you think of evolutionary pressure as an obstacle, an ultimately unimportant, harmful distraction on the road to perfection, then you'll prefer designs in The Right Thing style.
But why do people have a different view of evolution in the first place? Is there some more basic assumption underlying this difference? I think I have more to say about this, though it's not in nearly as finished form as the first part, and I might write about it all in the future.
Meanwhile, I want to conclude this first part with some thoughts on why it all matters personally to me.
I'm a perfectionist, by nature, and compromise is hard for me. Like many developers good enough to be able to implement much of their own ambitious ideas, I turned my professional life into a struggle for perfection. I wasn't completely devoid of common sense, but I did things that make me shiver today.
I wrote heuristic C++ parsers. I did 96 bit integer arithmetic in assembly. I implemented some perverted form of thread migration on the bare metal, without any kind of OS or thread support. I did many other things that I'm too ashamed to admit.
None of it was really needed, not if you asked me today. It was "needed" in the sense of being a step towards a too-good-for-my-own-good, "perfect" solution. Today I'd realize that this type of perfection is not viable anyway (in fact, none of these monstrosities survived in the long run.) I'd choose a completely different path that wouldn't require any such complications in the first place.
But my stuff shipped. I was able to make it work.You don't learn until you fail - at least I didn't. Perfectionists are stubborn.
Then at one point I failed. I had to throw out months worth of code, having realized that it's not going to fly.
And it so happened that I was reading Unix-Haters, and I was loving it, because I'm precisely the type of perfectionist that these people are, or close enough to identify with them. And there was this essay there about Worse Is Better vs The Right Thing.
And I was reading it when I wrote the code soon to be thrown out, and I was reading it when I decided to throw it out and afterwards.
And I suddenly started thinking, "This is not going to work, this type of thing. With this attitude, if you want it all, consistency, completeness, correctness - you'll get nothing, because you will fail, completely. You're too dumb, I mean I am, also not enough time. You have to choose, you're not going to get it all so you better decide what you want the most and aim at that."
If you read the Unix-Haters, you'll notice a lot of moral outrage - perfectionists have that, moral outrage at something imperfect. Especially at someone who knowingly chooses to aim at less than perfection. Especially if it's due to the ulterior motive of wanting to succeed.
And I felt a counter-outrage, for the first time. "What do you got to show, you got nothing. What good are your ideals if you end up dead? Dead bodies smell bad to us for a reason. Technical superiority without evolutionary superiority? Evolutionary inferiority means "dead". How can "dead" be technically superior? What have the dead ever done for us?"
It was huge, for me. I mean, it took a few years to truly sink in, but that was the start. I've never done anything Right since. And I've been professionally happy ever after. I guess it's a kind of "having swum ashore".