Stop in the middle of something
Over the years I’ve found little tricks to keep myself working efficiently.
For some reason I have it in mind that people think it’s good to finish off tasks before taking a break or heading to bed. I find that that’s a really bad strategy. If you finish what you’re doing before you stop, then when you re-start work, you’ll have to look for a next task to begin. There’s overhead in that no matter when you do it. But when you go back to work you have less momentum. It’s harder to begin on something new from a cold start.
I find I’m much more efficient if I leave tasks incomplete before taking a break. That way when I come back to them I just pick up where I was. So I’ll leave a line of code only half written, or open a quote and not close it so the syntax coloring in my editor looks wacky. Or I’ll simply stopping writing in the middle of a sentence. With code you have the advantage that you can leave it syntactically incorrect, so there’s no chance you can forget to fix what you were doing.
If you’re heading to bed, it’s best to take your task to the point where what remains is just mechanical. That way you don’t continue to think about a problem when you should be falling asleep.
Right now, in another window, I’m running a bunch of unit tests. When I finish this blog entry I’m not going to go look at them, I’m going to bed. I’m pretty sure they’ll run successfully. In the morning I’ll have to do a few mechanical things – fix any failed tests and re-test, merge my changes, re-run tests, close a ticket, and remove a completed branch. By the time I’m done with that I’ll be in the swing of things and starting a new task will be easy.