DEV Community

Cover image for Coding and ADHD - Can't Keep Going
Abbey Perini
Abbey Perini

Posted on • Updated on

Coding and ADHD - Can't Keep Going

The idea that anyone should be able to sit down and focus for four hours on command is a dangerous myth. Any brain requires glucose to keep your brain going and breaks to keep you engaged. ADHD brains add an extra hurdle when you're trying to focus on a schedule. You'll have to keep pivoting in your strategies. What works today may not work tomorrow and might begin to work again a month from now.

A brain saying "Look at us we're all done!" A dino saying "But we only did one thing" Brain: "Now we can relax and enjoy the afternoon" Dino: "We were supposed to do a lot more." Brain: "Wow I love being productive" Dino, way off in the background: "It's only been 22 minutes!!!" by ADHDinos

Limit/Provide Distractions

I'm hyperactive, so counterintuitively, my ability to focus often relies on fairly loud background noise I've chosen. For coding, it's usually music (and often lofi beats). For me, this blocks out smaller sounds I might want to investigate and provides a back-up focus for when I get bored. I pick noises that can't sustain my focus for long, so I'll naturally gravitate back towards doing the task. It really helps when I'm waiting for the development server to load, for example.

For the less hyperactive, sustaining focus often involves blocking out all distractions. This can be anything from temperature to lighting to clutter to the clothes you're wearing.

I've heard many people describe putting a note on their office door or desk asking others not to distract them during focus time. Phones and computers often have a focus mode that can limit notifications for a set time.

During classes, presentations, and meetings where blasting music would be rude and I desperately want to move, I take notes, try to come up with questions to ask the presenter, draw, and use fidget toys.

Creating a thought dump can be very helpful. We all know the feeling - I have to act on this thing I remembered NOW or I won't remember it 30 seconds from now. If you have a place to write those thoughts down while you're working, you'll know you can come back to it later.

Working with Your Brain

You can use every trick and tip in the book, but ADHD brains love to change the rules for what will work constantly. If you find patterns in your productivity, use them. For example, my best time for getting work done is like 2:00pm to 5:00pm. Sometimes I can get in the groove when I sit down at 9:00am, but if I can't, I focus on tasks that will set me up for success later. I'll do organizational tasks I've been putting off, check and respond to emails and messages, and sometimes time block the rest of the day. This is another area in which developer jobs can suit ADHD brains. They're often pretty lenient about schedule as long as the work is getting done.

Notice things that regularly provide just enough time for you to get distracted. We're developers, so these are opportunities to automate! In a comment on the last blog, @destynova describes automating alerts when his builds and tests finish, @gwenshap recommends streamlining your CI/CD pipeline, and Josh Comeau recommends chaining npm start and npm install.

time management when you have ADHD a still from the Good Place of Michael saying "Okay shouldn't take long. Between an hour and, um, 11 months"

Often for people with ADHD, acknowledging the desire to pivot between tasks is very helpful. If you can't get started on one task on the list, but kinda want to do another, do that one. As long as you're still moving towards the goal, there's no harm in bribing yourself with 10 minutes of the thing you want to do just to get going on the thing you don't want to do. Working with the way your brain focuses will probably work better than trying to force it to focus like someone else's brain would.

Another counterintuitive tip - rewarding yourself at the beginning works way better for ADHD brains than promising yourself a reward at the end. Literally, eat a square of chocolate (or whatever you can bribe yourself with) and then try the thing.

Finally, celebrate that you did the thing! I don't care if the thing isn't done or it isn't done perfectly, congratulate yourself for trying and putting in effort. Anything you can do to give your brain positive feedback will help combat the shame and negative messaging you've received in the past.

Embrace the Lack of Schedule

ADHD people do not form habits like neurotypicals. There's some variation in how long it takes people to form habits, but it's normally somewhere in the months range. I've been trying to cultivate a morning routine for 30 years and at this point I can reliably wash my face and brush my teeth but putting on moisturizer is still hit or miss.

Everything about planning out our day and making sure things get done is manual. I leave calendar notifications on and write down every event I have to attend on my to do list and still end up being late or missing meetings. I've had success asking my teammates to ping me if I'm RSVPed yes to a meeting, but nowhere to be found. Every time I got a ping, that person got a shout out in retrospective.

A venn diagram by Rick Green I wrote it on the calendar. It's in my agenda. I set an alarm. I loaded it into my phone. I told my partner. I put up 4 large post-its. All overlap "What? Today? No Way!"

I even have to plan breaks or I will find a way to entertain myself (productively or not) with my computer for several hours. Based on how my brain works, my daily goals are be available during my scheduled work hours, make progress on 1 ticket, 2 - 4 personal to do items like watering the plants, an amount of water to drink, and planned meals and breaks. Nothing else is strictly scheduled, because I will ignore alarms and then declare the task failed because I didn't do it "on time."

The biggest gift I gave myself was accepting that tasks often take me longer than they "should." As long as they're getting done, that's something to celebrate!


It's tempting to expect yourself to be able to accomplish the same amount every day. ADHD brains naturally have an ebb and flow. One day I'll be in a shame spiral about my inability to start a ticket, and the next day I'll get 3 days worth of tickets done. However, that really productive day will take its toll. If I manage to chain really productive days together, I'll often crash and have an equal or larger number of unproductive days.

A bunny getting stressed and trying to get away from messages like "why can't you do this?" "Look at other people!!!!!!" "Why can't you just be like them?" The bunny gets angry, pats away a final speech bubble, and says "because I'm not them"

If I start to feel exhausted, frustrated, or overwhelmed, I have to remind myself to try eating food or taking a 10 minute walk. Often that is enough to get me back on track. If not, I ask myself if I'm trying to multi-task again or re-evaluate my plan for the day and take some items off.

Ultimately, this is another area in which people with ADHD struggle to separate themselves from the constant negative messaging they get about their productivity from society. I'm still trying to internalize that I do not need to be productive to earn rest.


Did I miss a resource or tip you love? Interested in fidget toy reviews? Leave a comment!

Up next:

Discussion (14)

michaeltharrington profile image
Michael Tharrington

Such an awesome post (and series)! While I've never been diagnosed with ADHD, I certainly can relate to a lot of this.

The lack of schedule is definitely one that I can get bent out of shape about. I try to form a schedule but really really find it hard to keep up with it. Just hearing you talk through your methods for embracing made me feel a bit better about it — I'm not alone, haha! 😅

I also have to be pretty careful about my music choice and frequently find myself tuning into lofi beats or more recently experimental ambient music/beats... I really like stuff without lyrics and that doesn't have a distracting pattern about it. I also find that the ambient music helps to relieve some of my anxiety.

Anyway, I'm looking forward to reading more entries in your series! Thanks for sharing this. 🙂

mittell profile image
Chris Mittell

I've never understood the concept of having to sit, stand, or run around non-stop for any period of time, somehow equals constant productivity. Or worse, the longer we are made to do something, the MORE productive the result will be?

Having worked in too many environments where time equals money, and flexibility is just a pipe-dream. I've learned to understand more about the negative effects it can have on productivity, especially now I know that ADHD has been a factor for me throughout.

I've found that environments that let me use headphones were where I managed to focus best. Even if I wasn't listening to anything, just the act of physically blocking everything out seemed to matter most. Though most of the time I'd actually just forgot to play/resume music.

When that wasn't possible, due to having to answer phones or be attentive to customers. I'd probably say I was nowhere near as productive as I could have been. Either due to the constant distraction or fear of having to jump to another situation that I couldn't expect or plan for.

I guess that's part of the reason developer roles have appealled to me more.

With regards to automation, I think as a developer it's something that seems almost natural to me to want to maximise. I've worked in too many places where automation was avoided and most processes were manual, once I'd moved on to roles where automation was key, it was like winning the lottery. So much manual and tedious work can be streamlined and optimised to suit your needs, and it can be really fun to get lost into when learning. Though that can sometimes be a little counter-productive.

Working between tasks, and choosing the more interesting or rewarding ones can sometimes feel like a double-edged sword. But again, as you say, as long as you are moving towards the goal, then technically there isn't an issue. Though that might not always be the easiest thing to explain to others.

I'm currently trying to plan out a long-term series of things to learn, and make room for switching between topics to allow myself some flexibility. I want to make sure that progress is being made no matter what I choose to focus on any given day or week.

This includes expecting things to take longer than they "should", since they always do.

gutosanches profile image
Guto Sanches

Great series Abbey! I also have been diagnosed with ADHD recently and while on therapy one thing that was clear was that I'm always putting way too much pressure on myself to do things I want to do, while not celebrating what I do accomplish. So your point about celebrating things we've done hit right home.

To help me with this I've built so that I have somewhere to input anything I want to celebrate whenever I do that thing. It's a fairly simple app but I've found it to really help me give my brain some positive feedback like you said.

I'm planning on building more apps like that in my free time to help our neurodivergent brains with more positivity. I feel like the vast majority of the apps, specially productivity apps, were built for neurotypical brains and they're often too overwhelming at least for me personally. Whenever I build something I feel that is helping me, I'll be putting it out there in hopes it might also help some of our fellow neurodivergent folks with the same struggles.

Looking forward to reading more from you Abbey, keep it up.

abbeyperini profile image
Abbey Perini Author • Edited on

I'm very similar and this app so great! Looking forward to seeing what else you build!

harithzainudin profile image
Muhammad Harith Zainudin

Good tips and advices Abbey!
I always pivot my attention when working on something 🥲 as I always think that, I have times to finish the task hahah
will try do as your advices. :)

andrewbaisden profile image
Andrew Baisden

Looking forward to reading more its so engrossing.

guccibandit profile image
Vitalii Ponomarov

Amazing article

murd0c profile image
murd0c (he/him)

I had a mini hearth attack when I saw the title, I was thinking that you couldn't keep going with this series.

It's very encouraging and awesome see someone write about this that to many people couln't seem too much, but it is. Thank you very much!

miquelbrazil profile image
Miquel Brazil

"I'm still trying to internalize that I do not need to be productive to earn rest."

This line definitely shook me. I didn't even realize I legit behave this way until I saw it in writing. Rather than seeing rest as a requirement to function…I've literally become conditioned that it's something I don't deserve because I haven't accomplished what I said I wanted or needed to do. An insane shame spiral manifests which has sometimes left me with little to no rest over the course of several days.

I gotta do better.

abdurrkhalid333 profile image
Abdur Rehman Khalid

First of all this is a great article, being a developer and student I do not study such long things but this article grab my attention from the starting. So this is a article from my side is a great article.

Yes, you are right in the point of putting some background music for being productive from the task you are currently doing. As you said you use music, in my case I do the openings of my favourite TV show which is "The Office".

And yes, it is also true that the each person has its own productivity hours, as being a student, I have two kind of working zones, the first one is in the morning from 09:00 AM - 1:00 PM, which I use for the study purpose. And Late in the night around 10:00 PM - 1:00 AM for the coding or self learning things.

I will agree most of the points of this article as well. Thank you for writing such great and awesome content for helping persons like me and many others.

curran232 profile image
Info Comment hidden by post author - thread only accessible via permalink

Abbey, thank you for your advice and tips!
I always shift my focus when working on something because I always believe that I have enough time to complete the task hahah will try to follow your advice.:)

cloud747 profile image
Jonny Pabon

Thank you for posting this! It hit home with me 100x!!!

bipon_das profile image
Info Comment hidden by post author - thread only accessible via permalink

I can reate myself, I guess I have ADHD!

tilakmaddy_68 profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Info Comment hidden by post author - thread only accessible via permalink
Tilak Madichetti

Claiming ADHD is Gen Z's way of seeking attention. It screams "I am not special but I want to be treated like I'm special" I am not saying ADHD isn't real but it is like <0.000000001 % of people IMO

Here's a fix to 99% of you ADHD people:

When you wake up in the morning repeat this sentence

Now you good bruh !

Some comments have been hidden by the post's author - find out more