Pay Attention In The Moment
The best way to write good quality software is to pay attention in the moment because that’s when all the ideas are circling in your head and you have all the context needed to be make good decisions.
When you come back to a piece of code you have to re read everything to gain context and the larger the project the more times it takes to get to know that small details that matter.
For this reason you should never stop working on the clock but in logical increments that you can discard once you are done in order to make mental space for the next thing.