Programming and Depression
edited June 04 2014
April 13, 2012

So here I am again, in a mild funk. My sleep patterns are looking like the plot from a random number generator; I don't want to talk to anybody, and I try to get through the day using as few words as possible; I don't really want to do anything, though I keep forcing myself to spit out just enough work to keep most of the bills paid. Depression is rarely without a cause of some kind, and in this case there are a handful of causes that are converging down to a single sense of defeat: I am stuck.

Depression and burning out seem to be a common theme amongst programmers. I started thinking about some of the stuff I've read from fellow programmers about burning out, and some of the threads that have popped up periodically on programmer forums like HN regarding depression. I started wondering why it seemed more prevalent than in other professions.

I have a theory

Let's set aside for the moment some obvious assumptions: that, because I'm a programmer, I will be more aware of trends amongst programmers than I will be of, say, stage actors; and that programmers as a whole tend towards being introspective and analytical individuals who are sometimes articulate and interested in sharing their thoughts with others, and therefore more likely to think about and discuss the subject.

Let's instead just ask the question, "Is there something unique, or at least less common, about programming compared to other professions?"

I think there is.

It occurred to me while I was watching this video of some incredible talent that if you play the guitar, and play it well, you can demonstrate it to people. Even if people don't fully understand how long it took you to develop the skills to play a musical instrument that way, how much work and effort went in to it, or how talented you really are, they at least can have some appreciation of it. You are doing something that they can't do, and it sounds good and looks good besides.

But if you are a programmer, you can't do that. If you muster decades worth of practice and experience and, over some amount of time, write something brilliant — let's say, some kind of amazing new database interface, some piece of code architecture that will make something that was difficult into something that is now more straightforward — well, nobody else is really going to ever see that. What are you going to do, stand up in a coffee house one night and show off your code on a projector? "And this, ladies and gentlemen, is where I got the brilliant idea to use my new mutex to manage simultaneous multithreaded access to the same chunk without the risk of a race condition!" There's wild cheering, somebody buys you drinks, and you get to go home with a cute girl who thinks your brain is super hot.

No, not really.

What you can do is share your code with other programmers. I think that's the real value of things like Github. But, programmers are a notoriously savage bunch, and Github attracts top talent from all corners of the world. You are just as likely to hear a comment breaking down why your approach was wrong, or why you're using the incorrect syntax here or there, or why there's already some library by some other Joe Schmuck that does the same thing, only better.

Imagine if you were that guy playing that guitar, and at the end of it, some guy in the crowd gets up on stage and tells you, "Look, it's not that you're bad, it's just that you weren't chording some of those notes right. Look, I'll show you," and then you get completely schooled in front of everyone by some guy you've never met before.

Auto mechanics are about the closest thing I can think of in this regard. To many people, they take their car in to a mechanic, they say, "it's making this funny noise, like whirr-ker-chunk-ker-chunk-ker-chunk, but only when I'm coasting downhill," and then a few days and a few hundred or thousand dollars later it's fixed.

Magic. Except that, even then, at some point in their life most people put the hood of their car up at least once, or they try to fix something around the house, or they have a friend or family member that does basic simple repairs. So, people still have some notion of what it takes to be a good mechanic, even if that notion is wildly inaccurate.

But programming?

I've yet to meet the grocery clerk that says, "Yeah, so like I was browsing this website the other day, and I noticed it was doing something pretty neat with the menus, so I looked around in the code and whoever did it came up with this super cool approach..."

So at the end of several days' worth of programming, and problem-solving, and forward-thinking, all a programmer might get is a "thanks, now here's the next thing I need you to do."

My system is currently online but I am not at my keyboard.