Why Programmers Should Exercise

Posted on February 17, 2014

I was told that this article should be retitled, and I should make the target audience a bit more explicit.  So I did.

IF reader.alreadyExercises()
  THEN GOTO 5
ELSE GOTO 10

5
You can skip to the part where you get happy signals from someone reinforcing your beliefs and you share this on your Facebook/Twitter/other networking site.  You probably won’t find much new in this article, though feel free to read on.


10
Now that that’s dealt with, I’ll get to the meat of this post, namely, why you should want to be in shape, whether or not your occupation / hobbies are physically involved.

First, I’ll lay out some of the research around this:
1) Fitness (especially aerobic exercise) substantially lowers the risk of Alzheimer’s, dementia, and, of course, heart disease.  You can expect serious longevity increases just from those, though there are other things it helps with (e.g. likelihood of dying from infectious disease, ability to handle chemotherapy).

2) Study after study after study suggests that exercise improves all sorts of cognitive processes.  Your code will almost definitely be improved, either in elegance or number of problems solved / time.  Just because your job doesn’t directly involve physical activity doesn’t mean it’s not helpful.

To inject some anecdotal evidence, I used to never exercise.  I made all sorts of excuses.  “Oh, that’s all well and good, but I don’t have time!”  “I’m in good enough shape <runs around the block /> <hyperventilating> see? </hyperventilating>.”  “I can’t afford to be tired.”  Rationalization is probably the most unfortunately-rooted word in the English language, and most reasons not to exercise fall into that bucket.  I’ve noticed a few major benefits that I was quasi-deliberately underaccounting for:

1) Time - my level of physical activity seems to have a strong causal link to clarity and speed of cognition.  I tend to get the same amount of (or even more) work done as I was previously, but in time_awake - time_exercising instead of time_awake.

2) Energy - exercising has, oddly enough, left me feeling less tired, not more.  There is a relatively established link between physical activity and awakeness/energy/whatever-you-wish-to-call-it.  Finding relevant papers is left as an exercise for the reader.

Now, to directly address some common rebuttals:
Exercise is boring! - I thought that too.  If you’re finding it boring, you’re doing the wrong kind of exercise.  Running on a treadmill not working for you?  Run while watching TV, or run outside so you have things to look at.  Road biking got you down?  Get a mountain bike.  Most worries about boring exercise can be solved by sitting and actually thinking about third alternatives for 5 whole minutes.  I started to get into shape with a combination of rock climbing and miming.  I’d be willing to bet neither of those were in your first two options.  THINK OF A THIRD ALTERNATIVE.

Exercise is hard! - Yes.  Yes it is.  Sorry, but downsides exist to policies in complex systems.  I tend to get a positive feeling of accomplishment from doing difficult things, but your mileage may vary.  The benefits are still probably going to outweigh the cost of some willpower though.


Other things worth noting:
There’s already some pretty good material on optimal exercise out there, if you’re concerned with getting the most bang for your metaphorical buck.

As with any health-related-lifestyle-changes, your mileage may vary.  That’s not an excuse to give up after one day.  If the “this is hard” part goes for months, something’s probably up, but don’t reach that conclusion much earlier.

Another important thing to pay attention to is diet.  Not dieting, diet.  Exercise without eating healthy is like a high IQ without any conscientiousness.  It’s worth something, but you won’t get much done.  Finding a diet that works for you and sticking to it probably deserves its own post, but I’ll try to summarize a bit here:
Paleo and its variants seem to have very mixed results, though they match up pretty effectively with my understanding of human metabolism.  Eating a diet more similar in contents to what you’d find in the ancestral environment seems like a good heuristic, if not a perfect one. 

Conclusion:
Changing habits around physical activity is probably one of the simplest lifestyle changes you can make with really established benefits.  You’ll think more clearly, write better code, feel healthier, and almost definitely live longer.  Yes, it’s hard.  Do it anyway.  You won’t regret it.