Health Tips for Programmers
Feb 25, 2009 10:51

Programming isn't all that good for your health. Part of the problem is that you spend a lot of time sitting in one place - often hunched and tense. The bigger problem is that programming uses up a lot of motivational energy. There are many ways to get exercise and live healthily if you have extra motivation - but most programmers I know use up all of their motivation in their work. The last thing I want to do in the middle of running my own software company is to go prepare for a marathon - I already spend my life in a tough slog against exhaustion in pursuit of a distant goal.

However, just sitting at a desk all day and eating pizza and drinking too much coffee isn't a good plan for living well or long. Over the years, I've come up with a few simple things that have helped me stay relatively healthy.

Snack Wisely

I've found that when I'm concentrating I like to be eating or drinking something at the same time. When I started programming from home, I used to make a 12-cup pot of coffee from espresso beans, and then follow it up over the rest of the day with Coca Cola, supplemented with Doritos. When I was feeling virtuous, I would switch to Smartfood Popcorn.

I'm really glad that I never took up smoking, because I know that I would have a terrible two-pack-a-day habit.

A few years ago, I discovered a key thing: it doesn't actually matter what I'm snacking on. My brain just needs some idle fidgeting and consumption to work more smoothly, but it doesn't have to be junk food.

So, now I always have a pint glass of water (just tap water) on my desk, with some lemon concentrate for flavour. I still have coffee in the morning, but I use a French press, which not only makes tastier coffee, but less of it. For snacks, I've switched to carrot sticks - I'll eat a small bag of them every day.

This doesn't mean that I've cut the tasty things out of my life - I still eat cheeseburgers and drink beer and wine and all of that - but I don't eat unhealthy snacks, especially when I'm not paying attention anyhow.

Use Your Pauses

As computer users, we often have little bits of downtime in our work - waiting for uploads or downloads, compiling, running large database processes, or whatever. I used to just switch to Reddit or Slashdot or whatever in those pauses - and then get lost down a rat-hole of distraction. I've recently found a new thing for those distractions: push-ups. It takes less than a minute to do a few pushups - not enough time to be a big distraction in your day, and it's not like you're doing something else while you're downloading.

The trick is to bypass your motivation. Getting up in the morning and saying "today I'm going to do 50 push-ups" is a setup for failure. I need my coffee first, and then usually there's a phone call with some kind of emergency, and then there's a lunch meeting, and I get caught up in programming - and then when I do have time, I'm too mentally exhausted to commit to that extra exertion. But there are always brief pauses in the middle of the day - and they're enough of a lull for me to do a few push-ups. Try to do an extra push-up each time. I started with 10 just a few weeks ago, and now I can do 50 without too much trouble.

Your mileage may vary if you work in an office with other people, but it's great if you have some privacy.

Walk

If you can, walk as much as possible. I know people who have lost an astounding amount of weight simply by walking to work in the morning. This won't work so well if you live way out in the suburbs and work downtown (or vice-versa, like I used to do), but seriously consider walking if you have a short trip to make. Also, with traffic the way that it is in many cities, walking may not be much slower than driving. Simply getting out of the house/office and walking around the block or the office complex can clear your head and help your programming. Longer walks can be a great way to tune back into the real world - something I often need to do if I've been working too hard. If you'd rather avoid reality, an iPod full of Audiobooks and podcasts can turn long walks into learning and enrichment opportunities.

More Intense Options

If you decide you would like to pursue a more rigourous health regimen, there are all sorts of health clubs, exercise plans, sports, and teams you can look into - unfortunately, most of them are filled with the kinds of people who used to beat up computer nerds in school. There are some nerd-friendly options out there.

I haven't had the chance to try it myself, but I've heard a lot about the 5BX program. This was designed by the Royal Canadian Air Force in the 1950s, and was even used as the basis for a book called The Hacker's Diet.

5BX starts very simply, and has a strict sequence of increasing difficulty. You start with ridiculously easy exercises and aren't allowed to skip ahead, so from day one you're feeling superior rather than discouraged. It takes a few minutes a day and doesn't require any fancy equipment.

Another option would be look into a martial art, like Kung Fu. Yoga is very popular these days, but Kung Fu is actually quite similar, with the addition that you learn self-defence. Deep down, doesn't every programmer want to be Neo from the Matrix? What's great with Kung Fu is that you learn forms and exercises that you can do at home by yourself without any fancy or expensive gear. The gear you do need is more appealing, too - who wouldn't prefer to have a sword around the house than a rowing machine?

The trick is to find a place that isn't full of jerks. I've been going to Wu Xing Martial Arts for the last few years (yes that's me in the "Focus" picture in the slideshow), although with work and travel I haven't been able to attend as many classes as I would like. The sessions are supportive and friendly, and they have a holistic approach to mind and body - rather than just a 'boot to the head' approach. My balance and flexibility improved tremendously in just a few weeks (although they were pretty lousy to start with), and it has certainly helped my general health and fitness. Most schools will let you sit in on a class or two to get the feel of the place - find one that's inviting and supportive.

But you don't need to make a dramatic and difficult change to your lifestyle to improve your health. Just a few small steps - so small that your laziness won't even notice them - can make a big difference.

Previous:
This tables meme won't die
Feb 10, 2009 21:41
Next:
FutureRuby and More From Unspace
Mar 20, 2009 10:22