Cover image

Why Exercise Helps Me Code

June 22, 2021

β€’

2 min read

Every time I have been in a rut or found myself struggling to solve a problem, usually the last thing I want to do is to stop thinking about the problem. Sometimes I get obsessive, lose sleep and can barely focus on anything else. It's like I cannot move past GO until I get it sorted. 😫

To keep up with the sedentary lifestyle that is caused by programming, I like to train at least 3 times a week. Sometimes it's hard to get motivated to do physical exercise but I have found a good routine in which I force myself to get those workout sessions in.

What I have found, as a result of working out is that it does a few positive things for me:

  1. 🧠 It helps me clear my mind off the recursive cycle of thinking about the problem and hitting a roadblock.
  2. πŸƒ It gives me an escape from programming, mentally and physically away from the computer.
  3. 🀷 Sometimes the solution or the path to a solution comes to me while I work out. When it happens, it feels like magic and I can't wait to go back to the computer to implement what I have discovered.
  4. πŸ₯€ It gets my creative juices flowing. I quite literally have not only solved solutions mid-workout, but I have come up with new project ideas, new features for existing projects and new blog post ideas (including this one).
  5. πŸ€Έβ€β™‚οΈ Working out first thing in the morning, although expends energy, gives me more energy throughout the day to code.
  6. 😁 It gives my mood, mentality, metabolism and overall, my day a kick start. Being that physical exercise is probably the hardest thing i'll do all day, getting it out of the way in the morning makes everything else (including solving problems), a walk in the park.

I don't know the exact science behind what happens when I work out. I assume it has something to do with releasing endorphins which helps to cope with stress. All I know is stress and dwelling on one thing cloud my thoughts, and as a result, it holds me back from progressing. A good, high-intensity workout can help alleviate this, not to mention the health benefits gained. πŸ’ͺπŸ’ͺπŸ’ͺ.

Newsletter