In The Hitchhiker’s Guide to the Galaxy, Douglas Adams wrote:
The History of every major Galactic Civilization tends to pass through three distinct and recognizable phases, those of Survival, Inquiry and Sophistication, otherwise known as the How, Why and Where phases. For instance, the first phase is characterized by the question ‘How can we eat?’ the second by the question ‘Why do we eat?’ and the third by the question ‘Where shall we have lunch?
I think this applies directly to programming as well. I’d characterize the questions as:
At first, a new programmer just wants to know how to make something work – You could also call this the Why doesn’t this work?
question. There’s a whole industry around helping people – not just programmers – with the this problem. The failure of this approach is its tendency to create cargo-cult coders, programmers who can get something done, but can’t explain their choices or method. Many have no desire to, or may not even realize that they should. Their world is full of (in the words of Rumsfeld) unknown unknowns.
I think the advancement of a programmer is strongly linked to self-examination, figuring out why you did something and if there’s a better way. If you don’t understand the failings of your approach, you have no chance to improve it. Programming is strange, and hard, and unnatural, and it’s important to be vigilant about the code you write. Humans in general are creatures of habit, and programmers seem to be particularly vulnerable its stultifying effect. We rely heavily on techniques and patterns, and it’s easy to fall into the trap of habit and stop reflecting.
Asking why is one of my favorite interview tactics. I’ll look over the candidate’s site, or a project they worked on, and find something interesting or unusual to ask them about. People who are strong candidates have answers, and poor candidates don’t. Even if their reasons are dumb, or you don’t agree with them, the ability to explain their choices shows that they thought about the problem.
One of the questions in Coders at Work was, (paraphrasing) Do you think programming is engineering, craftsmanship, or something else?
I think it depends on the programmer – programming is what you make of it. Some programmers are craftsmen, some are engineers, and there sure are a lot of lowest-bid contractors out there.
It’s a very immature discipline, relative to the engineering or craftsmanship parallels. We’re still in the survival stage now, but it’s time to start challenging ourselves, reaching out for sophistication.
Discussion