Thursday, October 14, 2010

The Interruptible Programmer

I just read Steve Streeting's excellent post Work 2.0 – the interruptible programmer where he counters the conventionally assumed benefit of long hours of uninterrupted programming. It took a bad back to make Steve realize that programming for long hours at a time was not only unhealthy, but it was also unproductive. I have to agree with his conclusion. You need to break up your work to alternate between the two ways of thinking, which the book Pragmatic Thinking and Learning: Refactor Your Wetware calls the L-Mode and R-Mode (Seriously, buy the book if your job requires you to use your brain).

While I agree with the conclusion, I do have a problem with the word "interruptible." Breaks are great, but I still do think that interruptions are bad. The difference between the two is that breaks can be planned, interruptions are not and can happen at really disruptive times in your thought process. As Steve eloquently describes "When you’re in that Zone, you’re juggling a whole bunch of context in your head, adjusting it on the fly, and maintaining and tweaking connections between issues constantly." I love that juggling metaphor because that is what it feels like. When a colleague stops by your desk to tell you that he just sent you an email, all the balls that you were juggling fall to the ground and it can take a really long time to get them back in the air. The article lists some useful techniques to help you freeze that context so the balls don't roll too far when an interruption happens, but they all require some proactive habits. If the interruption happens right before you save your context, you lost everything since the last save. It is a little like auto-save in Microsoft Word — it is great at mitigating loss but computer crashes still suck. Similarly, regularly auto-saving your context makes you more interruptible (that is, less damage is done) but that doesn't mean interruptions are good. The article even makes the point that you should table tangential tasks rather than interrupting yourself.

When I am really slammed with work, I try to practice the Pomodoro Technique and I think that Steve's context saving, prioritizing, and pacing strategies are very compatible with it. In particular, as your 25 minute timer runs down on a work session, it is a really good time to spend a few minutes saving context when you are still in the zone. I will have to try that, but that won't make me interruptible.