My three tips for maintaining fitness and a healthy lifestyle as a software developer
Ben Halpern Jun 14 '17
We all know the benefits of physical fitness on our lives. But despite how much we know about the need to stay fit, I've found that us software developer types are often able to play forty-dimensional logical chess with ourselves in order to always find reasons to not get to the gym. The bottom line is that getting to the gym can be easier said than done when so much of our focus is wrapped up in our terminals. With this in mind, my tips are not centralized around specific routines for physical fitness. They are, instead, a few psychological games I play in order to align my interests in improving code with improving fitness while giving myself the best chance at following through with good habits.
It is about the mind, not the body
This is my best tip for getting to the gym. As a software developer who is very focused on improving my code and improving my skills within this domain, it's too easy to drop priorities like taking care of my body. If I'm trying to get to the gym because over time, my body will be better off, it is way too easy to find a reason not to go. If the focus of my exercise is to help my mind right now, I'm excited to go. The benefits of exercise on the brain are too many to list. Seriously... after I get to the gym, my code is amazing and I can stay focused without burning out. When this is my mindset, I am able to get to the gym consistently and any body benefits are a natural bonus.
Focus on the mind over the body is also a great way to make small requests about exercise during one's day. Depending on your working situation, you may or may not have freedom to sneak in a bit of light exercise without consent from someone. If your reasoning is that it is critical for your mental flow and that you'll write way better code with the freedom of going for a brisk walk mid-day or even a pre-lunch workout, this will play better than if it's just about your personal fitness.
If this, then that approach to healthy habits
The focus on mind is a great way to align professional goals with fitness goals, but creating good habits is always an uphill battle. One technique I have adopted is an
If this, then that approach. That means that I use cues that would lead to bad habits and create rules where I replace them with good habits. What I mean is that if I'm feeling frustrated, in a rut, lonely, etc. I use that as a cue to do a bit of exercise. That could mean "go to the gym", "go for a walk", "do some stretching in place", or whatever is within reach at the moment. I can't beat bad habits every time, but making it a simple rule where I can catch myself and then have an answer pre-defined for the situation, it is much easier to follow through on good habits.
Podcasts and audiobooks
This is kind of a bonus tip, as I think the first two are the more important.
To build on the first point about aligning intellectual/professional goals with fitness goals, audio is a great format for learning and advancing while still getting exercise. If the weather is nice, I can get engulfed in a semi-technical audiobook like Tim Berners-Lee's account of creating the World Wide Web and I feel like I'm learning a lot while also staying fit. I fondly remember learning a lot about ReactJs when it was first coming out by popping in some podcasts while at the gym. I think it's possible to burn out on this kind of stuff, so try to let your brain step away from the code as well if possible!
I hope these tips were helpful for you. Standing desks and other office tools probably help as well, but they are not the answer by any means. In my experience, it's about finding the right mindset, acknowledging bad habits and tendencies, and aligning yourself for simpler versions of success.
This all comes after a couple years of poor attention to fitness on my part, so time will tell if I am able to keep up with this, but so far I am loving this pattern for personal fitness. I hope this finds you well.