Thursday, July 17, 2003

Do It Right the First Time

Neal Stephenson (paraphrased by Ehud Lamm):

A good writer (and a good programmer) does not work by distilling good ideas from a large pool of bad and good ones, but by producing few if any bad ideas in the first place. It is important to give ideas time to mature [in the subconsciousness] so only good ideas percolate to the conscious level.

That’s the only way I know how to write prose. I tend to think about things in the background and then type out an almost-final draft. However, in all levels of school, I was told that it was important to get a rough draft down on paper as soon as possible, even if it was, well, rough. It could always be revised from there. The problem is that it’s much easier to revise in your head than on paper (or in a word processor). The ideas on the paper have inertia. They lock you into a trajectory. I spot some of the bad ideas and excise them, but I think my brain suppress new good ideas because there’s no way to seamlessly incorporate them into the draft.

The great advantage of the pen is that it is slow. Ideas, in his view, come faster than we can “serialize” them on the paper or at the keyboard. Therefore, the ideas are stored in an “accumulation buffer” in the brain. When in the buffer, the ideas interact and purify. If we empty the buffer too soon, we don’t give the ideas enough time to mature and we get a half-baked prose. There is a virtue in slow typing or in hand-writing. Needless to say, Neil is not a fan of a PowerPoint. He contends that writing on a blackboard gives a teacher and a student so important time to think.

+1 for chalk.

Stephenson’s comments were from his USENIX keynote, so how does this apply to programming? (I guess we are meant to put aside the obvious differences between the life cycle of a program and that of a novel.) On the surface, Stephenson’s ideas seem to be at odds with XP. Discovering design through refactoring and test-driven development is essentially a hill climbing strategy. For certain kinds of problems, it works great. But for others, it really pays to think carefully about your starting point. The Right design can make all the details fall into place.

Conclusion: to paraphrase Asimov’s Hardin, don’t let a methodology prevent you from doing what’s right.

Comments RSS · Twitter

Leave a Comment