DEV Community

Discussion on: Depression & Anxiety in programming

Collapse
 
mikkpr profile image
Mikk Pristavka

This is an important topic I think about quite a bit.

I suffer from generalized anxiety and bouts of depression. After trying to deny it or trying to find external causes to my problems I got help (therapy and meds) and am now feeling like I'm more in control. It doesn't seem like it's something that will eventually just go away, but rather I'm learning to control how and when it is affecting me. Talking about how I feel was difficult at first, but it has become an important way to "garbage collect" all negative thoughts. Mindfulness, meditation, journaling and exercising all help a lot. Basically, all sorts of methods to focus your thoughts help — writing code fits the bill as well, so maybe that's the reason why this profession appeals to me. To an extent, being physically healthier will also help you be mentally healthier.

I am also learning to turn my anxiety and fear of failure into a strength — it drives me to be extra meticulous, think ahead and not make rash decisions.

Professionally, it helps me write readable, modular and testable code, constantly think of possible refactoring opportunities and ways to improve the codebase in general. As I find it difficult to keep large ideas in my head, functional programming is something that appeals to me a lot — the idea of composing small ideas to express larger ones also applies to my thinking process as well as to the code I write.

Personally, it drives me to seek ways to use my free time most efficiently — fearing to forget important things, I keep a journal with various task lists on all my devices. Also keeping a physical journal is a kind of ritual to internalize good habits and record positive thoughts. For me, the Bullet Journal system works very well for both taking notes and keeping track of things I need to do.

TL;DR — it's really important to talk or at least write about your problems, even just for yourself. Try finding ways to focus your thoughts and not let them overwhelm you. Music, white noise, meditation, whatever works. Excercise, drink water, eat well and sleep well. All of these things help you rewire your brain to work with you, not against you.