DEV Community

Cover image for How to Stay Fit Physically and Mentally and Keep Coding
Ilona Codes
Ilona Codes

Posted on

How to Stay Fit Physically and Mentally and Keep Coding

Throughout the last year, I have worked part-time as a working student and also studied at the university. I was not the first and not the last one who has combined that during their studies, but the problem for me was, that at the end of the day I have felt absolutely exhausted mentally and physically. That caused problems with my health and motivation to continue working on my goals or anything. (yeah, “goals,” I wish I had something more specific at that time).

Those “signals” showed that I am doing something wrong with my life and it cannot go on like this anymore. I understood that I need changes.

- What kind of changes?
That will help me to balance my life and bring my thoughts in order.

- Who do they depend on?
Everything depends on me, my decisions, and actions.

- How can I cause them?
By following the next action items:

1. Daily physical exercise

In my situation then anything would be useful (even just a short walk). The key is to remember to get out of your chair and move. And I know, that’s the biggest challenge. It’s great if you recognize that you need to move during your breaks. First I did manage to get out and walk at lunch about 15 minutes, and now I continue doing that too with adding cardio (20 min.) and yoga (20 min) in the evening in my daily routine.

2. Low carb diet

First and foremost, we have a “sitting” job (just like more and more people these days, most of the knowledge workers these days, etc.). So, when it comes to our diet, we need to reduce carbohydrates because eating them increases the sugar level in our blood. Sugar gives energy, but it’s processed by our bodies just too quickly. In such a short time, the spike is created, and the body regulates it by injecting insulin to the blood, and that removes the sugar from the blood and makes us sleepy very quickly. So, we developers cannot be productive anymore and wishing for a nap during the working day. And the “quick fix” is to eat more sugar and get out of form even more.

3. Get a sufficient amount of sleep

Programmers who sleep less and code more eventually burn out.

Now I am working as a software engineer, busy with blogging, studying new things that are not related to my profession after work, doing that daily workout, and actually, I guess, I need more time to sleep than 7-8 hours per day, so recently I sleep around 9-10 hours. Nevertheless, 7-8 hours per night is ideal for most adults.

As the work routine in IT industry involves much of mental exertion and less physical exhaustion, it’s possible to manage even with less sleep in case the person feels mentally fresh. However, it’s crucial to strike a balance between the number of hours spent awake vs. asleep.

4. Non-programming activity

Many software developers consider programming as a hobby first. And also trying to keep up-to-date with the latest technologies and the newest advances in the field is also essential for pursuing a career in the IT industry.

In fact, in terms of mental processing, the job is much more similar to a lawyer or doctor than anything else.

Becasue of this intensity, it is an excellent idea to have something different to do as a hobby.

At work, we are continuously interacting with lots of other people. Lots of backgrounds. It’s essential to be able to chat with a wide range of people about ‘normal non-work stuff’ at work. And to be able to talk at different levels to many different disciplines or topics.

In this case, having a hobby will help us to become a more rounded person and get along with a wide range of people at work much easier.

5. The psychological trick to staying fit with hard questions

Usually, we’re trying to avoid tough questions, because we’re not sure how to answer them and to where even start. Questions like: “What is my long-term goal?” “Why do I like doing this?” “Why am I feeling like this?” and so on.

Taking the time to think about these questions and finding your answers will allow you to value your own physical and mental health much more, and you’ll be able to take care of yourself better.

There tend to be more mental tricks which are so simple, that it’s almost a crime that you aren’t using them every day.

If you want to learn more about the psychological hacks, how and where they can be applied, then you can find them in my weekly newsletter, along with your FREE Professional Networking Cheat Sheet.

Thank you for reading! 🙏

If you have any thoughts on this post, feel free to reach out to me on Twitter, and leave comments below.

Cheers,
ilonacodes


Photo by Artem Beliaikin from Pexels

Latest comments (88)

Collapse
 
lenarunner profile image
Lena Runner

You mention many important things here, thank you. I would add some extension to the 5th point. Self-reflection is one of the things that we often forgot about, even if a possibility to use it is always with us! Some years ago I decided to leave my old attitude to always do everything for everyone (of course ASAP ;)) and started working smarter instead of working harder. One of the 'friends' I met then is still with me - kanbantool.com and looking at this very simple tool reminds me about what is really important. It wasn't an easy way to feel better with myself but it was totally worth it! More, I also started to pay more attention to sleep enough. It is so important!

Collapse
 
_hs_ profile image
HS

On average women need more sleep than men. That said I still disagree with the sleep thing in terms of quantity. A lot of people that did something, made something, geniuses, slept less than 7 hours. As in other things I think quality is not the quantity even in sleep.

Collapse
 
osde8info profile image
Clive Da

try a stand up desk :)

Collapse
 
sudogetbeer profile image
Lars

Wow cool to see someone here that went to the same university as I.

Manchmal ist die Welt echt ein Dorf.

Cool tips btw ;)

Collapse
 
manorajrdg profile image
manorajk

Great one!! Adding to those 5 things, the sixth one which I feel important is to 'Plan your day'.

Collapse
 
drdomski profile image
drdomski

I’m lucky enough to work from home most day’s, and have been doing so for the last 17 years. In the early years I made the mistake of letting the fact that I was at home lead me into working more and more, sometimes at ridiculous times. When I found myself getting out of bed at 2am to do an hour of work before going back to bed, I knew I had a problem.

After many experiments I now have a general schedule that I try to follow, which works for me and keeps me productive, fit and sane.

First hour, catch up on email, admin, calls etc. The rest of the morning is for work, either dev, design, project management. I try and work in bursts, around specific tasks, similar to pommodoro. I don’t impose time limits on the bursts, but at the end of each I will get up, walk around, make a drink. Or if a task has taken just a few minutes, I will check the news, read a blog. My aim is to reset my mind by thinking about or doing something else for a few minutes, before I embark on the next task.

I don’t take a scheduled lunch hour, but usually after 3-4 hours I will stop and take the dog for a walk for 45 mins or so and then have a light quick lunch.

When I restart work, I will take typically take 15-30 mins to catch up on emails, calls and then work the rest of the day.

My working day will normally start at 9am, but sometimes earlier, sometimes later. Generally I work an 8 hour day, Monday to Friday and I don’t work outside of those times, ever. In terms of output, a 40 hour week will give me about 30 hours of quality billable development, which I think is an acceptable return, and another 10 hours to run the business. Where I’m working with colleagues on projects I wouldn’t expect more than 30 hours of output per week.

This compares to other times over the years when I’ve naively worked 70-90 hour weeks and probably lucky to be 50% productive, with the quality of the output at sometimes questionable.

Outside of work, I have a hobby which has nothing to do with programming, and I try to go to the gym 3 times a week.

I am lucky in that I get to define my working environment but I know from experience that a disciplined, structured approach is vital. Currently I would say my work life balance is about the best it’s ever been.

Collapse
 
douglasfugazi profile image
Douglas Fugazi

Thanks for sharing theses insights. I will try apply some them.

Collapse
 
maestromac profile image
Mac Siri

Great Post!

Collapse
 
aarondrs profile image
Aaron Rodríguez • Edited

Calisthenics worked for me, I started on January. It has been a great decision!

Besides the fact to double check what you eat.

Collapse
 
chuksjoe profile image
Chukwunonso Orjiakor

Well thought out points on how to improve our mental and physical health. I still have much work to be done, mostly in the sleep aspect.
Thanks so much Ilona for sharing.

Collapse
 
insign profile image
Hélio oliveira

Thank you for writing. Note a typo in "becasue" in item 4.

Collapse
 
toddcoulson profile image
Todd Coulson

Great post. This is a topic that is not talked about enough among coders. I am thankful I got into running before I ever started coding. 9 marathons later, still going strong.

Collapse
 
ilonacodes profile image
Ilona Codes

You are right, usually most of the time we focus on code and have conversations/discussions about it at work.
Wow! 9 marathons! It's amazing 😃
I wish I got into sport before coding too 😅

Collapse
 
toddcoulson profile image
Todd Coulson

Never too late to start. Don't focus on the 9 or even the marathon part. Find a sport you love to do, and it will stay with you forever. The problem most people have is "I have to go to the gym" syndrome. They hate it, it doesn't become routine, it is a chore. Don't make exercise a chore.

Collapse
 
micazev profile image
Michelle Azevedo

thanks for bringing this topic! :)

Collapse
 
ilonacodes profile image
Ilona Codes

Welcome! 🙂

Collapse
 
filipecsoares profile image
Filipe

Great Post!! Thank you to sharing :)

Collapse
 
ilonacodes profile image
Ilona Codes

Thank you for reading and always welcome! 😊

Collapse
 
patsullivan6 profile image
Patrick Sullivan

Such an essential post to read.

I tend to focus heavily on a non-programming activity and physical fitness. I've got to have a creative outlet in my free time. I love anything that has to do with music composition and production. It's a nice meld of creative and technical skills.

I truly think proper sleep and proper hydration can ultimately lead to a more balanced and healthier lifestyle. If you pictured yourself as a plant, would you be wilting?