Leon Pahole

How I stay healthy as a Software Engineer

15 minHealth

Written by Leon Pahole

Connect with me:

Cover image source: Denys Nevozhai

Post contents: A collection of tips, techniques, and practices that I follow to maintain a healthy lifestyle as a software engineer, improving my well-being, productivity, and happiness.

I love working as a software engineer. It’s fun, challenging, and it brings value to the world. Unfortunately, it can also be plagued by unhealthy practices, such as working long hours, experiencing too much stress, and ultimately burning out. This is something that I experienced first-hand 2 years ago.

It was the middle of the pandemic. I was managing multiple challenging projects, working in my dark room for 12 hours a day. I was not eating enough (but still somehow gained weight), did no exercise, and did not get enough sleep.

Eventually, I started experiencing trouble with breathing and increased heartbeat. At some point, I felt like I was suffocating, and I rushed to the ER, thinking I was having a heart attack.

While sitting in a waiting room full of other mask-wearing people, I was able to, for the first time in a while, zoom out of my situation and reflect on the way I’ve been living my life. I realized that I had to change something if I wanted to enjoy a long, happy, and prosperous life.

Benefits of being healthy

Fast-forward to today, I’m in a much better place. Not only am I healthier, but I’m also more productive and happier. I work for 8 hours per day, but I am able to accomplish more and with better quality, than when I worked 12 hours per day.

This is the power of being healthy - you wake up every day feeling energetic, being able to focus better, and in a better mood.

Not only does health improve well-being, but it also allows us to put out more quality work, faster. This is why I believe that health is the ultimate productivity hack!

How I stay healthy

Disclaimer: I’m not a doctor, this is not medical advice, it is just what works for me.

Being healthy is often made very complicated by the media, but in the end, it all boils down to sleeping enough, eating well, and exercising.

However, I prefer to think about health as a system with many small routines, which are individually not difficult to follow, but together they form a powerful system that keeps me healthy.

Another important thing to note is that I view health as a lifestyle rather than a temporary chore that must “get done”.

I believe that life is too short to spend doing things that we do not enjoy, and being healthy can be very tedious if we approach it the wrong way. This is why I don’t follow a strict plan, but rather set up routines that make sense to me at the time, adapting them when I no longer feel like I am enjoying them. With this approach, being healthy becomes really enjoyable!

Finding a suitable exercise routine

I used to do a lot of exercise - specifically, heavy weight-lifting and running. While it was quite impressive, I was doing it only because someone on the internet said that it was good for me. I was not enjoying it at all. Eventually, this led to me frequently skipping exercise.

As I wrote in the post How exercising less intensely helped me become healthier, I now do much less exercise, but I enjoy it a lot more. This happened because I reflected on my exercise routine and realized that I was spending almost 2 hours per day doing something that I did not enjoy.

I therefore switched it up to what I truly like doing - bodyweight training and biking. I also started going to the gym despite the fact that I had all the equipment at home - it’s the atmosphere of the people that are in the gym, working hard to reach their goals, that really puts me in a great mood and makes exercising even more fun.

The moral of the story is simple - find an exercise routine that you enjoy, and you will be much more likely to stick to it. Try to discard the advice of people who tell you that “X is the best exercise”, and just follow what your heart desires - whether that’s going to the gym, taking a walk along the river bank, dancing with your partner, or performing martial arts.

Doing the exercise that you enjoy is much better than doing the exercise that you don’t enjoy, even if the latter is more effective.

Stretching

A year ago, whenever I sat for more than an hour or walked for 15 minutes, I would start experiencing back pain. I always thought it was because I did heavy weight-lifting in the past, and I had an injured spine. Needless to say, I was dumbfounded after my spine X-ray came back clean.

After a few physiotherapy sessions, I realized that my back hurt because the muscles in my lower body were so tight that they were pulling my back into a rounded position!

To combat this, I started stretching every day for 10 minutes. I used the Starting to stretch routine as the basis, but I adapted some of the exercises to enjoy the routine more.

It only took a few weeks before I started noticing a difference. I was able to sit and walk for longer periods of time without feeling pain! Not only that, but stretching became a way for me to relax my mind - it became my meditation and the time of my day when I zoom out, reflecting on my day. I’ve actually solved many software problems while stretching!

I truly believe that stretching is one of the most important things that we can do for our health. Here are some tips to make it more fun:

  • Do it with a partner.
  • Listen to music or a podcast while stretching, or do it while watching TV.
  • Find a routine that you enjoy - there are many different ways to stretch, and you should find the one that you enjoy the most!

I should point out that stretching is not a one-time fix - it’s a lifestyle. If you stop stretching, your muscles will most likely tighten up again. This is why I recommend that you find a routine that you enjoy and is short enough so that you can stick to it for a long time.

Improving posture

It’s no secret that having a good sitting and standing posture is important for our spine health.

I’ve already written about the posture improvements that I undertook last year in the post My journey towards good sitting posture - steps I’ve taken so far. Over the course of this year, I’ve used the techniques described in the post to significantly increase the amount of time that I spend sitting and standing in a correct posture.

To summarize the post, I’ve made the following changes:

  • Elevated my screen using a laptop stand
  • Set up reminders to check my posture.
  • Started using an external keyboard.
  • Improved my typing technique so that I don’t have to look at the keyboard.

What I’ve noticed is that the correct posture has now been ingrained into my muscle memory. Whenever I am not sitting properly, my brain sends me signals that something is wrong and I can readjust myself without the need for an external reminder.

Using these techniques, I’ve improved my posture and cannot remember the last time I experienced back or neck pain!

Personal productivity system

Last year I started journaling. One thing I noticed as I reread some of the logs is that I was often experiencing stress, lack of sleep, and bad days whenever I had too much on my plate. This was the result of making too many promises to people, which I couldn’t deliver - at least not without overworking, sacrificing sleep and free time.

The interesting thing is that being overloaded with work was my fault - not the fault of the people who asked me to do things. I was the one who said “yes” to everything, not setting proper boundaries. This happened because whenever someone asked me if I could do something, I lacked the insight into what I already had promised to other people.

This is why I believe it is crucial that we have a system that allows us to keep track of all of our commitments. I use Todoist to keep track of all the tasks and plan them on a daily basis.

This system allows me not only to say “no” when I am close to my capacities, but also enables me to negotiate priorities by postponing certain tasks or reducing their scope in order to fit a more important task onto my schedule.

By keeping track of all of my commitments, I am able to avoid overworking, and am thus able to sleep enough and have plenty of free time to take care of my health. This leads to better health, better mood, and better quality of work.

Managing estimates

It’s not uncommon for software engineers (and other professionals) to underestimate the time it takes to complete a task.

This is unfortunate, because our managers and clients use our estimates to calculate the deadlines and budgets. If we underestimate, we are setting ourselves up for failure, and we will most likely have to overwork to meet the deadline.

There are three ways I approach this problem.

Padding estimates

I add 10% - 30% to my estimates, depending on the confidence I have in the estimate.

This makes it less likely that the estimate will be too low.

Tracking estimates and reflecting

I track my estimates and actual time spent on tasks.

This allows me to reflect on the estimate after the work is done, and see what I forgot to account for, in order to adjust my future estimates accordingly.

Honest communication

This way is the most important, but the hardest to do. It is to be honest with myself and the people I work with.

If, during development, I realize that the task is more complex than I anticipated and the estimate is too low, I share my concern with my manager.

This is incredibly difficult to do, because no one wants to be the bearer of bad news. And yet, it is very important, because it allows us to adjust the deadline and scope of the task, and thus avoid overworking or delivering bad quality results. It is good both for us and our clients.

When I worked as a project manager, I was incredibly thankful when developers informed me early enough that they would not able to meet the deadline. This allowed me to negotiate with the client to adjust the deadline or scope, and thus avoid overworking my team while managing expectations of my client.

Taking breaks

It’s important to set up regular breaks during our work. I find that standing up from the desk and taking a few steps helps solve problems faster, while allowing me to maintain focus for a longer period of time. A break is also the time when I can take a breath of fresh air and drink a sip of water, which can boost my well-being.

I use the Pomodoro technique to take regular breaks. I work for 25 minutes, and then take a 3-minute break. After 4 pomodoros, I take a longer break of 5 minutes. During the break, I do at least the following: stand up, make 50 steps, take a drink of water, and look out of the window.

Taking appropriate rest

It’s a well-known fact that time away from our work is important for us to recharge and be more productive. However, the amount of rest is not the only factor that matters - it’s also the type of rest that we engage in.

For instance, since I spend most of my time looking at the computer screen, it makes sense that video games are perhaps not the best way for me to rest. I recently read a great article called Recharge more effectively, which states the following:

If you work with your brain, rest with your hands. If you work with your hands, rest with your brain.

Do you spend your days analyzing data, coding websites, or writing articles? Consider a hobby like gardening, crocheting, or building elaborate lego sets. 👐

Do you work a more hands-on job like construction, woodworking, or barista-ing? Consider writing, reading, or solving crossword puzzles in your downtime. 🧠

I’ve found this to be very true. I used to watch YouTube videos to rest, but I found that I was still feeling tired after watching them.

I now spend my rest time walking, exercising, and playing the guitar. I find that all of these activities, despite the fact that they involve physical effort, make me feel rested and at peace.

Removing time-consuming distractions

Up until now, I discussed multiple ways to be healthier, among them exercising, stretching and actively resting. All of these activities require time, though. “I don’t have time” is probably the most common reason that people state when they are asked why they don’t spend more time taking care of their health.

I used to think the same way - I always told myself that I didn’t have time to exercise, stretch, rest, and so on. However, when I analyzed my typical day, I realized that I spent on average 2 hours scrolling through social media and news!

Now, there is nothing inherently wrong with scrolling social media - it can be a great way to rest, and as discussed in the previous chapter, rest is important. However, for me, social media was not rest - it was an addiction. In fact, I ended up more tired and mentally exhausted afterward.

I therefore decided to remove social media apps from my phone, as well as to block all sensational news websites. It was tough at the beginning, but it didn’t take long before the addiction was conquered and I suddenly had 2 hours per day more to exercise and actively rest!

Finding the right nutrition plan

I won’t pretend I know a lot about nutrition - this is something that I am planning to learn more about in 2024. However, what I do know is that listening to your body is very important when it comes to eating. Here is what I discovered about myself:

  • I get sleepy and tired when I eat large meals. This is why I eat multiple smaller meals throughout the day, rather than a few large ones.
  • I am able to avoid snacking and overeating if I eat a lot of vegetables.
  • Vegetables can be very delicious for me if I force myself to eat them for a few days. After that, I start craving them! This is how broccoli and Brussel sprouts became my favorite food.

I believe that the best way to find the right nutrition plan is to experiment with different things and see what works for you. Finding a professional to help you with this is also a great idea.

Frequently reflecting

In the beginning of this post, I mentioned that I was able to improve my health because I was zoomed out of my situation and reflected on my life. It was unfortunate that this moment had to happen in the emergency room, but I’ve realized that we often hurry through life, telling ourselves we are busy and in the weeds, never stopping to ask ourselves if we are driving in the right direction, or straight into a one-way street called Burnout.

Reflection is now something that I practice regularly. It’s not only useful to make sure that I am on the right track and enjoying what I’m doing, but it’s also a great way to celebrate my successes and be grateful for what I have.

Mixing it up

There are times when I realize that I am not enjoying my health routines anymore. It’s important that such concerns aren’t being ignored, because they can lead to sudden drop of motivation and quitting.

When I feel like I am not enjoying my routines anymore, I mix things up. For instance, I try a new stretching routine or switch biking with running.

Over time, I’ve realized that having a fixed health routine is impossible. The only constant is change, and it’s important to embrace it rather than be ashamed of it. Being honest and telling yourself “I’m not enjoying biking anymore” is how you can ensure that you will always find ways to enjoy being healthy by mixing things up.

Handling bad days

Following a health routine is not always easy. There are days when I am in a bad mood, tired, or stressed out. On such days, I often don’t feel like exercising, stretching, or doing any of the other things that I know are good for me.

Despite the fact that no one likes having such days, they are inevitable. I deal with them by viewing them as a challenge - a challenge to show up and do the things that I know are good for me, even though I don’t feel like doing them. By conquering a bad day, I establish strong self-confidence and bounce back.

On bad days, I also try to be kind to myself. I don’t force myself to do things that I don’t feel like doing. Instead, I try to find a way to enjoy the things that I know are good for me. For instance, if I don’t feel like biking, I will walk. If I don’t want to stretch for 15 minutes, I will do it only for 5 minutes.

Having a backup salvage plan that makes me do at least the bare minimum on a bad day is great for staying on track and perhaps even turning a bad day into a great one! In fact, some of my best days started off badly, but by showing up and doing the work, I gained confidence that turned a bad day into a really good one.

Conclusion

I hope that this post has inspired you to take care of your health. Remember that health is a lifestyle, and it’s important to find a way to be healthy that you enjoy. Experiment with different things, and you will find what works for you!