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

Oldest comments (88)

Collapse
 
ben profile image
Ben Halpern

Thanks for a great post Ilona, super important subject.

Collapse
 
ilonacodes profile image
Ilona Codes

I am happy to share this experience with the dev community! 🙂

Collapse
 
thefern profile image
Fernando B 🚀

This reminds me, I've been working on a cheap alternative to stand up desk using 3d printer parts and 1in pvc. Will try to finish this soon, my weight has increased dramatically :(, I gotta shake this off. I'll make a post about it.

Collapse
 
ilonacodes profile image
Ilona Codes

Wow! I would be interested to read this post 😃

Collapse
 
ciaociao9 profile image
ciaociao9

Thanks for your great post. I know...I know...😥

Collapse
 
ilonacodes profile image
Ilona Codes

I am happy you liked it! Many thanks!

Collapse
 
justsharkie profile image
/*Sharkie*/

This is something we need to hear more often! Balance is SO IMPORTANT, from physical exercise, to diet, to sleep.

Sometimes I find myself falling into bad habits and have to give myself a kick. Immediately start feeling (and coding!) better again.

Collapse
 
ilonacodes profile image
Ilona Codes

Yeah, sometimes that happens to me too 😅In the end, we are all just humans.

Collapse
 
johnphamous profile image
John Pham

If you're interested in low carb, check out the keto direct subreddit! Tons of great info on there.

Collapse
 
ilonacodes profile image
Ilona Codes

I think the keto diet would be too strict for me 😅

Collapse
 
jmplourde profile image
Jean-Michel Plourde

What I do to stay fit:

  • Every 25 minutes (pomodoro session), I get up and stretch.
  • I alternate between sitting and standing desk positions (if the job/internship I have has one)
  • I go mountain biking on the weekends during summer

What I want to improve:

  • Going to the gym. I used to go there 3-4 a weeks and really enjoyed power lifting
  • Cut on carbs more. Not all a problem, but I can still improve.
  • Take a walk on my lunch breaks. Listening to podcasts instead of watching YT videos.
  • Learn a martial art. I only had some class during pre college and had fun since it's a nice all around discipline (physical and psychological)
Collapse
 
ilonacodes profile image
Ilona Codes

Thank you for sharing 🙏 I really like your upcoming plan very much!

Collapse
 
jmplourde profile image
Jean-Michel Plourde

Just today I went for a walk during lunch break. I had your post in mind and it inspired me to do better.

Collapse
 
ortegadan profile image
Dan Ortega

Thank you very much for this post... I appreciate it so much in my life..

Collapse
 
ilonacodes profile image
Ilona Codes

It's awesome that you enjoyed it! ☺️

Collapse
 
kenystev profile image
Kevin J. Estevez

Yeahh! I know I need to have a balance since lately I've been having little annoying headaches every day. Thanks for the post!

Collapse
 
ilonacodes profile image
Ilona Codes

I also have had annoying headaches mornings and evenings. That's why I understood that something should be changed in my life.

Collapse
 
adnanebrahimi profile image
Adnan Ebrahimi

Thank you for your great post. We must focus on our life balance before everything for to be ready for every challenges

Collapse
 
ilonacodes profile image
Ilona Codes

Exactly! 👋

Collapse
 
nyawning profile image
Nidal Ghonaim • Edited

I don't like to read articles much but this one was a joy to read. Specifically because if the way you presented your arguments. They were well supported with logical reasoning and not too critical of what we coders tend to get a bit defensive about 😅

Collapse
 
ilonacodes profile image
Ilona Codes

Thank you very much for the comment! It seems that I am lucky if you liked it 🙈