The joy of programming is hard for anyone to precisely define. At least, it’s hard for programmers to define, and seeing as nobody else understands what the hell it is anyway, that’s pretty much the same thing. However a few people on the interweb have tried quite hard to describe just what the feeling of developing software is by comparing it to things in “the real world”.

A quick google reveals some of the funny, interesting and downright weird things that people have compared programming to. Let’s take a closer look at some of them…

The Classics

“Programming is like sex” The most common version of this is, of course, that “One mistake and you have to support it for the rest of your life”. Very true. Unless you can manage to change jobs every six months, and then it’s more like “You can have lots of fun and then leave somebody else to clear up the mess”. There are lots of other variations too, including the controversial: “Sometimes you have to pay a lot of money to get someone who’s good at it”.

“Programming is like LEGOlegoHmm. As far as I can see this just means that, yes, you can put the pieces together in any way you like, but nothing you make will look quite as good as the thing you make by following the instructions. The impression of infinite freedom is an illusion. And if you’re not careful you’ll end up losing important bits down the back of the sofa or hoovering them up.

And, hang on, if it is like Lego, then how come we’re always talking about programming “glue”?

“Programming is like chess” Not sure about this one. The biggest similarity I can see is that a lot of Russians are quite good at it.

Or maybe you could compare the interminably long games with the average duration of an enterprise software project? In fact, maybe having a chess clock would make pair programming more fun; you get 30 seconds to write a line of code before it’s the other’s turn.

The Outliers

“Programming is like Ice Sculpting” What?! This has to be one of the most bizarre comparisons. I mean, yeah, it makes my hands really cold too. And my coworkers keep asking me why I bring that razor-sharp ice pick into the office on code review days.

“Programming is like a dream” Unfortunately sometimes it’s like a really bad dream, the kind that you get from falling asleep on your keyboard during your afternoon sugar-low, dribbling on your mouse and getting an imprint of the enter key on your forehead. The kind where you wake up screaming after a nightmare about finding a bug in a 600-line long function with one-letter variable names and no comments. Only to find it’s not a dream after all, but where you will spend the majority of your waking hours for the next six months.

But of course, it can also be the kind of dream where you’re so far in the zone that you feel like you’re flying, effortlessly gliding over the terrain, appreciating the bigger-picture before swooping down into the details and watching how everything meshes beautifully together. Ahhh.

But it’s probably not the, erm, y’know, other type of dream.

“Programming is like an adventure gamezork_textYes indeed. I often find myself having to go back over ground I’ve already covered, in order to perform repetitive and mundane tasks purely so I can level up (I think it’s known as “getting promoted”).

Sometimes I think that compiler writers treat their error messages as some kind of sadistic text-based game:

`You are in an open field west of a big white house with a boarded front door. There is an unterminated string constant to the west, and an undefined external symbol to the east. There is a header file on the floor in front of you.

include header You include the header. You are in a forest with incredibly long STL error messages all around. `

On a serious note, I think part of the reason programming is so difficult to pin-down is because it requires such disparate skills; a combination of creative, intuitive right-brainedness and the logical, analytical left. People can take a lot of different things away from it depending on where they start from.

Anyway, that’s my selection of gems. Got any other interesting ones?