Good Programmers Do Like to Code; It's All the Other Crap They Don't Like

Feb 25, 2007

I read Programmers Don't Like to Code a few weeks ago and spent some time thinking about it before wanting to comment. There is much to like in the article yet I'm not sure I can really agree with the title.

If you ask any real programmer want they like best about the things they do, most will tell you "I like to write code". Virtually no one will say "write requirements", "test plans", "go to meetings", "fill out status reports" or even "draw UML diagrams". Anyone who does enjoy these things more is highly unlikely to remain a programmer and would probably be happier as a project manager, architect, QA engineer or CEO.

Programming of course is more than just coding; we all have to do other things sometimes. The core reason for our existence as programmers remains telling the computer what we want it do to, which is coding. Building requirements (what do we want to tell the computer to do), architecture (how to approach telling the computer what to do), testing and QA (making sure it does what we want it to do) and meetings (trying to agree on who's fault it is that the computer isn't doing the right thing) are all additional tasks that make up a programmer's life.

Ask a real programmer and it's always about the code. Nothing else actually matters since it's the only thing that actually runs on the computer. The computer really doesn't care squat about requirements or pert charts or the color of your bike shed. It just does exactly what you tell it to do. Sometimes it doesn't do what you want it do and it's all about the cursing.

I can agree that programmers view coding as solving problems (although some managers would believe programmers use code to create problems), but without the coding there isn't anything interesting to solve (how long do we wait at the start of the meeting if the manager doesn't show up right away before leaving just doesn't cut it). If solving problems involved coming to work and pushing the red button to generate all of today's code would that make us happy? No. Coding is an art, a creative effort, an exercise in imagination and a joy when something works well. It's a mental challenge that few other professions can match, and only a small percentage of the population has the right mentality (some might say insanity) to do it well. Programming without coding is like non-alcoholic beer: what's the point?

I believe a programmer can like coding and still prefer languages and frameworks and tools that make it easier. We don't just want to code less, we want to spend more time coding the important stuff, the meat of the problem. We want to get the code to the computer and see it working now and move on to the next challenge. We want to code without spending lots of time writing peripheral stuff, like XML configurations and MAKE files. Well, there are some people who like those. Scary.

We don't want to write yet another web application framework, unless the problem requires it. If it's important to get to the real problem we will use one that's handy. If there is something to be gained by writing one we will do that too. We want to solve the problem or provide the service or whatever the task is in the best way possible. That's what a good programmer does.

A lot of companies and managers like to fill the programmer's life with lots of other stuff, like meetings and status reports and requirements analysis and writing test plans and fighting environment issues and begging for decent computers. But programmers don't like to spend any more time on any of these and will actively seek ways to avoid them and get back to coding. So good managers know this and will protect them. Sadly I have known few people who were any good at this; often they used to be programmers too (probably never liked to code either). If you find one let me know.

It's possible that programmers can like to code so much that they rewrite everything and write way more code than necessary for the shear fun of generating piles of steaming crap. Good programmers like to code efficiently and effectively. If you want to be a good programmer you have to want to learn new technologies, new patterns, new techniques, and new caffeinated beverages. Coding well means coding intelligently and being able to separate out the stupid new things from the truly useful. Solving problems through code does sometimes require that you write very little code.

A friend from a long time ago worked on some of the original 911 code and related a story where he was asked to figure out later how to add a complex feature required by some federal agency (I don't recall the details). He stared and played with the code for months trying to figure out how to add this feature without breaking the rest of the system. Eventually he only wrote a few lines of code to implement it, but they were in the exact right places where it worked perfectly without screwing up anything. That's still using coding to solve a problem. From a manager's perspective he looked like a slacker.

So if you meet a programmer who doesn't like to write code, be very wary. He might be your manager soon.

And then you have a problem you can't solve with code.