Now I tend to adopt only two modes when coding :
I try to avoid any intermediate state. If I code too slowly for too long time, it means the spec wasn't clear enough, or maybe I'm diving into a side-feature, nice-to-have stuffs, or too complex implementation.
At that point it's time for a break.
Moreover almost all solutions to complex problems are solved during pause time (sleep, coffee, reading, whatever).
Any thought ?