Science Fiction

by Charles Miller on June 18, 2006

Back when I was a teenager, an adult of my acquaintance happened to pick up the science fiction novel I had just finished, and read the first page. They didn't get any further than the first page because, they said, they simply didn't understand half the words. They didn't understand the language that the book was written in.

I patiently explained that when I first read that page, the words didn't mean anything to me either. You could sort of work out what they might mean from guessing possible etymologies, but what you were really expected to do was file the word away and fill in its meaning later, when it was explained more fully.

For an unfamiliar reader, this can be disconcerting, but for an author it's necessary. Science fiction works by inventing things that don't exist, and those things all need names. Even familiar objects may need to be renamed because new slang might give more insight into the culture that produced it. Explaining each concept the first time it is mentioned would make the first few chapters of any book unreadable.

It was really just like A Clockwork Orange, just not quite as densely packed.

I wonder, sometimes, if this has influenced my programming style. When trying to introduce a new concept into my program, it seems perfectly natural to invent a verb or noun for it (a new method or object), then go back later to fill in the word's definition significantly after I've finished the sentence. So long as I picked the word right, I can recall what I wanted it to mean when I go back to define it.

Far too often, I see programmers try to get everything working top-to-bottom, in order. Like the author who must explain every word the first time it's used, they end up continually losing their train of thought because they have to descend into finer and finer levels of detail. You also end up with a mass of unreadable spaghetti-code.

Previously: I'm Not Making This Up

Next: The A20 Hack