I think the root cause is the complexity. I do a lot better in jobs where the situations might change but the rules don’t. In programming, everything is changing all the time and I can’t keep up. There’s no repetition and if you are repeating yourself you’re doing it wrong.
I need parts of the day when I’m not being creative within a formally strict environment. It takes too much processing power for my brain to do that, and it overworks me.
I know the root cause and the problem is solved because I’m working jobs that have complexity within the range I can handle.
> I think the root cause is the complexity.
Split the problem into manageable chunks, then attack the chunks. Apply recursion as needed.
This is part of a more senior skillset, as some times a senior will be breaking up the problem and assigning the smaller pieces to other devs.