DEV Community

Cover image for 3 Healthy Habits for Programmers
Patrick God
Patrick God

Posted on • Originally published at programmergoals.com on

3 Healthy Habits for Programmers

New Year’s is over, your everyday life is back again, but what about your resolutions? Still working on them? Here are some habits that are more or less easy to build and that will definitely benefit your life – and this not only works for programmers.

Drink more water

There are lots of scientific reasons why you should drink more water. I’m sure you already heard a great part of them. Water helps your kidneys, it energizes your muscles, your skin might look better, heck, you might even lose weight when you drink more. That’s right. Less weight by drinking more.

Of course, all these facts are pleasing. But what’s most important to me, are the following experiences I made by myself. Drinking more water regularly makes me a better programmer.

Here’s why.

When I drink a glass of water every one or two hours, it keeps my body hydrated. This means my brain is also kept hydrated. Well, and as strange as it may sound, a hydrated brain helps to focus, memorize and remember stuff way better.

This leads to a better performance at my developer job and this, in turn, just makes me happier. I’m literally less annoyed by any task or bug I have to conquer. Isn’t it crazy how drinking a little bit more water can change your daily life?

If you’re using Slack at work, there’s even a nice way to remind you to drink a glass of water every now and then. Let me give you an example:

/remind me "It's time to drink some water!" at 9 am every day
/remind me "It's time to drink some water!" at 11 am every day
/remind me "It's time to drink some water!" at 1 pm every day
/remind me "It's time to drink some water!" at 3 pm every day
/remind me "It's time to drink some water!" at 5 pm every day
Enter fullscreen mode Exit fullscreen mode

Now every time Slack reminds you to drink, enjoy your glass of water and you might have added 1.5 liters to your body on that day. Trust me, you will feel and perform much better. But as always, consistency is key here. Do it not only for one day (though this can already show an effect). Try to do it for a whole week and look at the change.

Sleep 7 hours

Contrary to cool hackers’ belief, it’s not cool to sleep only four hours a night. I know that many may think that way and enjoy being a night owl, but in the long run, this will definitely not benefit your health.

You can read it anywhere. Managers that only sleep four hours and then do a 20-minute power nap during the day and they are so productive – without any other stuff that keeps them focused. And I’m not talking about coffee. Yeah, sure. Of course, there are exceptions. But for the most of us, it’s crucial to get a refreshing sleep.

Arianna Huffington calls it a sleep revolution, and I think she’s absolutely right. It is a revolution, because more and more people accept, that you need enough sleep to function properly.

And it’s not only about the sleep itself. It’s also about a pleasant evening routine, where you prepare your body to go to sleep. Dimmed lights, no electronic screens (except the e-ink ones maybe), no alcohol, and so on. Ideally, you’ll go to bed at the same time every day.

Such a routine executed over weeks or even months will improve your productivity and even your overall happiness drastically.

Excercise

Now that’s a habit that may be not that easy to build. But as I already have mentioned in my post about some ways to start getting physically fit, you don’t have to join the gym right at the beginning.

Start with something really easy for you. Regular exercise can already be a 30-minute walk around the block. Heck, start with ten minutes if that’s more realistic.

A goal for many fitness trackers or pedometer apps is to achieve 10.000 steps on one day. It’s just about walking 10.000 steps. Of course, that’s a lot when you’re just starting out. But hey, only have to walk a bit. I mean, nobody is asking you to run or even train for a marathon.

When you’re done with your job for the day, you might even don’t have to change your clothes. Just get out of the house and start walking. Doing it with a friend or your spouse is even more fun.

But the really funny part about this is, that even when you think you’re completely exhausted, a short walk can give you new energy. Try it!  

If you build these habits, it’s a great foundation for your body and mind. When you keep your body fit, awake and hydrated, you will be less stressed and come up with good ideas to finish your tasks faster and more elegant.

The post 3 Healthy Habits for Programmers appeared first on Programmer Goals.


But wait, there’s more!

Oldest comments (27)

Collapse
 
codemouse92 profile image
Jason C. McDonald

I have a bedtime of 10pm, and a wake time of 6am, which always gets me started on the right foot! I do highly recommend the early waking: it gives an opportunity to enjoy the slower-pace quiet of the morning, get in some personal time, a good breakfast, and maybe even go for a walk/jog before work.

Collapse
 
yokim profile image
Yokim Pillay

Yes! My work day starts at 6:30am, but I like to go to sleep at around 9pm-ish, then wake up at 4am. I feel so much better when I know I've got the upper hand on a day! Getting up early is such a vital tool, provided you're getting the right amount of sleep for optimal functioning.

Collapse
 
_patrickgod profile image
Patrick God

So true. Getting up early and having some kind of morning routine always boosts your mood and productivity for the whole day, provided you also go to bed early.

Collapse
 
nickreynke profile image
Nick • Edited

Totally agree with that. Do your thing in the morning and the rest of the day you feel productive because you already have done something.

Edit: Ever heard of "Miracle Morning"? :)

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Tip, recording streams at midnight are not good for sleeping habits.

But I'll continue to drink water on-screen to set a good example.

:)

Collapse
 
abintuttu_60 profile image
abintuttu_60 • Edited

d

Collapse
 
petarprok profile image
Petar Prokopenko

Nice article. I have similar habits. I drink a lot of water through the day, while my colleagues are drinking a lot of Coca cola. I tried to talk with them to drink less but no success. After my work day I tried to take about 1 -2 hours to just walk. It's so relaxing, refreshing and it helps clear my mind...

Collapse
 
shane325 profile image
Shane Barry

Great post. I would also add meditation to the list.

Collapse
 
nancyd profile image
Nancy Deschenes

I totally agree. The word "meditation" may scare some. It's meditation, prayer, or anything that can soothe your soul. For some, it can even be coloring, woodworking, or knitting.

Collapse
 
_patrickgod profile image
Patrick God

Absolutely!

Collapse
 
jfrankcarr profile image
Frank Carr

My advice is watch the carbs, especially those high in refined sugars. It's pretty easy to chow down on doughnuts and pastries, pizza, snack foods and so forth and guzzle down gallons of sweetened soft drinks. Sooner or later, you will probably start tipping the scales at an unhealthy weight. Add in lack of exercise and you'll get there even quicker.

Collapse
 
buinauskas profile image
Evaldas Buinauskas

Listen to this guy. Gym or regular exercising is important but having a balanced diet is crucial(diet isn't starving) to your health.

Eath carbs that are slowly digested in the morning, avoid added sugar and try to eat some fruits (just a few during the day), eat healthy fat such as peanuts, avocado, olive oil and in the evening try to eat food that has protein in it.

Collapse
 
nancyd profile image
Nancy Deschenes • Edited

Don't replace sweetened drinks with diet drinks, that's about just as bad.

EAT YOUR VEGETABLES! (even if some are a bit carby - your squash and beets are much better than your donuts and pretzels)

Collapse
 
cotcotcoder profile image
JeffD

A scientist affirmed that creativity comes from our long (7hours) night (the dreaming part) and reduce our sleep can reduce our creativity. I'm not sure about it but you can find some study about the subject.

Collapse
 
buinauskas profile image
Evaldas Buinauskas

Get yourself a dog to cure loneliness and you'll have regular exercise by walking your pup throughout the whole day.

Collapse
 
sebastiannielsen profile image
Sebastian-Nielsen • Edited

I recommend you keep a small bottle at your desk instead, this way you'll force yourself to get up more often to refill the bottle, and at the same time stay hydrated as well as getting a little exercise. 👍

Collapse
 
nancyd profile image
Nancy Deschenes

If you drink a whole gallon, you shouldn't have to worry about getting up often :)

Thread Thread
 
sebastiannielsen profile image
Sebastian-Nielsen

Haven't you heard about the negative effects of sitting for too long, it's important to get up and move every half hour or so.

Thread Thread
 
nancyd profile image
Nancy Deschenes

My point was that if you drink that much, you will need to get up pretty often.

Collapse
 
thejohnstew profile image
John Stewart

All good points. In regards to sleep, falling asleep and waking up at the right times is pretty important as well.

Check out sleepyti.me/! It will help you figure out those times based on the number of hours of sleep you want to get.

The main thing is you want to wake up in between sleep cycles not during one.

Collapse
 
rudistapelfeldt profile image
Rudi Stapelfeldt

I'm a Bodybuilder, so for me, this comes along with enough sleep, exercise (a lot), good food, enough water. Healthy body, healthy mind, right

Collapse
 
marcelmcz profile image
Marcel Ramon

When I started to exercise, having good sleep, eating healthier food and drink more water came in such a natural way. You're totally right

Collapse
 
srebella profile image
Santiago Rebella

daily exercise (30 min to 1h, can be workout at gym, going for a run) and meditation works for me(I user Headspace App, really good for clearing mind)

Collapse
 
ayooladaniel profile image
Ayoola Daniel

Thanks for this Mr. Patrick. I'll really love to try these out. Thanks a bunch, bunches!

Collapse
 
_patrickgod profile image
Patrick God

You're very welcome. I'm curious if they will work for you! :)

Collapse
 
satansly profile image
Omar Hussain

Nights are for sleeping and day is working. Naps are good.