How To Deal With Anxiety as a Programmer

Good ol’ worry. Worry and anxiety are two of the worst feelings in the world. They can make you feel hopeless, lost, and scared.

Since this site is about becoming a better programmer, you may not think this article is for you. Don’t look away. If you think learning SQL or Node.js is everything you need to deal with programming, you could not be more wrong. The soft skills software developers have are often what separates a programmer who rises to the top very quickly from one who stays at the bottom of the company’s hierarchy.

Being able to handle worry or anxiety as it comes up is crucial as a programmer. It is not something you learn in your classes or in online Python courses on Udemy. Instead, it is something you often learn through years of experience. Some people still do not know how to process them after all those years.

My goal for this post is to help you understand how anxiety and worry can hold you back as a programmer, and then show you how to handle it, of course!

Anxiety: A Common Problem

We are going to use my friend Mary’s story. She is a senior Node engineer at a small AI company. She got her bachelor’s degree in Computer Science from the University of California Berkeley about five years ago. She was a straight-A student. Now, she wants to move up from senior engineer to becoming the lead programmer on her team.

There’s one issue: She usually lets her work tasks for each scrum cause her anxiety. She nearly always thinks that they are too much to do or too difficult for her. When she starts to think that, she spirals into this state of just worrying about what will happen to her and her job if she messes up. This is severely affecting her ability to get work done.

She is fed up with feeling like crap all the time from her own thoughts. So, she seeks ways to figure out how she can stop feeling anxious and how she can feel better. This is a critical first step, recognizing you might need help dealing with anxiety.

Why Anxiety Is Bad for Programmers

As Mary sets off on her journey to understand how she can address her worries, she starts to pick up on some of the ways that anxiety is affecting her work, and her life outside of work as well.

Anxiety Can Cause Health Problems

First are the health problems that anxiety and worry are causing her. Mary was already starting to realize how her foot was randomly hurting her at work, but then she realized that one of the effects of her anxiety is that she gets random muscle aches and pains.

These aches and pains are affecting her ability to focus at work on top of the lack of focus she is experiencing from anxiety!

Another health effect she notices is extreme fatigue. In order for a programmer to get work done, they must have the energy to stay awake. If you do not have the energy to stay awake, you cannot complete your tasks for that day. So, not only is Mary struggling to focus, she is also struggling to stay awake to finish her work!

Programmers are already likely to have health problems from the environment that the jobs promote. We sit down all day, staring closely at a computer screen, often drinking coffee or soda and eating snacks. Anxiety, with all its attached problems, is not something programmers should look for.

While health problems are extremely important, they are not the main reason why I am telling you Mary’s story about anxiety. She has a lot more to learn, and we can learn along with her.

Anxiety Consumes Your Thoughts

Worrying a ton about her work is causing Mary’s mind to react negatively to more than just work. The purpose of worrying is to help you think about possible negative outcomes so you can prevent them with a little bit of action.

However, one of the side effects of worry and anxiety is that once you have one of these thoughts, you spiral into thinking more and more negative and worrisome thoughts. So, although worry has a good function, we end up having more and more of it each time we allow it to affect us.

As you can imagine, this is the main reason why Mary is having trouble focusing. She is one of the brightest developers on her team. Her grades in school and her years of experience prove she knows her stuff. But, she is struggling to apply the information she knows because she cannot focus with all the worrisome and anxious thoughts in her head.

Focusing is a skill that all programmers need. When we are coming up with our next bit of code, we often have to do some complicated math in order to solve a problem. If you cannot focus, then chances are you will struggle to come up with a solution.

Worry Affects Life Outside Work

If you think that anxiety starts and ends at work, you are wrong. Work is where Mary spends about half of her waking weekdays, yet the anxiety she is feeling is leaking over into her home life.

She was recently married to her husband Joe. As you can imagine, marriages can take a lot of work to maintain.

Joe has complained to Mary about how her worrying is affecting their relationship. When she gets home, she looks negative and bothered all the time. She cannot relax and have fun with him. This is causing Joe to be unsatisfied.

This not only affects her husband but also her friends and family. When she is around them, she just complains about how she is scared she will lose her job or how she has so much work to do that she is scared she won’t get it all done in time!

Mary is finally realizing just how profound an effect her anxiety from work is having on her career and her close relationships. She is determined to let go of her worries and become a superior programmer

How to Stop Worrying

Mary is now ready to take some action to get rid of her worries, and for her, it comes down to two things.

Find a Distraction

When the next sprint comes, she is given her development tasks for that period. Normally, right away, Mary feels like she cannot finish everything she needs to in time.

But then she watches one of her favorite Youtubers’ videos on how he overcame worrying in his (programmer) job situation.

Remember before when we said that worrisome thoughts attract more worrisome thoughts? The first thing you must do then to stop worrying is to distract yourself. Do something else to distract yourself!

If you become anxious at your desk at work, load up a funny YouTube video, go to a conference room and meditate, talk to a friend (not about the worry), go do something fun.

You must do something to break free from the cycle of one worrisome thought after another.

Challenge Your Thoughts

Once you have broken the cycle, you must do the next crucial thing to stop the worrying from coming back into your head. You must challenge the thoughts you are having.

What do I mean by this? Ask yourself questions about the thing you think will happen.

So what Mary did was ask herself if she thought her worry was a real thing. She was originally worried that she would have trouble scaling her server. After some questioning she remembered that she had built a similar feature at a previous job that was way more difficult than the one she needs to build right now. Not only that, but she did it in a shorter time frame!

Challenging your thoughts allows you to take the emotional aspect out of it. The emotional aspect is all about your feelings. It is different from the thinking you need when it comes to programming. Programmers need to think logically. When the emotional aspect of it is removed, and you can think logically, then you can really find out if what you are thinking is actually likely to happen. Chances are that what you are anxious about is not likely to happen.

Never Feel Anxious Again!

Mary finally succeeded in getting rid of anxiety. She was able to stop focusing on that worrisome thought spiral and was able to change those thoughts to positive ones right away.

She learned to first distract herself from the anxiety-inducing thoughts. Then once she could think more logically, in order to prevent those thoughts from coming back up, she challenged and questioned her worries to see if they were even real!

That’s the thing with emotions and internal struggles: You can overcome them. It just takes a little bit of knowledge and a little bit of action. There is always something under your control that you can do to help solve the problem. That is why I wrote a book on this topic.

Mary benefited from first noticing her anxiety as a problem, then setting out to learn about it and figuring out the right steps to take. She can now use worry to her benefit by understanding the possible negative outcomes from a scenario and doing what she can to limit them.

This allows her to focus even more deeply on her code and get more work done every day. Not only that, her career started to improve, and her relationships got stronger!

That’s enough from me. It’s time for you go tackle your worries!