Being a great developer is not just about writing great code. There are certain habits I’ve discovered that are beneficial to your work and your life as well.

Habits are basically the parts of our lives that make up our daily routines. Once established, they are the most powerful tools we have to change our lives.

In this article I share the five essential habits that I believe will most benefit your work as a developer. But these habits won't just help your coding skills – they will also improve your life and make you happier and healthier.

At the end there's an extra tip for you as a little nugget. So make sure to read to the end.

Habit #1 – Eat Healthy Food

dan-gold-4_jhDO54BYg-unsplash
Photo by Dan Gold on Unsplash

Programming can be a very intensive task, especially for your brain. Your body can only work with the nutrients you are eating. If the input is bad, you can’t expect a great output, right?

A race car, for example, doesn’t take in water. It’s fueled up the gas that helps that car work as efficiently as possible. The same goes for yourself. If you want to perform better and work more efficiently, you have to put the right things in your body.

What is healthy food?

But what does it actually mean to eat “healthier”? I’ve learned a lot about good nutrition over the last two years, and I've tried out many methods myself. When I started eating right, I felt a huge improvement in my life and my work as a programmer.

I’m not a nutritionist, but you can consider the following advice as tips from my own experience and knowledge.

  • Decrease your sugar intake
  • Drink water instead of soda
  • Eat just a small amount of sweets per day
  • When eating fruits, focus more on low-sugar fruits like berries, kiwi, apricot or coconut (and many more)
  • Take sweetener alternatives like Erythrit
  • Follow a balanced diet
  • Eat whole grains like brown rice, buckwheat, quinoa, bulgur, millet and oats (complex carbohydrates)
  • Get plenty of legumes like lentils, kidney beans, green peas, chickpeas and soybeans
  • Go for healthy nuts like almonds, pistachios, walnuts, cashews and peanuts
  • Eat lots of vegetables (preferably cruciferous vegetables) like broccoli, brussels sprouts, kale, cabbage, cauliflower and turnips
  • Eat seeds like chia seeds, hemp seeds, flax seeds, pumpkin seeds and sesame seeds (they're great on top of your dishes)
  • Get your “healthy” fats from fish, algae, and the nuts/seeds mentioned above
  • Minimize your meat intake to around 70g per day (I’d suggest to do your own further research on it because I don’t eat meat)
  • Eat the most carbohydrates in the morning
  • Your lightest meal should be at least three hours before you go to sleep

There are many different diets out there and most of them are completely useless in my opinion, since they just seem to try to pull money out of your pocket.

You don’t have to turn vegan like I did, but from my research and talks to doctors, following a mediterranean diet is what’s recommended most of the time. You can read more about it in this article.

If you really want to get serious about it, I’d suggest that you book an appointment with a nutritionist or any other professional in that field. They can help you set up your meal plans and advise you on how to make healthy choices.

Habit #2 – Do Plenty of Physical Activity and Stretching

alora-griffiths-WX7FSaiYxK8-unsplash
Photo by Alora Griffiths on Unsplash

We all know it. As programmers we might sit for 8 to 10 hours a day which causes our backs to ache and generally can make us feel unbalanced.

Physical activity like running, working out with weights, or doing some form of sports will not only improve our physical health but our mental health as well.

Why is physical activity important?

Being physically active is one of the most important factors that helps me perform on a high level as a programmer. It helps relieve stress, clears my mind, and strengthens my body.

Physical activity also helps protect you against many chronic diseases and improves your brain function – which is of course very important as a programmer.

Another great benefit is that it can help you control your weight. So when following a healthier diet and being physically active on a regular basis, you less likely to worry about your weight.

I love to run in the morning on an empty stomach because it gets my blood running and sets my energy for the day. It can be hard, especially when I don’t feel like it – but once I'm done, I know that I’ve already conquered the hardest part of the day right at the beginning.

This forms a strong mindset and loads me with energy. It’s also very beneficial because your body takes the energy it needs from your fat reserves which leads to fat burning.

Why stretching matters, too

Doing regular physical activity is great, but it's only half of the picture. The other half is all about stretching your body.

Stretching helps you improve your flexibility and posture. It also helps ease your pain after sitting all day in front of a computer. Varying your working position from sitting to standing is also a great way to move your body in different ways.

Stretching can also be very beneficial to other areas of your life. It releases tension and therefore reduces your stress levels. It also helps you calm your mind and increase your energy.

Don’t skip the stretching in the morning or in the evening. Your body and your mind will thank you. This video used to help me out a lot.

Habit #3 – Develop Proper Stress Management Techniques

hans-vivek-UiMkBvDQSAA-unsplash
Photo by Hans Vivek on Unsplash

Our lives as developers can be very hectic and stressful. So it’s very important that we integrate at least one way of relieving stress into our routines.

As we’ve seen above, being physically active and stretching daily can help us relieve a lot of stress. But there are more ways you should consider.

Good stress vs bad stress

But is stress bad in general? Basically it’s a warning system which produces the fight-or-flight response. There are both beneficial and harmful parts about it.

In small doses, stress can help you meet daily challenges and motivate yourself to reach your goals. It can also boost your memory and can help you to accomplish tasks more efficiently.

Too much stress, on the other hand, can cause serious health issues. It can weaken your immune system and can cause high blood pressure, depression, and anxiety.

Some of the most important signals of too much stress are an inability to concentrate, body aches, headaches, appetite changes and getting sick more often. Another very common signal is if you can’t sleep properly anymore and can't turn your mind off.

In my opinion, this bad stress isn’t something you have, it’s something you create for yourself. It’s always a sign that you are thinking about the future and feel anxious about it. Maybe you can’t meet a deadline or you’re thinking about what your boss will do when you’re doing a “bad” job. You feel your heart beating and it begins to take over you.

How to manage your stress

Breathing exercises are one of the best ways to calm your mind, to relieve stress, and help you to be more aware of yourself.

In stressful situations we begin to breath faster which will cause stress in our body. There’s also a thing called screen apnea which means we tend to stop breathing when looking at our screens. You can imagine that this can't be healthy at all!

With breathing exercises you can train yourself to breathe slowly even in stressful situations. Compare it with a cup of tea. Every day you’re filling up the cup with stressful or hectic situations. With relaxing breathing exercises like meditation, tai-chi, qi-gong or diaphragmatic breathing you empty the cup again.

Imagine what happens with the cup and with yourself when you don’t empty it every day and pour more and more tea into it.

If you don’t have any experience with meditation and the like, I can highly recommend that you start with an app like “headspace” or “calm”. They offer guided meditations that are very friendly for beginners. You can also visit a tai-chi group in your area or join a meditation group.

These practices don’t only help you relieve stress, they also train you to be more in the moment and to control your thoughts. You will learn to let the thoughts come and go. And it'll feel like 500 pounds has fallen off your shoulders. You'll also improve your ability to concentrate even better at your job.

Habit #4 – Maintain a Beginner’s Mindset

brett-jordan-E1por_SGvJE-unsplash
Photo by Brett Jordan on Unsplash

Do you remember the first time you wrote code or explored the universe of computer science? Can you still feel that excitement that kicked in?

Think back to the beginning

I can still remember how I felt and what it did to me when I discovered coding. It was like tapping into a top secret. Computer Science and especially programming was like magic for me. Those people who were able to write code were like superheroes from my perspective.

Once I took my first steps in writing code myself, I remember feeling like “Holy crap, this will be my thing”. I wanted to learn it all, even though I knew that wasn't possible.

I knew that I was still at the beginning of my journey and I was really open to learning a lot of different things. It was okay for me to not be good at it, but I knew the more I sat down and learned, the better I would become.

I accepted my beginner level and the more I learned, the more I recognized how much I wanted to learn.

Be a beginner again

That’s what I consider to be a beginner's mindset. Looking through the eyes of a beginner who seeks out new stuff to learn and accepts that there is still a ton out there to learn. They still have this excitement to explore more and more.

Maintaining this mindset and recognizing that mistakes are opportunities to learn new skills is key to progress as a developer. Don’t shy away from new challenges, even if you have twenty years of experience.

Habit #5 – Get Enough Sleep and Take Breaks

adi-goldstein-yVdN3xagPQk-unsplash
Photo by Adi Goldstein on Unsplash

Taking breaks and making sure to get enough sleep are probably two of the most important factors to help you perform consistently at a high level.

Like batteries, our body and mind need to rest properly to recharge. Since programming can be intense and mentally taxing, taking breaks and sleeping enough is even more important.

Of course, I’m not a doctor or an expert in the medical field. But I love to share with you what I've found and what I've experienced while experimenting with my sleep routine. If you’ve got serious issues with your sleep and health, think about consulting an expert.

The negative effects of not enough sleep

There are many negative effects on our bodies when we don’t sleep enough. It can lead to memory issues because during sleep our brain forms connections that help us process and remember new information.

One of our most important skills is also in danger when we don't sleep enough. We can develop trouble thinking and concentrating. When we don’t get enough rest our problem-solving skills and concentration are negatively affected. So pulling all-nighter after all-nighter might seem efficient first, but can really damage your long term programming skills.

There are many other negative effects like mood changes, weakened immunity, high blood pressure, risk for diabetes, weight gain, risk of heart disease and a low sex drive. Sleep is as essential as water and air for our bodies.

How much sleep is enough?

But what exactly does enough sleep mean? There are different opinions about that topic and I’d suggest finding your own sweet spot. You can test different amounts like six, seven, or eight hours and track your energy levels during your day.

My own sweet spot is in between seven and eight hours. Sleeping less than seven hours sometimes is okay for me but over a longer time I feel that my energy levels go down. On the other side when I sleep more than eight hours it’s also not beneficial for my energy levels after some time.

There are some tricks to help you establish a healthy sleep routine, like avoiding daytime naps, not drinking caffeine a few hours prior to bedtime, going to bed and waking up at the same time (even on weekends!), doing relaxing activities an hour before going to bed like mediations, and not using electronic devices before sleep.

Why taking breaks is important

The same goes for taking breaks during your work time. I normally take a quick break once I get the feeling that I can’t concentrate properly anymore.

The break doesn’t have to be huge. Throwing some darts on my dart board, going for a quick walk with the dog, running for 30 minutes or just standing up, having a good stretch, and making new coffee or tea are some chances to get a little break.

Most of the time I find the solutions for problems I was thinking about for one hour straight during those breaks. Taking me out of that “black hole” does wonders.

Some productivity systems like the pomodoro technique can also help you to establish a routine of taking breaks. You can set a timer for twenty minutes where you’re doing concentrated work, and after that you take a five minute break. That’s one pomodoro. After three or four pomodoros you take a longer break of thirty minutes.

But you can just set up a timer to remind you every hour to take a break of around ten minutes, for example. As always, try different things out and stick to what works best for you.

How to Form Habits

aman-upadhyay-JAgokV30kGk-unsplash
Photo by Aman Upadhyay on Unsplash

If you want to learn more about building habits that last forever, I highly encourage you to read “Atomic Habits” from James Clear. If you’ve already read it and are still struggling with building your habits, read it again. He basically structures the process of successfully building habits into four laws.

Habit forming law #1 – Make it obvious

The first law is to make it obvious. Point out triggers that remind or force you to do the new habit.

For example if you want to work out in the morning, pack your bag the evening before and place it along with your outfit at your door. The first thing that you see in the morning is your stuff for working out.

Habit forming law #2 – Make it attractive

The second law is to make it attractive. Combine a habit you HAVE to do (your new habit, like running) with a habit that you LIKE to do (an already existing habit, like listening to your favorite music).

Another way is to search for an environment where your new habit is normal. This could be a local running club for example.

Habit forming law #3 – Make it easy

The third law is to make it easy. We often tend to expect too much of ourselves, especially at the beginning. There is no such thing as an overnight sensation when building habits – they are all formed over time.

The first 60 days are the most important when you're trying to form a habit, and it is established by doing it consistently. So, make it as easy as possible for you.

Cut all the obstacles that may get in your way of doing the habit. For example, if you want to cook your own healthy food, make sure that your kitchen is clean. Because cleaning it up before cooking your food can get in your way, drain your motivation, and lead to you not cooking at all.

A key factor for making it as easy as possible is to follow the two-minute-rule. Do actions that don’t take longer than two minutes.

For example you want to read more and your ultimate goal is to read one book a week, start with one page a day. Remember to first establish the habit and then optimize it. This is essential for getting used to the new habit.

Habit forming law #4 – Make it rewarding

The fourth law is about making it rewarding. After you’ve done your new habit, reward and cheer yourself on. A very common practice is to have a list or calendar and every time you’ve done the thing, you cross another day off.

You can also transfer this process into a habit tracker where you really can see your progress. You won't want to end the streak of consistently doing it. Like in law #3, remember to focus on consistency over quality. What’s been rewarded will be repeated and what’s punished will be avoided.

How to get rid of bad habits

If you want to get rid of bad habits, you can reverse those laws. Let’s say you want to cut down your time watching TV. Make it harder for yourself to turn it on by unplugging it, hiding your remote control in your basement, or by putting the tv completely away.

Or when you slip up and perform a bad habit, burn $50 or anything else that really punishes you.

Are there any habits you definitely have to get better at? Or are there habits I forgot to mention?

Just message me on my instagram account @jean_marc.dev. I’m very excited to receive your answers!