Most professions nowadays involve a certain degree of stress. We have deadlines, change of requirements at the last minute and to deal with people. On top of that, when you work in front of a computer 8+ hours additional stressors are added. Your eyes might get dry. Also, the lack of movement might cause you back/neck pain, while your muscles shrink and your belly expands. This post will give you some tips to accomplish your goals without sacrificing your health. I also included some bonus tips for software engineers.

Background

There was a time in my life, back in 2015, where I went through severe stress crisis. I was juggling too many things at once: writing my first book, traveling to the USA interviewing for new jobs, getting a work visa, and planning a wedding while keeping up with a full-time job and also the sole programmer on two attempts of startups. It was the busiest time of my life, and my health suffered a lot! I dreamt about source code. Some nights I couldn’t sleep, so I worked instead. I went to the ER multiple times with heart palpitations. I knew I could not keep living in that way.

I’ve been experimenting with different things to see helped and what not. This post is a compilation of the ones that helped. I’ll start with general things that applies to anybody working in front of a computer and end with some more specific tips for web and software developers.

Ideas to handle stress

I’ve been incorporating the following techniques and it had helped me a lot to cope with stress! Hope they can help you, too!

Move 🚶‍♂️

Have you noticed that after a long time sitting your energy levels and concentration starts to drop?

Taking a little break to get some movements is an excellent way to boost your productivity!

Movement => Energy

Take a 5 minutes breaks after 25 minutes of work. You can also do 50/10 minutes of work/break. What matters is that you get some rest to move around and take deep breaths while at it.

The 25/5 minutes of work/break is also known as the Pomodoro technique. There are many apps that I have used to remind me to take a break. As simple as it sounds, it’s easy to get carried away when working on a computer and lose the notion of time.

Note : working out after work doesn’t compensate for a long time of uninterrupted sitting. Your muscle and pain cripples in after a couple of hours static. So, you still have to try walking around at least every hour, so your body doesn’t suffer.

Apps I've used...

MacOs

  • Recess this one of my favorite because it's the simplest and blackout the screen. It keep some stats
  • Be Focused - Timer similar to `Recess` but also has a list where you can keep track of the time spend on each one.

iOS

  • Forest This has a timer and some background music that could help you concentrate.

I don't use Android/Windows very often, so if you have suggestions write it down in the comments.


Taking breaks can also reduce eye strain. I suffer from dry eyes from time to time. When we stare at a digital screen, we don’t blink as often causing our eyes dryness. There’s also a rule of thumb 20-20-20. It means that, every 20 minutes, you look at something of 20 feet away for 20 seconds. At one point I also notice that my eyesight was getting worse, so I also incorporated some eyes exercises during the break. That also helped with the dryness a lot!

Eye exercises I've tried...
  • Blinking rapidly around 20 times. It helps with the dryness.
  • Extending my thumb as far and close to my eyes as I can.
  • Doing circles with thumbs while my eyes follow them. You can also look up and down, and right to left.

Brainstorm 🧠

Have you felt stressed when you get stuck on something for a while? (e.g., No syntax errors and still the code is not working as intendeded). Well, it’s time to take a step back and put things in perspective. There might be a straighter line to get to your goal. List all the alternatives or different ways you can solve the same problem. Whatever you can think of (don’t label them as “good” or “bad”. Put down the “smart” ideas and especially the “dumb” ones. At the end, choose the ones that you think will work best. Work smarter, not harder!

If you are going to cut a tree is essential to sharpen your ax first and then get to it. Not just will you cut the tree faster but also with less effort. Likewise, it’s vital that you take some time to do a little planning before jumping right into the task in hand. Beware of not overdoing it, set a time limit for this exercise. If you spend all the time sharpening the ax and never cut the tree is not good either ;)

Subtask ✌️

Divide a big task into smaller ones. Completing some small tasks will motivate you to get more done. Also keeps the stress away since you feel you are making progress. Another benefit of sub tasking is that makes estimations more accurate.

Even the most ambitious projects and tallest buildings started with laying down one block at a time. Likewise, no matter how big your project is when you break it down into smaller pieces, that you make it easier to reason about.

Tackling a small task is less daunting to deal with the project as a whole, so you will be less likely to procrastinate and stress about it.

Prioritize 🎯

Most of us have an endless TO DO list where things get added a lot faster than we can check them off. An infinite list of things to do stress us big time. What if I tell you, that in most cases you only need to complete the 20% of list to reap 80% of the benefits? 😲

If you can’t do it all, then prioritize. Do what matters the most upfront. The 20% of the task might account for 80% of the result (Pareto Principle). Find that critical 20% and execute on that first. For the rest of the list, you can apply the 80/20 principle recursively. Find the next 20% that matters the most and for the rest apply Pareto again, delegate or re-evaluate if is still needed.

Ask 🗣

If you have more on your plate more than you can chew, then share with others. Don’t choke alone. Ask for help.

When you request for help, the other person usually feels good. You are creating a bond and companionship with that person. However, don’t overdo it! Otherwise, it will have the opposite effect. Before asking for help, you should do your homework. Try to solve it yourself first, google it and struggle with the issue a little while. Write down some questions and where you got stuck (exact error messages, etc.) The other person will appreciate that you are respecting their time and that you are asking detailed questions.



When we neglect our body the proper care we also can become sick which will take productivity to the floor. The following tips will help our body to cope with stress and keep the health.

Drink 🚰

Stay hydrated. Your brain is mostly water so don’t let it dry. A good rule of thumb is to drink half of your weight in ounces (e.g., 170lb -> 85 oz. water).

Your body is a fantastic machine that tries to keep the balance regardless of what we throw at it. It remains a certain temperature when it’s freezing by shivering or sweating when it’s hot. It seeks to maintain the pH of your blood even if you drink too many acidic beverages (sodas, coffee). It tries to keeps your blood sugar on check even after eating a donut or if haven eaten in hours. However, our bodies need the proper nutrients and water to do so. When you don’t hydrate yourself enough, it can’t remove the waste out of your system. So, drink up!

Another way to know if you are hydrated is monitoring how often your pee (crazy, right?). If you haven’t pee in 3 hours, you need two glasses of water ASAP.

Apps I've used...
iOS
  • WaterMinder You can track the amount of water that you drink and have reminders.
  • Pee & See: Water Reminder Alternative method of measuring hydration. Instead of logging the amout of water drank you log how often you pee. If you haven't pee in 3+ hours you will get a reminder to drink more water.

I don't use Android very often, so if you have suggestions write it down in the comments.


Nourish 🥦

How productive are you when you are sick? Exactly! You get almost nothing done. On top of that, your stress increases and the deadlines get closer. A well-nourish body gets sick less and has more energy. You would be more productive!

Supplement yourself with vitamin C & fruits. Vitamin C helps your body to quickly clear out Cortisol, which is a hormone correlated to stress. It also keeps your immune system healthy. Magnesium from leafy greens helps to relax the muscles among many other benefits.

Foods to eat more regularly...
  • Nuts
  • Fish
  • Vegetable of different colors
  • Leafy greens
  • Fruits

Stretch 🙆‍♀️

Prolonged sitting is the new smoke. It might increase your body weight, back, and neck pain. Even if you exercise an hour before/after work, still you are hurting yourself for sitting too long at once. You have to break sitting often.

As discussed before, try to break sitting every 25 minutes or an hour with some stretching session. Our bodies are not designed to stay 8 hours per day sitting still. It was designed to move. Indeed, great ideas happen when you are on the move (showering/walking). If you are stuck with some task, take a little walk, stretch out and might give you some perspective.

Workout 🏋️‍♀️

Move your butt often, get some sweat in your forehead. Working out releases endorphins that increase your sense of well-being.

Working out your muscles can help you release tension and reduce your mental stress. However, don’t overdo it or it can backfire you. Try to avoid getting injured by doing small progressive changes rather than going too big the first day and then not being able to walk nor shower.

Apps I've used...

iOS

  • Stronglifts 5x5 Weight Lifting I have used this program for 6 months and I have seen very good results. It's simple and have a nice tracker and videos how to do each exercise.

Breath 💨

If you are reading this, it means you are breathing (of course!). However, not all breaths are equal! 👀

Take some very deep and slow breaths from time to time. When we are stressed out, we breathe very fast and shallow.

Proper breathing is vital for relaxation. You can avoid/overcome panic attacks. Just sitting relaxed and being aware of your breath when the air goes in and out can cool off your mind, reduce your heartbeats and blood pressure.

Some devices can track when you are tense, focus or calm. Guess how they do it? That’s right with your breathing. I have use Spire. I think it’s useful to know track receive feedback when I was getting tense and try to take some deep breadth right there.

Devices I've used...
Spire Stone: Stress Management

This one you wear it on your belt or bra. It will capture your breathing. I easily forget to wear it or I lose it. However I learn a couple of thinks wearing the device:


Meditate 🧘‍♀️

Meditation is trending but still sounds a little strange for some people. It’s not about doing the lotus position. Simply put, meditation is focusing on the “now” because most of the time we get carried away fearing “future” situations that might never happen or worrying about a “past” that we can’t change. All we got is “now”.

One of the best ways to be present is being aware of your breathing. It’s always in the present. So, the basis of meditation is mindful of your breath, and that alone can be calming.

Apps I've used...

There are many apps that you can use for helping you pick up the habit of being present and relax:


iOS

  • Breethe: Sleep & Meditation This app has a nice series of guides for beginners. It has a lot of different topics like sleeping, concentration.
  • Simple Habit - Meditation It has a lot of different topics and also many instructors. Having different voices makes more dynamic.
  • Calm It's has a lot of free meditations and ambient music.
  • Headspace: Meditation It has only one instructor you might get bored listening to the same person.

I'm sure there are many other apps for this but this is the ones I've used, and they are in my order of preference.


Play 🎮

After a long session of work, what’s your reward? If you go home to continue working and or doing mentally taxing activities, then you will burn out quickly!

If you don’t rest properly, the next day your focus will be all over the place. Also, the urge to procrastinate will be strong in you. Your mind will be looking for any chance to get a break.

Solution? Have some planned downtime! After some time of work well done, reward yourself with something that you enjoy. Playtime! Do something that put a smile on your face 😊. Do something that makes you laugh 🤣.

Life can’t be all broccoli and not desert.

Have some fun and plan for it!

Write ✍️

Journaling is one thing that helped me the most to calm my racing mind before going to sleep.

Use journals to write down thoughts, worries, plans, and let your mind run wild. Also, it helps a lot to write down things you are grateful on that day. It would make you feel better when you see written down some things turn out great on that day! Even in the worse days, there are a few things that you can be thankful for.

Like brainstorming doesn’t label your writing as bad or good. Just let it flow and write down what’s on your mind.

Some people do it in the morning like Tim Ferris, I have seen a lot of benefits doing it at night. Find the time that works the best for you.

Tools I've used...

Sleep 😴

I neglected this one for some time. The truth is that we sometimes we think if we sleep less we would have more time to get stuff done. However, that’s not usually true. Your productivity/creativity decreases so much. If you are well-rested, you can solve problems in much less time.

The science of what happens while we sleep is still ongoing and fascinating. We know that memory consolidation happens while you sleep, your body repair itself, waste is removed from the brain. Your heart rate drops around 20%, and your stress hormones go down. Your nervous systems heal making you more responsive and sharp after a good night sleep.

Also, we have an idea of what happens when we don’t sleep much for a couple of days. We have problems concentrating. The quality of our work decreases and or creativity suffers. You might have headaches, darker shades under your eyes among other things.

Do you know having a good night sleep start during the day? For most people, it’s hard to sleep well (or at all) after a very stressful day or some big event coming up. That’s why doing breathing exercises through the day helps. Also, taking breaks every 25 or 50 minutes of work. Journaling helps me a lot to calm down my monkey mind jumping all over the place at night.

Apps I've used...

iOS




An Additional bonus for Software Developers

Stress management for Software Developers

All the recommendations above could apply to anyone working at an office. In this section, we are going to give some more for people working with technology that changes very fast (like Software Developers).

Information overload 🤯

Innovation in tech is happening at unprecedented pace and it will keep accelerating. Try to focus on the foundations and principles very well, since they are not changing anytime soon. Don’t feel like to have to learn everything new that comes out.

If you are a front-end engineer you notice that new web frameworks pop up in a relative short time. However, the most popular ones are adopted by the industry and takes a while (a couple of years) to move away when new/“better” ones come along. So, don’t feel pressure if a new shiny tool is all the hype and you don’t know about it.

For backend and devOps there are paradigm changes from time to time. E.g. from monolith to microservices, from server rendered apps to SPA (single page applications) or hybrids. Also people are talking about severless, and the JAM Stack (JavaScript, APIs, and Markup). Docker and kubernetes are getting very popular right now. The list just keeps growing…

All in all, don’t feel like you need to rearchitect your stack right away and throw what’s working for something new. Prefer battle-tested solution for production env to shiny ones. Don’t follow the hype evaluate your use cases carefully. What worked for Google/Facebook don’t necessarily be the right tool for you. You can benchmark multiple tools before going all in and make a decision based on data rather than hype.

Testing 🐞

Test your code. Unit test and integration/e2e tests are not nice to have, they are a must if you want to sleep well at night. Even if your company has a QA team, try to write automated tests. Add test coverage tools and try to keep it as close to 100% as possible. That will reduce you a lot of stress chasing bugs in production and unexpected angry customers.

Refactoring 🛠

I have been battling my perfectionism for years. Every code I see that could be better, I feel the urge to modify it. Initially I did, and my number of changes got so big that when something broke it was hard to tell what’s wrong :(

Keep your changes small. It’s easier to review small pull requests (PR) than a large one. Divide big changes into multiple small ones if it makes sense.

Also, have respect for the working code. There might be clever ways to solve a task, however you don’t know if you are going to introduce new bugs.

This is what I follow:

  1. Make it work, first. You should try to add the new functionality and make it work. No refactor, no clever tricks but lots of tests. Open up a PR and get it merged.
  2. Make it faster, later. Now that’s working and has tests, it’s time to get clever and refactor.