How I Deal With Negative Thoughts When I Have to Code
How I stopped distractions from taking over and potentially ruining my career
“When there’s an elephant in the room, you can’t pretend it isn’t there and just discuss the ants.” — Ellen Wittlinger
This is my first ever article where I put the word “I” in evidence, as focus on readers is my main mission. But with the hard times we are all going through during this pandemic, I felt that giving a cookie-cutter solution to very personal problems wasn’t fair.
Today, I just want to draw attention to what has been my process over the last six months to dealing with negative emotions while I’m sitting in front of a computer trying to code.
Because you see, dealing with bad feelings and anxiety is different when you’re not working. You can find something to soothe you easily, like getting distracted by a movie or just laying down and letting your thoughts go.
But my boss doesn’t like that and doesn’t pay me to watch movies. They pay me to be productive, to make their problems my own for 40 hours a week. So I have to deal with that as a professional would.
Coding is not something that you can afford to do while being distracted. You must always have your next step in mind, thinking about a thousand different best practices to apply at the same time. It’s a very mind-egoistic practice because you can’t let your brain wander around anywhere else except the editor.
Here is a list of methods I used as my first-aid kit during these tough times. They helped me regain my productivity and possibly even keep my job.
This practice has been acclaimed by mental health professionals around the world for its benefits on having a clearer mind and a happier life. It can let you better understand your desires and worries with a gained perception of your real thoughts. For me, journaling is all that with another big plus: It gives me a sense of progressing with myself, which is so important right now when it seems like the whole world has come to a halt.
Journaling is not something that I do just in the morning but whenever I have time to write down a couple of lines. They will look something like this:
- I feel…
- I’m worried about…
- I’m happy because…
- I’m angry at…
- I want to accomplish…
Sometimes the situation is a lot harder than that. Sometimes I find myself sitting in front of my computer, completely unable to write anything. My thoughts are scattered and I’m too worried to focus on anything. I can type something, but it just feels like I keep forgetting stuff and make silly errors.
This is where I recognize I need a short break to deal with the situation. Otherwise, I know that a full day of work will be wasted and I will feel even worse at the end of it.
I take a short break, like 20 minutes or so away from the keyboard. And I ask myself a question I have already exposed in other articles: “What do I need right now?”
If the answer is that I’m worried about my mother’s health in this situation, I will call her and make sure she is OK and taking precautions. If I feel sad about an argument I had at home with someone, I will call home and try to confront myself and that person to ensure that everything is OK and we will get through this.
It’s not a psychology session. It’s just a basic ability to soothe myself. Like a self-hug. It’s something that can help everybody survive the moment and give yourself the occasion to save your workday and your productivity because now you feel you have more control over that situation. You are not a victim anymore.
Learn New Stuff
I’m a programmer. I love to learn new stuff related to my career. Currently, for example, I’m learning web design principles and how to use Adobe XD. This is what my passion is and what keeps me alive. It gives me a sense of something greater than me being at work. And every time I learn something new, I’m sure it will pay me back in the future. This gives me a lot of hope for it.
During these hard times, being worried or in grief is completely normal and acceptable. Unfortunately, in the real world, we can’t always stop. I was afraid for my productivity and my job, as thoughts would keep me awake at night or make it impossible to write code for me. And this is how I dealt with it. Hopefully, this article has provided some of you with some insights on how to confront such a situation.
As always, thanks for reading and make sure to share your experience in the comments section down below.