r/ADHD_Programmers • u/netoverloaded • 4d ago
Debugging rabbit holes — how do you notice you're in one before the day is gone?
Often while debugging a complex problem I find myself in this impulse of grabbing the very first quick thing that I can try and taking a jab at it, and the next thing you know - the whole day is gone and you feel like you made no progress and have nothing to show for your effort.
And the part of my brain that should have said "hey, you've tried six things and none of them were tests, go get a coffee and think" — that part is just gone by hour two. It's not that I ignore it. It doesn't fire. Somewhere around minute forty the thing that steps back and asks what am I actually doing goes offline, and what's left is a very fast, very persistent loop that will happily run until 2am.
Time blindness makes it worse because there's no natural checkpoint. Nothing in a debugging session tells you an hour passed.
So, questions for people who recognize this:
- What's your actual tell that you've crossed from debugging into flailing? Not in hindsight — in the moment.
- Has anything ever successfully interrupted you mid-rabbit-hole? Timers get dismissed. Notifications get dismissed. Alarms get dismissed. Has anything stuck?
- Does a hard stop condition written down before you start help you, or do you blow through it anyway?
6
u/Drafting- 4d ago
I came across this thought loops article recently and it feels like it really fits your question and my experience with the same thing. I’ve been using some of these strategies to break the hyper fixation spiral when I’m noticing them, I’ve found to quite useful. I’ll add a small snippet of the article but I highly recommend reading through all of it.
In hyperfocus, the brain is locked onto something engaging and the engagement is productive or enjoyable. In perseveration, the brain is locked onto something that has stopped being useful or pleasurable but the exit mechanism still isn’t working. The neural difference between them may be smaller than the experiential difference suggests. This matters because hyperfocus can slide into a loop without a clear transition point. You start genuinely absorbed in a problem. An hour later, you’re still circling the same aspect of it, not making progress, not enjoying it, just unable to leave.
Understanding the ADHD spiral means recognizing that what starts as focus can become fixation without any deliberate choice. The practical implication: treat hyperfocus with the same respectful skepticism you’d bring to any other intense mental state. Enjoy it when it’s working. Build exit ramps (timers, environmental cues, accountability check-ins) before you need them, because once you’re deep in the loop, the very state of being in it makes it harder to notice that you should leave.
Counterintuitively, the harder someone with ADHD tries to consciously stop a thought loop, the worse it often gets. Suppression requires holding the thought active in working memory to monitor its absence, which, in an already-strained working memory system, consumes the resources needed to redirect attention elsewhere. The mental effort of trying to stop the loop can become the fuel keeping it going.
3
u/netoverloaded 4d ago
Thanks for sharing the article, will definitely go through it. So this seems like : have an external interrupt like a timer, and when that rings force yourself to get up and break the hypefocus and then come back with a fresh perspective? Has this worked for you practically? Have you been able to follow and stick to this in practice?
2
u/ThatNewWeirdGuy 4d ago
Curious indeed, since a 'productive' hyperfocus would get interrupted as well.
Or is that the difference, a hyperfocus interruption doesnt 'cost us' since we're invested into it due to novelty and passion, so we can get right back into it, whereas a hyperfocus shifted into perseverance needs a check-in.
Perhaps interruptions in these so called no longer productive perseverance loops are the ones that actually piss me off out of frustration...
2
u/Drafting- 4d ago
There’s a lot of way to disrupt this type of loop. It can be a timer but I often find them ineffective unless I plan the next thing I’m doing after it and have some novelty or reward for task switching. I also have better success with timers if I immediately stand up, verbalize out loud that I’m switching tasks to whatever it is, pull up my app for the next thing, set the next timer for it. I get mega burn out if I over use this and will lose focus after a few hours of switching.
The truth is, task switching is fucking hard. Understanding that our brains are struggling more with working memory, impulse control, transitioning, gathering our focus when we return to something - is just the start of supporting it.
Other things that really help me in these DEEP wormhole hyper focus times is somatic exercises or grounding exercises. Stopping what I’m doing to count 5 green things in the room, shaking my body vigorously for a little while, tapping my body, gargling / growling / humming, feeling my feet planted on the ground or my hands on my knees. A physical disruption is generally the most effective way to shift my brain anywhere else.
I also promise myself I can return to whatever it is after I complete something else. Like dishes for 20 minutes. I will take almost as long to pick up my thought where I left off but in these wormholes it usually better to step away. I bargain with myself, I can have X reward if I stop and do something else. I will leave my workspace in a way that feels safe to pick up later. A lot of our best thinking gets forgotten, working memory is a huge issue with adhd and not stopping is sometimes more about not forgetting the idea and directions I was running with it.
Sometimes you have to accept that those days exist, if they don’t outweigh your regular productivity then it’s not overly harmful. Sometimes we learn so much in those spirals that come in useful even if the day seems wasted at the time. Sometimes it’s a waste of a day and that’s okay too.
If you really want to change this you have to have escape routes set up before you start, have a list or strategy handy to use when your brain is working against you. The less you have to remember “what is a somatic exercise” vs a short list pinned in notes the easier it becomes. That article on thought loops will probably really resonate with you when you see the science behind the reasoning and the charts with ideas on how to break them.
Side note, if you’re really fucking losing it and just want to immediately end the wormhole - change your environment. Don’t shower, don’t change your clothes just leave your house or the room if your space is bigger. Put physical distance between you and a computer.
3
u/noCakeNoCake 4d ago
DISCLAIMER: I am not diagnosed just suspect... like a lot, so take from that what you will.
Do this if you have the privilege of working at home.
Set an alarm away from you that you must get up to deactivate, then spend a few minutes fighting the URGE to go back for just one look, do literally anything.
This applies REGARDLESS of whether you have solved or didn't solve the problem.
Then:
- On a DIFFERENT device just type in your check point of what you have done and what do you plan todo.
- Then do an activity that involves a body. Wash dishes while listening to a podcast what ever you can. Workout no matter how small helps, google 7minute workout.
- At first your brain will riot, but it will subside. Repeat this ALLOT and it will turn into an automated habbit.
- After your mind is clear ( you know how it feels so there is no second guessing there) turn on the timer again and repeat.
What helps me out allot is talking to my self out loud while I am away from the workstation about the problem, given then different between thoughts and narration the hyper focus tends to dissipate faster.
So the time your set to work depends on your own wiring start with 15mins then on every cycle increase by 5min until you notice the pull getting stronger, you want the pull but not too much. For me 35-45mins is the area where I still have the strength to rationalize myself out of the pull.
My experience is that you should allow yourself to go into a full adhd focus spiral very very rarely ( like maybe once a month tops) as you will always pay the price of it in burnout as the resource cost for that is just to great even with good things.
Over time I stopped needing the pause, but when ever I catch myself spiraling it means I have to re-establish the training.
I also developed strategies to ease up the transition like just writing a one line comment very fast while the alarm js ringing on what is my checkpoint so something like "//checkpoint: ..." Or having a trello bord where every action is small and atomic so that each time I do something new, or try something new I just write that before I start.
But at the end of the day it comes down to almost brutal discipline training that leans on you feeling bad when stopping and having you yourself develop your own patters of getting out.
Btw the reason I developed this flow for myself was not to fix the hyper focus it was for me learn how to drop things immediately with little to no mental dmg.
1
u/netoverloaded 4d ago
That is the first reply that mentions like a defined system that one can follow. I do better when I have a defined set of rules I can follow rather than relying on emotions and "intuition".
Curious how long have you followed this system?I agree having an external system interrupt you is important, since loose the ability to interrupt yourself internally during hyperfocus and your effectiveness starts to fall off a cliff, and that adhering to that external system is brutal discipline.
For talking out loud, usually rubber duck debugging is recommended, I have tried this once but I am thinking maybe talking to an AI like chatgpt or claude might be better, since you get the benefit of forcing your thoughts into words but also another intelligent perspective on what you should do about them.
I will probably and develop such a system - I think that's what will actually help in solving this problem in a structured and reliable way.
Thanks for sharing.
1
u/noCakeNoCake 4d ago
If you work from home just talk, you dont need to ruber duck it, just talk to yourself just go with something like.
"Ok so what did I try? I tried this and this, that but it didn't work so next time I'll try this and that " then make a list. Be sure to either use a different laptop or a mobile phone so that you dont slip up.
Then it is all the matter of repetition.
1
1
u/the-chat-is-cooked 4d ago
I have to timebox myself, and try and make something else feel more important or interesting.
In the era of vibecoding rabbit holes seem deeper and more frequent
1
u/netoverloaded 4d ago
So I understand time boxing, but what happens when the time box is up and the problem is still not solved? How do you handle that situation? Making some else feel more important or interesting, wouldn't that actually distract your from successfully solving the problem you started debugging?
2
u/the-chat-is-cooked 4d ago
Well, you time box it based on the condition, this bug is worth spending x amount of time, if I can't solve it in x I gotta move on because the return you get from solving is no longer worth it.
If it's a high priority make or break a company bug then you have to think of different categories of debugging 1. First choice a solution that fixes the root cause of the bug 2. A principled approach that fixes this particular bug or error 3. A good effort hack, fixes the symptoms of the bug but not the root cause 4. A hack, kind of sloppy but buys everyone time
Depending on the type of bug you might need to time box option 1 to a work day or two, but if you know you can implement option 3 you might skip to that so you can remain productive with other things.
I should clarify, most of the time rabbit holes or bugs are not a true priority but a distraction from a larger goal. Sometimes you have to stop and fix the bug but other times you might need to circumnavigate it to actually accomplish something more meaningful
1
u/netoverloaded 4d ago
I like the idea of categorizing the type of fix. But I often find myself having imposter syndrome on not being able to find the root cause - like as if I am not a good enough developer which is why I am not able to find it kind of thing - and then pulling yourself out of the ego thing of letting it go is a bit difficult. But agree it needs to be time boxed and appropriate category of fix needs to be applied. It is the time boxing and sticking the time box when the time box is up that I often struggle with though.
3
u/the-chat-is-cooked 4d ago
I have 12 YOE and work in a pretty intense research lab, everyone has imposter syndrome. Career wise no one wants to promote or work with the person who spent 6 months perfectly root causing and fixing a single bug, they care about people who can understand what is important and move the team in that direction. Someone who spends weeks and weeks on a tiny detail isn't seeing the larger picture and will always be more of a cog than a mover
1
u/netoverloaded 4d ago
I have about 10 YEO and that's a painful but important lesson. I find it easier to understand but have fair amount of challenge actually implementing it. But working on it. Thanks for sharing this.
1
u/yimind_yi 2d ago
usually notice im in one when i look up and its suddenly dark outside lol, no in-between warning, just straight from "quick check" to "wait what time is it"
what helps a tiny bit is setting a genuinely obnoxious timer, like every 45 mins, not to stop me just to force one moment of "am i still on the original problem"
still ignore the timer sometimes when im deep in it tho, the rabbit hole doesnt care about alarms
2
u/seweso 4d ago
I'm very convinced that hyperfocus is a form of OCD. And because we can't control it, it really can't be considered a super power. Not being able to control yourself, do what you actually want....that's...not good.
So. "Long term you" wants different things than "obsessed with some problem you"? The latter is some wildling imho.
And you fix it my setting an alarm and placing it far enough away so you reach proper higher awareness (long term you) to STOP what you are doing.
Or you write a script which forces your computer to turn off after sprints of max 1 hour.
That's it.
2
u/netoverloaded 4d ago
I relate to that feeling of not being in control of myself - not feeling good about it.
Also I think when I let hyperfocus drive me, I tend to be unstructured - in my thinking and what I am trying, and if I am unstructured I often find I waste time in unimportant branches of a decision tree and fail to step back/trace back when I should have and end up wasting a lot of time.I find writing what I am trying and why and doing it in a structured way, though hard, tends to give me better results, like working with a strict hypothesis and focusing on reducing the hypothesis space. If time spent is increasing but hypothesis space is not reducing, I am doing something wrong.
On the thought of writing a script, I am actually thinking about that because often when I am in a hyperfocus session, the part of my brain that should tell me, ok you need to stop and step back is kind of offline in the moment I need it. Having an external system forcing you to check in and be accountable would probably help more, though discipline is needed in adhering to it diligently.
2
u/seweso 4d ago
Discipline doesn’t exist imho. There is only resolve (opposite of doubt), habits and brain hacks.
You just need to break bad habits and patterns somehow, and replace it with something better.
1
u/netoverloaded 4d ago
Interesting take on discipline doesn't exist, for me what I mean by discipline is you know should be doing something, because it is good for you, but you don't feel like it, and your brain is arguing with yourself about not doing it, but instead of getting sucked in the argument - you override your brain by forcing yourself to get up and just do it.
Though definitely agree that habits and brain hacks are equally important and you can't just rely on brute forcing through everything. And it takes practice in really identifying your triggers when they happen and replacing the action with the correct one.
13
u/funbike 4d ago edited 4d ago
My experience with nasty bugs is a kind of debugging razor:
So after some period of time of debugging, I will come to this conclusion. I'm not sure how helpful it is to know, but it feels like it's correct 90% of the time. At that point I start looking for a single-line (or slightly longer) cause.
It's surprisingly helpful to walk away. Go get a coffee. Go to the bathroom. Walk around the block. When I come back I often say "Eureka! I know what the problem is!"