Content area
Full text
Strategies for avoiding interrupted coding sessions
Im writing this article in a dull state: low sleep, busy, disorientated, and interrupted. I try all the remedies: using the Pomodoro Technique, working in coffee shops, wearing headphones, and avoiding work until being distraction-free in the late night. But it is only so long before interruption finds a way to pierce my protective bubble. Like you, I am programmer, interrupted. Unfortunately, our understanding of interruption and remedies for restoring focus are not too far from homeopathic cures and bloodletting leeches. But what is the evidence, and what can we do about it?
The cost of interruption
Every few months I see another programmer asked to not use headphones during work hours or interrupted by meetings too frequently to do any work, who has little defense against these demands. I also fear our declining ability to handle these mental workloads and interruptions as we age.
Researchers who have studied the costs of interruptions in office environments estimate that interrupted tasks take twice as long and contain twice as many errors as uninterrupted tasks. They also found that workers have to work in a fragmented state, because 57% of tasks are interrupted (see References for citations).
For programmers, there is less evidence of the effects and prevalence of interruptions; typically, the number that gets tossed around for getting back into the zone is at least 15 minutes after an interruption. Interviews with programmers produce a similar number. Nevertheless, numerous figures in software development have weighed in: Y Combinator founder Paul Graham stresses the differences between a makers schedule and a managers schedule, and 37signals founder Jason Fried says the office is where we go to get interrupted.
Studying programmer interruption
Based on an analysis of 10,000 programming sessions recorded from 86 programmers using Eclipse and Visual Studio, and a survey of 414 programmers, we found:
A programmer takes 10-15 minutes to start editing code after resuming work from an interruption.
When interrupted during an edit of a method, a programmer resumed work in less than a minute only 10% of the time.
A programmer is likely to get just one uninterrupted two-hour session in a day.
We also looked at some of the ways programmers coped with interruption:
Most sessions...





