Coding and ADHD - Can't Stop
Tags: programming, computerscience, mentalhealth, productivity
Published: 2022-06-03 13:04:19


## Hyperfocus

I find "hyperfocus" and "[flow state](https://en.wikipedia.org/wiki/Flow_(psychology))" to be analogous with one key difference - when hyperfocusing, I struggle mightily to stop. I'll be starving. My arms will be aching from typing for four hours straight. Continuing to code is probably detrimental - I'm tired, I know I need to be doing other things, and I'm starting to make mistakes and miss obvious alternatives. 

Usually I'm stuck in a "one more try" loop - I'll tell myself I'll stop after I try this thing and then I think of another thing and tell myself I'll stop after I try that thing and then I think of another thing and so on.

When I've been hyperfocusing for a while, I'm often trying to change too much at once and missing meetings. This is often how my blogs happen. I'll look up and it's 2:00 pm and I haven't accomplished anything on my to do list, just a whole new blog.

ADHD brains have trouble switching focus when they've found a task that gives them the dopamine/stimulation they're always craving. Why would my brain want to switch to another task I don't find as interesting when I can just keep doing this?

Many of us also struggle with perfectionism. Once we've finally gotten started on something, we want the end result to be astounding!

![Not hyperfocused pie chart: sliver of doing it, small piece of feeling guilty, and 3/4 putting it off for not good reason Hyperfocused pie chart: sliver of doing it, small piece of losing track of time, 3/4 obsessive tinkering justified as "perfectionism"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nysvnok8g52cqbv9gd6.jpeg)

## Strategies

"This sort of intense focus isn't something you can just buck up and talk yourself out of," says Russell Barkley, a clinical psychologist and ADHD expert. ADHD brains in hyperfocus will literally ignore hunger, thirst, and needing to go to the bathroom.

I've often heard "take advantage of natural breaks," which may work for you. "Phoning a friend" works for me. My husband will come home and starting asking what I'm trying to accomplish and when I'll reach a stopping point. This brings what time it is into the forefront of my consciousness and crystalizes the steps I need to take to stop. You could ask a friend or relative to check in on you at a certain time.

ADHD medication is supposed to make this easier, but actually makes it more difficult for me. The coping mechanisms I've used for 30 years often rely on finding the tiniest bit of motivation and building on that momentum to do as many tasks as I can.

People find timers, alarms, notifications, [time blocking](https://blog.rescuetime.com/time-blocking-101/), and [pomodoro](https://en.wikipedia.org/wiki/Pomodoro_Technique) to be helpful. I also find giving myself a certain amount of time to hyperfocus can work, especially for relaxing with video games. These all will help with estimating the time these tasks will take in the future - something ADHD people have to learn manually.

There are a few suggestions I've seen but haven't yet tried:
- Don't start anything you know you can hyperfocus on close to bed or to procrastinate on another task.
- Once you realize you're in hyperfocus, immediately move around.
- Set goals for the task, and take a break when you finish each one.

![A hand pouring something into a pan captioned I throw in basic focus A pan on fire captioned Oh, my god. That's hyperfocus. I'm an idiot.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vht9ecbsdu6j5ucp5d7g.png)

Most of all, after you've found you've been hyperfocusing for a while, be sure to take that break and give yourself some rest. Berating yourself for losing track of time won't help you start the next task.

## Use the Hyperfocus

Many people want to be able to focus like this - there's a bunch of material out there on how to achieve a flow state. My ability to complete huge creative projects I'm naturally interested in is something people admire. It's one of the reasons I'm good at coding - once I have convinced my brain to care, it is easy for me to reach a flow state and get a ton of code on the page.

If you can find a pattern in the things your brain will hyperfocus on, use it. Finding what makes you inherently interested in those tasks can help you make a boring task, like chores, interesting enough to get done.

## Conclusion

Did I miss a resource or tip you love? Leave a comment!

Up next:

- [Can't Remember](https://dev.to/abbeyperini/coding-and-adhd-cant-remember-30b4)
- [Where We Excel](https://dev.to/abbeyperini/coding-and-adhd-where-we-excel-454j)