In possibly the shortest blog post known to man, I'm going to share a problem and a possible solution. I'm a rail commuter, so during the week my open-source dev life is broken into three chunks. I get a 30 minute chunk on the way into work, a 30 minute chunk on the way home, and then an hour or so in the evening. But working in these little fragments is not great for productivity! I really struggle to keep focused, to maintain a flow and keep "in the zone".
When I'm not arsing about with my highly unstable mobile internet access, I'm wasting time remembering where I got up to earlier, what test I just fixed, or what bug I was trying to track down.
My solution? I'm going to leave a nice clear trail of destruction, so when I come back later on in the day it's clear where I've been. If I'm in the middle of a line of code, and my project won't build, great - that'll put my head straight back into the exact same problem I was working on last time I was in the code. If I've just finished a unit test or a feature, I'll maybe stick in a quick comment to say where I was going next, without the "//" - again, leave the build broken.
It's quite an obvious thing, but when something's broken I get quite emotional about it, I get really engaged with that piece of code and that problem. So coming back to broken code, it's so easy to get straight back into the same mind and the same flow.