Coding with ADHD and Mental Health Issues
Tags: codenewbie, mentalhealth, neurodiversity
Published: 2024-03-29 09:30:00

I'm someone with a neurodivergent brain. I have diagnosed ADHD, Dyslexia and I have struggled with various mental health issues including anxiety and depression for over 7 years. I started self learning in 2020 and I'm no stranger to the challenges of learning programming.

Though I know my experience isn't unique, ultimately neurodivergence is a spectrum and everyone's experience is different. Sometimes even finding the ways to assess what methods work best for you and communicating them can be difficult. This article is my attempt at documenting some of those challenges and provide some insight in an attempt to help anyone else that might be going through something similar.  

## Coding is Hard


It's okay to admit it! I think in this industry there are a lot of people who expect programmers to be these geniuses that can just do anything and solve any problem without a struggle, but in reality everyone struggles and runs into stumbling blocks when solving a problem.  For those of us with ADHD, anxiety, depression or other cognitive differences, that difficulty can be multiplied. I've run into situations when starting on a new project can be extremely difficult. Brain-fog can get in the way and I've had moments staring at a blank IDE, having anxious thoughts knowing deep down I've had previous experience solving a problem but in that moment I freeze up.

I think the key I learned was that It's okay to reach out and ask for help. Especially when you're learning, no one expects you to have all the answers, and you'll learn quicker when you ask for help. Find ways that help you learn best. For me, I learn best through collaboration. I like to tackle problems together in pair programming sessions and talk through why something might not be working.

## Error Messages are Clues, Not Rejection


This may be a hot take, but I remember feeling crushed when I started coding and finding errors and bugs in my code. The term 'error' already sets a negative frame of mind and the voice in my head would say, "You can't do this" whenever I'd try and debug and saw them pop up.

The Rejection Sensitive Dysphoria is real and I would often be irrationally critical of my own abilities if I wasn't able to get something right first try. The key thing that helped me was when I started to change my perspective.  I tried to stop seeing errors as rejection and a personal slight and more like clues or breadcrumbs to follow when trying to debug.

So don't take errors personally and start seeing them as clues to help solve the mystery of your code!

## Community is Key


I think one of the most important and overlooked things for anyone on their coding journey is not learning in a silo. Our society tells us we need to push and strive to try and achieve success on our own. This is an idea that I fundamentally disagree with, I think that ultimately what matters is community and lifting others up as we strive for success in our careers.

As someone with ADHD, finding your people is so important. Whether that's engaging with people with similar interests or online communities, contributing to open-source or having regular catch ups with friends or colleagues, to talk about what you're learning or working on.

Engage with online communities about coding and programming that resonate with you. Join discord communities and chat to people on a similar path. You never know where you might find your tribe.

If you're lucky enough to have friends in your network that are slightly further along in the journey than you, don't be afraid to reach out to them! Can you book in a regular mentoring session or jump on a side project together? If you're learning to code, are there any other friends or people around you that you can form a study group with or one you can join?

You'd be surprised how many experienced developers are willing to offer guidance, feedback and give you their time if you just ask. People are generally happy to share their knowledge and see others succeed.

Fostering a community of growth around us is one of the most satisfying things that we can do. And I guarantee that if we stick with it, 10 years down the line what success means to us won't be that we built something cool with the latest JS framework, or that we got the frontend to interact with this DB but it'll be the people that helped us along our journey and that we lifted up along the way.

So let's stick at it, we can do this!