That is why developers that plan their code before using the keyboard tend to outperform other developers.
I’m a big plan of pre-coding planning. There are 2 things I do when doing development:
Things go best when I’m not doing both of them at the same time. I use Capsule to help me with the thinking part, then switch over to my editor to get coding.