There’s a funny contradiction amongst developers. It’s a mark of pride to work the longest hours, drink the most caffeine, eat at your desk and sleep the least. Essentially, whoever can endure the most punishment gets to be king of the hill. Obviously I’m being hyperbolic, but it’s fascinating that we respect each other’s ability to disregard personal wellness.
In reality, all of these behaviors detract from the quality of work that we produce. The New York Times recently published an article about decision fatigue, explaining why we make poorer choices when exhausted:
It’s different from ordinary physical fatigue — you’re not consciously aware of being tired — but you’re low on mental energy. The more choices you make throughout the day, the harder each one becomes for your brain, and eventually it looks for shortcuts. […] Ducking a decision often creates bigger problems in the long run, but for the moment, it eases the mental strain. You start to resist any change, any potentially risky move.
The notion that, if you stay up just one more hour and have one more Red Bull, you’ll be able to solve that one nagging problem ends up being false more often than not. The deadlines are rarely important enough to risk the bad choices, and a fresh set of eyes in the morning usually solves all conundrums.
The other half of the problem revolves around taking care of our bodies. In The Creative Brain on Exercise, the author relates numerous studies that link exercise and physical activity with increased neuroplasticity, or “the ability of the brain to literally rewire itself”, which relates to both mood and the ability to think creatively. In the same article, he touches on the cultural tropes that may steer so many of us away from exercise:
A large number of artists and entrepreneurs resist exercise as a key element in their ability to do what they most want to do–make cool stuff that speaks to a lot of people. In the case of artists, I often wonder if that resistance is born of a cultural chasm that many artists grew up with, where jocks were jocks, artists were artists, hackers were hackers, and never the twain would meet.
Can we, as a community, dispel the perception that we’ll be better programmers at the expense of our health? Encourage yourself and others to make small changes throughout the day. Instead of having a second or third coffee, take a walk around the block. Instead of doing a ninth straight hour of work, go home and give yourself a break. Or go to sleep, because it’s 4 in the morning. Drink water instead of soda. Eat a salad — it’s tasty.
But I Really Like Red Bull
That’s cool. I really like coffee; it’s delicious, but it’s never helped me solve a problem late at night. When you’re mentally fatigued, there are few alternatives other than rest. Programming1 is an active and engaging intellectual activity, and once fatigue sets in, you just can’t be your best.
I’ve been eating simpler, healthier foods and making myself get to bed before midnight during the week. My partner and I have been doing yoga as regularly as possible since this spring, and have just started the Couch-to-5k program together. My overall energy levels have significantly increased. I feel less stressed, happier at work, and more full of ideas than any time in recent memory. Eventually, the process becomes more refreshing than painful.
Sometimes it’s hard to make changes on your own. Find someone who also wants to exercise, or who’s interested in sharing the work of cooking healthier meals together. If none of your friends are interested in working out, go to the gym and make some new friends2. (If you know me personally, I would love to work out with you!)
Rob Sanheim gave a great presentation about this at RubyConf 2011, inspiring many of my points. The more people working to destroy the myths surrounding hacker culture, the better. His slides are available here.