Writing down every step of a task as I do it
Mapping steps of a task as I go
One of the problems with doing any task (although particularly something technical like coding) is simply how to hold the steps of a task in mind, and remembering what you intend to do next. As we learned when looking at executive functions, having a good ‘working memory’ for what you’re currently doing is a separate process from coming up with these steps in the first place (and both are directly impaired by ADHD). It can be incredibly frustrating to come up with ideas about how to solve a problem and then not be able to remember all the threads at once, and thus lose your direction and have to wait until you can bring your mind to regenerate all the parts under consideration again.
What we need to do is to make sure that we can tackle one thing at a time, so that we can plan out our next steps without losing anything that we were thinking about. This is why I often keep a piece of paper in front of me while I’m working or coding in order to map out all the steps I’m considering taking. I connect these all loosely together like a flowchart (a mind-map could work too, but I find that usually I need something a bit more linear for steps to do in a task), and as I do them I can cross them off in the same way as a to-do list. I often make a little avatar of myself (usually a little stick figure on a scrap of paper with blu-tack on the back) which I can put next to the task or question I am currently doing. This really helps me to reorientate my attention quickly when I am interrupted or my concentration lapses for a moment.