6 Tips to Stay Healthy as a Programmer

Is physical health something you think about or take seriously? If it’s not, maybe it should be. My goal here is to help you realize the importance of taking care of your body and how it can improve your programming as well as your life.

I am not in a position to give you advice on exact healthcare, but rather to provide you with an outline of the common health issues faced by programmers, and how you can avoid those issues.

We all know that computer programmers, like us, spend a lot of time in front of computers. All of us face many health-related difficulties. It does not matter whether you are working on Python or Javascript. This does not only apply to programmers but to anyone that sits in front of a computer screen all day.

Sitting at a desk won’t kill you, but we all know that it isn’t as healthy as you might think. But, you can make some tiny changes with little effort to become a healthy programmer. In this article, I want to share a few tips that can help you.

1. Always Keep Good Posture

We programmers work most of our time sitting on a chair and coding. Sitting at a desk for long periods isn’t healthy for a variety of reasons. By the way, if you are doing work by sitting on your bed, it’s even worse.

It’s important to be conscious about your posture even if your office provides comfortable, ergonomic chairs and desks. We don’t usually care about it when we are young. But, back pain and other chronic injuries are very commonly seen even among young programmers.

Sitting in an office chair for a long time increases stress in the back, shoulders, arms, and legs, and in particular, can add large amounts of pressure to the back muscles and spinal discs [Source].

Sitting work is straining for your lower back. One thing you need to do is to sit well behind your computer; at 90-degree angles, adjusted heights, and straight as possible.

When you do work while sitting, the metabolic rate is low, and your body will burn fewer calories. Some people address this issue by using a standing desk. A standing desk or stand-up desk is a desk conceived for writing or reading while standing up or while sitting on a high stool.

But, even without that, you can do some little things to improve your health. Take regular breaks while doing the work and stand for a few minutes. Stretching your legs and standing for a few minutes will improve your metabolic rate.

Try to work for 20-30 minutes, and then take a minute or two to get up, walk around, relax your arms, and relax your mind. This will improve your health as well as your productivity. Sitting in front of a computer for hours and hours every day without moving is not healthy for your body and your work.

If you are a freelancer working from home, then you need to use a table and a proper chair. Do not do your work by sitting on the bed. You should get a chair which will help you to be in the right posture to do your work.

We are living in a sedentary world, and people like us who are programmers are the most affected by this. So, sit with the right posture and take care of your body.

2. Strain Your Brain, Not Your Eyes

We use screens for just about everything: to work, to relax, or to keep up with daily life. Generally, we blink our eyes about 15-20 times a minute. That spreads tears evenly over your eyes, which keeps them from getting dry and irritated.

But people blink less than half as often when they’re looking at a computer screen or any other screen. I want you to try out an experiment to prove this.

When your friend is watching his mobile screen or computer screen, take a look at his eyes. You would probably see that his/her eyes rarely blink. I’m sure that the frequency of the blinking of eyes might be less than normal.

You don’t have to cut out all screen time. But a few changes to how you use your devices can be easier on your eyes. Every 20 minutes, take a small pause. Look at an object which is at least 20 feet away, for 20 seconds. Also, try to blink your eyes during this break.

Make sure the lighting in the room that you are in is bright enough. You don’t want your device to be brighter than the surroundings. Stop all forms of working or screen time, two hours before going to bed. You will get way more from these two hours in the morning. [Source]

I felt a lot of strain when I was using mobile phones on the bed before going to sleep at night. Then I realized that I should avoid this. Now, I put the lights on if I’m using mobile phones on the bed.

Staring at computer monitors all day exposes us to really unhealthy amounts of blue light. Unfortunately, our eyes are poor at blocking it out. If you’re the kind of person who stays in front of a monitor for a long time, then use a computer glass to avoid the blue rays.

I was looking for the right glass to do this, and that’s when I found out a good computer glass which was recommended by John Sonmez, the famous software developer. So, I would highly recommend this to you as well. Take a look at this product on Amazon.

Also, it is necessary to get regular eye exams. You might need to use a different pair of glasses when you’re working on a computer. Check with a specialist doctor often to keep your eyes healthy.

3. Coffee can’t Solve Your Problems!

Programmers love coffee. There are even programming languages named after coffee. Many programmers misuse coffee as a form of fuel during the day. Some choose coffee or tea, while others prefer energy drinks. I know a few of them, and they have a lot of justifications to tell me for doing that.

Even though most energy drinks are high in calories, caffeine itself doesn’t contain any calories. It interacts directly with your central nervous system and blocks the essential spaces that your neurochemical signals need to get through and do their job.

Once the caffeine high wears off, you’re left feeling tired and depleted. So they drink more and more. People that consume caffeine regularly want it to do their work properly. They often become addicted to it.

It is all too easy to relapse into drinking coffee when you need that bit of extra energy. While there’s nothing wrong with caffeine, it can seriously mess with your metabolism if misused. 

I’m a big admirer of John Sonmez. He always says that his favorite beverage or drink is none other than water. I also try to avoid coffee and other artificial drinks as much as possible. It may not be as exciting as sugary or caffeinated beverages, but drinking water is the very best thing you can do for your health.

I would like to suggest you drink more water, not coffee. This will help you a lot to become more healthy and refreshed for the long term. Don’t drink only when you are thirsty, have a nice little bottle with you the whole day, this will encourage you to drink more.

Also, try to cut out sugar as much as possible. Sugar makes you fat, sick, and it makes you want more sugar. Don’t eat too much, and avoid desserts and processed food. Eating slowly will improve your digestion, and you will eat only the food you need.

4. Don’t Get Worked Up, Work Out!

You hear this a lot. I don’t need to tell you about the importance of exercising and working out. You already know all that stuff. But what you probably don’t have is the discipline to work out daily.

There are thousands of reasons you can have to avoid going to the gym. You might be saying that I’m too busy with work, and I will go to the gym when I’m free. And you will never go become free. You know what? Someone way too busier than you are already working out right now. Even Gary Vee works out regularly. I don’t think you’re hustling than him.

Our body is not made to remain in front of a desk all day long. Our body needs movements. All I want to say is, you need to find some time to do some physical exercise. Join a Gym that is close to your workplace, so that you don’t have excuses not to go. Otherwise, get up early and go for a run or a walk. It is so refreshing.

I thought going for a run in the morning would make me tired, and I would feel sleepy for the remaining day. But that is not the case. When I went to Calicut to do my final year project, I decided to try this since there was a ground near my hostel, and many people were working out daily.

I was lazy at first. But when I tried this, it made my days more refreshing and longer. I felt more energy while doing other works. So, give it a try. It will change your life.

If you’re a procrastinator, one tip I can give you is, go and find a partner. If you have a friend to go for a run along with you, you will not feel much laziness. Even if you feel lazy, you can’t easily stay on your bed for some more time because you already promised your partner that you will be there at a particular time.

Even if you’re alone, do it by making your workout as fun as you can. Plugin your earphones and listen to your favorite music, podcast, or audiobook. I like podcasts since they are informative and short. You’ll learn a lot even while you’re working out.

When you go out for your lunch, try to go to a restaurant which is at a long distance. Your body will get some amount of physical exercise by doing this.

At the company I’m working in, the cafeteria is a long distance away from the office building. They purposely made it that way so that the employees get more physical activities done if they want to eat something. So, walk some distance before you eat out.

5. Good Sleep Solves the Bugs

A good night’s sleep is just as important as regular exercise and a healthy diet. Poor sleep has immediate and negative effects on your hormones, exercise performance, and brain function.

Not having enough sleep has a devastating effect on your ability to think. We are programmers, and we need a lot of logical thinking. Hence, it is essential to sleep well so that you can be more creative during your work.

Sleeping recharges your energy and makes you less stressed and more productive. It is necessary to get yourself a good sleep routine with 8+ hours of sleep. I’m not the right person to give you this tip. I usually don’t sleep well. But, I’m trying to get it right.

While burning the midnight oil may be good seldom and is something that won’t kill you, it will screw up your health if you’re not careful. Don’t make it a habit.

You will be more productive if you can replace 2 hours of work at midnight with that in the morning. Sleep is something that your body needs to recover from the previous day and stay fit. The body uses sleep to reboot the human CPU, which is your brain, and repair any damage you incurred during the day.

Exposure to blue light (which smartphones and computers emit in large amounts) during the night is harmful to your sleep. This is due to its impact on your circadian rhythm, fooling your brain into believing it is still daytime. This reduces hormones like melatonin, which helps you relax and get deep sleep.

So try to sleep early and wake up early. Stop all forms of screen time, at least an hour before going to bed. This can help you sleep early.

Good sleep significantly boosts your focus during the day, improves your immune system, and even enhances your memory. It can help you eat less, exercise better, and be healthier.

6. Sometimes, You Need to Hit Refresh

Social media has a lot of amazing possibilities and powers. They allow us to be connected with the whole world wherever we go. Sometimes, it would be great if you put your computer aside, turn off your phone, and disconnect from social media.

Internet and Social Media are great. They give us endless possibilities and opportunities. If you are a consumer of social media, stop consuming, and start producing something valuable to the world. Remember the 80:20 rule. You need to produce 80% and consume 20%. Unfortunately, most of the programmers consume 90% or more.

So, even if you’re using social media and the Internet, use it for your development. Leverage maximum value from it and give value to others.

Also, even if you’re a producer, a great programmer, turn off your electronic devices at times and take some rest. When you come back to work after the break, you will feel a lot more productive as well as creative.


I’m neither a doctor nor a medical person. But I just wanted to share these tips to help you as far as I can. I’m not an expert in health. But, I want to tell you these things from the perspective of a regular person, a programmer like you.

Feel free to correct me if I’m wrong. If you got some value from this article, let me know in the comments section down below. Also, type in your queries and doubts. I would be happy to respond.

I would appreciate it if you would be willing to share it. It will encourage me to create more helpful articles and bring value to the programming community.

Happy and healthy coding!

Ashwin Joy

I'm the face behind Pythonista Planet. I learned my first programming language back in 2015. Ever since then, I've been learning programming and immersing myself in technology. On this site, I share everything that I've learned about computer programming.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts