Programmers with ADHD, does this happen to you?
I'm a long-time career software engineer, but I was only recently diagnosed with ADHD.
At my new job, I've been noticing when looking at code I wrote a while ago, that I often overlooked safeguard code, such as null checks and exception handling. Everything else is where it should, but those are sometimes just not done, even though I know very well they need to be there. It seems to be the only type of logic I overlook, and I don't skip it all the time.
I'm wondering if this is an artifact of hyperfocusing when writing code. Like, I'm so focused on the coding the standard flow of logic, that I sometimes forget to add logic for the edge cases.
At my last job (which I had for a couple decades), we developed using TDD (test driven dev). In that case, you have to create unit tests for every use case, including failure and edge cases. I'm thinking this might be why I never noticed this issue before.
Has anyone else had a similar issue? Does this sound like something caused by hyperfocusing? Or is it something else?
I'm going to switch to TDD practices to mitigate the issue, but I'd love to know if I'm not alone here.
Posted Jun 15, 2026, 12:53 PM UTC