Finding the zone again

by Rob Kitson

I just happened across this post about being a more productive programmer by Matt Moore.  I especially liked his 2nd suggestion.

2. Leave Yourself a Place to Start (or: Leave work with something small broken)

Programming effectively (at least, for me) requires me to have a lot in my brain at one time - which I 'load' when I start, and which rapidly dissipates when I get distracted or stop.  That means that getting started and 'into the zone' is the hardest part.  What makes it easier to get started is if I have a simple task to complete that gets me in the zone.  

So, any time I stop (lunch, or in the evening), I intentionally break something so I can get right back and fix it - when I get back to work, I'm not only anxious to fix it, but I'm in the zone after I'm done fixing it.  
There was a famous sculptor (or ten) who, before he'd leave for the night, would smash a sizable dent into his sculpture - so in the morning, he'd know where to start.  Many programmers I know have a problem with this - but seriously.  Try it a few times, and see if it gets you up and running faster, more consistently.

I use a similar approach to warming up, but since I/we use continuous integration there are times when I can't break anything when I leave.  Like when I've finished for the day and happen to be finished with a particular task; I want to do my check-in ASAP so that I can do a quick brain-dump about my changes in the check-in comments, but I don't want to break the build by adding/removing something that will either keep the project from compiling or keep the tests from passing.  I've found it useful to write some notes about what I would be moving on to if I were to keep working, either on a piece of paper or in OneNote.  Those notes are the first thing I look at when I sit down to start again, and usually give me enough of a kick-start to get going again.

On days that my notes aren't enough, I simply look for a few 5 minute-type tasks that I can pick off and go to town.  After a couple of those I'm usually primed and ready to go.