I was re-reading the fantastic piece by Peter Welch called Programming Sucks, which is a classic despite it being only two years old. In the piece, Mr. Welch repeatedly demonstrates why programming (and the atmosphere surrounding it), well, sucks, which results in simultaneously hilarious and sobering paragraphs such as this one:

"You discover that one day [while debugging a program], some idiot decided that since another idiot decided that 1/0 should equal infinity, they could just use that as a shorthand for "Infinity" when simplifying their code. Then a non-idiot rightly decided that this was idiotic, which is what the original idiot should have decided, but since he didn't, the non-idiot decided to be a dick and make this a failing error in his new compiler. Then he decided he wasn't going to tell anyone that this was an error, because he's a dick, and now all your snowflakes are urine and you can't even find the cat."

You'll have to read the whole piece to have that last sentence make sense. Go on, I'll wait.

That post got me thinking: why exactly does programming suck? Most of the piece details that the work itself actually doesn't suck; rather, the people involved in it do. It got me thinking: exactly why can programming be so frustrating, so annoying, so terrible? And I've come up with a theory.

In short: programming doesn't suck, programmers suck. Yes, including me. Here's why:

We think "I can do better than that." Every damn time. It doesn't matter if we've spent five seconds perusing a new codebase or a couple minutes watching a senior developer explain what his application does, we can always do better than that idiot. Until we actually try to do it better, and after a few hours of "this can't be that hard" and "why won't you work, stupid code" and "I know I'm better than this" we're more likely to silently give up than concede that we got Dunning-Krugered once again. Why admit defeat when you can just delete?

But while we will do better than that, nobody else can. Everyone else's applications are steaming piles of dog crap next to our own beautifully-crafted, complete, artful pieces of shit code. And we don't even have enough sense to realize that what we've written is crap, as it always has been and always will be; since it's our crap we assume that it must be good. After all, we're good at programming, therefore what we write must be good. I mean, obviously.

A programmer, sitting on a couch with a computer on his lap, captioned "Now I am become death, destroyer of code"

In our own little insular world, we are gods, and we get treated as such. Have you ever fixed a family member's computer after they did something to it? You'd think they just saw water turned into wine. What was a few minutes of googling and an hour of random button-pressing while trying to get a different error becomes a work of utter genius in the eyes of the non-techie. To them, we are not so much technicians as magicians, and we can't even deny it because "oh, you're just being modest." To the non-programmer, we are miracle-workers. And, if we're being really honest with ourselves, we love it. We crave that praise, that acknowledgement; it's something we don't often get in the real world because code, on the whole, is supposed to be invisible. It's a truly addictive feeling, that of doing something no one else can do.

We believe that management hates us because we "tell it like it is" (which invariably means "how we want it to be"), but in reality they hate us because we don't bother explaining ourselves clearly. We say "there's a problem" and then launch into some long and indecipherable technobabble rant about why the proposed solution won't work, when in reality we're just stalling, saying it won't work because we don't have the time or energy to research and understand the proposed solution.

Worse, if we do bother to attempt to explain why it won't work, we'll probably only do that once, because when we invariably fail to make them understand how smart we are and how dumb they must be, we just won't bother explaining anything to them because it's a waste of time. They didn't understand before, so they won't understand now. It's an endless loop, one we perpetuate because it makes us feel smart, feel needed, when in reality it just pisses off our managers.

In short, we are whiny, selfish, dense little buggers who just want to feel smart.

Programming, to be clear, is awesome. We programmers are fortunate. We get to solve problems using code that only a few people understand, that are difficult to conceptualize, that, if we're lucky, can actually make a difference in someone's day-to-day life. The feeling of doing good work is up there with good sex and good food: it feels amazing. Even better, we get paid to do this, and in many cases paid quite well compared to other professions. Yet we can't seem to remember any of that because we're too busy puffing our chests and destroying code.

Programming doesn't suck, programmers suck. All of us, including me. This is one of the reasons I believe that a core part of being a programmer is being a good communicator. Maybe the time we spend perfecting our code would be better spent explaining it, understanding others' code, or just chilling out. We're not gods, we can't always do better, and most of all we are people just like everyone else. Spend your time learning how to communicate, analyze, and teach; what you'll find is that these are all more important skills than knowing how to code.