i bet part of the reason it seems like the CS community is over-sampled from the adhd population, I bet part of it is that being prone to forgetting what you were just doing or thinking about forces you to write encapsulated code with meaning variable/funciton names. adhd learn to write self-documenting code because they have to. it's a filtering function, so there's a survivorship bias that favors adhd people
oh yeah, and "test as you go" as an alternative to TDD or lots of early design. make tests as you develop functionality, and then you have a safety net to aggressively and constantly refactor.