How I Deal With Negative Thoughts When I Have to Code

How I stopped distractions from taking over and potentially ruining my career

Piero Borrelli
Oct 26 · 4 min read
Man coding in a dark room.
Man coding in a dark room.
Photo by Jefferson Santos on Unsplash.

“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.

Journaling

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.

  • I’m worried about…
  • I’m happy because…
  • I’m angry at…
  • I want to accomplish…

20-Minute Break

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.

How to practice emotional first aid.

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.

Conclusion

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.

Better Programming

Advice for programmers.

Thanks to Zack Shapiro

Piero Borrelli

Written by

Software developer for the Wifi industry. Burning keyboards with JavaScript code. Defenceless talking about the ups and downs of the developer’s life.

Better Programming

Advice for programmers.

Piero Borrelli

Written by

Software developer for the Wifi industry. Burning keyboards with JavaScript code. Defenceless talking about the ups and downs of the developer’s life.

Better Programming

Advice for programmers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store