Strangely Consistent

Musings about programming, Perl 6, and programming Perl 6

November 9, 2008 — developing code is like baking bread

19 years ago today, the Berlin Wall fell. The East German Minister of Propaganda had been on vacation, and was not fully briefed on the new refugee regulations. Asked when these regulations would come into effect, he answered: "As far as I know effective immediately, without delay". (When in fact they were to go into effect on the day after.) Thus the government created a situation for which they were wholly unprepared. Wikipedia tells the story:

Tens of thousands of East Berliners heard Schabowski's statement live on East German television and flooded the checkpoints in the Wall demanding entry into West Berlin. The surprised and overwhelmed border guards made many hectic telephone calls to their superiors, but it became clear that there was no one among the East German authorities who would dare to take personal responsibility for issuing orders to use lethal force, so there was no way for the vastly outnumbered soldiers to hold back the huge crowd of East German citizens. In face of the growing crowd, the guards finally yielded, opening the checkpoints and allowing people through with little or no identity checking. Ecstatic East Berliners were soon greeted by West Berliners on the other side in a celebratory atmosphere. November 9 is thus considered the date the Wall fell.

Today I have been too distracted by the Real World to commit any work to November or Rakudo. I only wish to share the following analogy, which I'm sure is entirely mundane:

Code exists as two slightly different entities: as the bare physical representation, i.e. text, bits, whatever; and as the ideas in your head about the program. These ideas are like the warmth inside dough that you're kneading: they make it easy to move things around, and to manipulate the code with your fingers. The "warmth" is a subjective thing, extrinsic to the code itself.

When you leave code for a few months (or when you're looking at someone else's code), the code isn't warm in the same way. In fact, a small crust has formed on the outside which makes it difficult to manipulate or get into. This is where refactoring can help — it's a way to knead the code back to life, to re-familiarize yourself with its contents. So says Mr. Fowler, anyway, and I'd tend to agree.

Right now, I'd say that the November source code is pretty supple under my fingers. This is good, because there are still many things which need changes or improvements in pace with Rakudo's increasing abilities. It is inevitable that even the November source will grow stale at some point, but I don't expect that to happen for a long time. The Rakudo source code is sort of growing more pliable week by week, but there are still things that utterly confuse me.

Tomorrow I expect to do some actual kneading again. Writing about bread like this makes me hungry.