Since I read Bryan Dollery’s article Understanding the Psychology of Programming, I’ve been thinking about what programming is like, and how to explain it to non-programmers.
About a month ago, I read an article by Brian Hayes, titled The Post-OOP Paradigm, after which I wrote the following on my weblog (see also the full post):
A common question from users is whether some desired feature would be “difficult” to create. Mostly, it’s not a question of difficulty at all, but of how long it would take. Some features are indeed difficult to find good solutions to, but I don’t think that’s what they refer to – I think they mean the process of writing the instructions for what the computer should do.
I thought about saying something something about the vast number of instructions that a computer program contains, and how you must organize them into – using technical writing as analogy – parts, chapters, paragraphs, and sentences. Sometimes it takes longer to figure out how a feature fits in with the existing parts, chapters, etc.
I’m still not sure about what the users mean as they ask whether something would be difficult to implement, but my intuition says that they generally don’t mean the trouble of coming up with a solution. It’s something else.
I’m very easily disturbed as I work. The past few years I have been working solely in open-plan workspaces. I remember reading a post by Joel Spolsky, where he wrote about meeting Tom DeMarco, and one idea that has stayed with me is this:
Tom said [when asked about how pair programming can be reconciled with private offices, something DeMarco advocates in his book Peopleware] that groups of people who work in the same style on the same kinds of tasks will not distract each other. Programmers working on the same project would not distract each other; a room full of sales reps who spend most of the day on the phone don’t distract each other; etc. You get in trouble, though, when you put a programmer in a roop with the sales reps.
I definitely believe this is true. Unfortunately, I’ve often been located with people that are non-programmers (not that they are not nice people, but I get easily disturbed by their conversations about other things than programming); also, the people around me like to listen to the radio, something that also disturbs me (I generally don’t like the music, and the talk is even worse), so I wear headphones.
Now, back to the question of what programming is. I’d say that when most people have a problem that they need to solve, they would probably withdraw to a quiet place to think it over; perhaps draw some sketches on paper or a whiteboard, bring in someone else to toss around ideas with, and so forth. In other words, they would minimize the number of disturbing things around them, so they can focus on the problem and its solution.
My point is that programming is solving problems, and that this is what programmers do mostly all of the day. Anyone that has thought about a big problem for a long time, without finding a satisfying solution, knows that it is hard work. The same goes for solving many smaller problems. If you frequently get disturbed by things around you, it gets even harder.