to reload context.
Instead, you have to drag all the bits of
memory back in, sort of one-by-one. That
means that if you are deep into a task (such as debugging) and then
get interrupted, it can take you an average of twenty minutes to get
back into it. Twenty minutes. Consider how many interruptions
you may get in a given day; if each interruption requires twenty
minutes for you to recover, a good portion of your day is just plain
wasted. This could explain why programmers in general hate to be
interrupted—especially by nonprogrammers.
10. See Flow: The Psychology of Optimal Experience [Csi91].
11. See http://www.umich.edu/~bcalab/multitasking.html.
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
OPTIMIZE YOUR CURRENT CONTEXT
237
A Problem of Organization
You may have already experienced this problem with
email: if you keep separate folders for various topics, what
do you do with an email that cuts across the categories
you use? Using discrete categories for filing starts to fall
down after a while, and no longer is useful. In a wiki, you
can get around this by cross-linking topics—it doesn’t have
to be strictly hierarchical. But with email, you generally can
put a message only in a single folder.
It seems better to not store any email in folders. Instead,
just have a couple of large buckets (by year or by month
perhaps) and rely on some flavor of search technology to
find what you need.
You might use virtual mailboxes if your email client supports
it. This creates mailboxes on the fly based on search criteria
you set up. A mail message may appear in multiple virtual
mailboxes, which can help you find it when you need to.
Or, you could just use a local search engine. Something like
Spotlight on the Mac or Google Desktop.
In today’s digital culture, this is part of a larger, dangerous phe-
nomenon known as cognitive overload. It’s a cocktail of stress, too
much multitasking, too many distractions, and the frequent flurry
of new data to deal with. Scientists agree that trying to focus on
several things at once means you’ll do poorly at each of them.12
And if that wasn’t bad enough, a controversial study done in the
United Kingdom noted that if you constantly interrupt your task
to check email or respond to an IM text message, your effective IQ
drops ten points.
By comparison, smoking a marijuana joint drops your IQ a mere
four points (see Figure 8.4, on the next page).
Whatever you do, please don’t do both.
12. There are plenty of mainstream press articles on the topic, such as “Life Interrupted” [Sev04] and “Slow Down, Brave Multitasker, and Don’t Read This in Traffic” [Loh07].
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
OPTIMIZE YOUR CURRENT CONTEXT
238
Figure 8.4: Relative IQ point loss
This makes me wonder if companies should focus less on manda-
tory drug testing and perhaps instead concentrate on mandatory
email-habit testing.13 But of course it’s not just about email and
drugs; drivers conversing on cell phones cannot respond quickly
to highway hazards, either. Television news channels overflow with
different news stories on the main screen, small video insets, and
a couple of scrolling headlines, all separated by commercials for
dancing toilet paper. From a cognitive science point of view, that’s
just plain torture.
Given that we’re so bad at handling multiple things at once and
that we are very easily distracted by a myriad of technical marvels,
let’s take a look at how to avoid some common distractions and
stay on task.
Avoiding Distractions
In an episode of All Things Considered on NPR, Paul Ford extolled
the benefits of a spartan user interface.14 Consider an early word
processor such as WordStar or WordPerfect on an early text-based
13. Although it makes a great story, the underpinnings of this study were question-able. See http://itre.cis.upenn.edu/~myl/languagelog/archives/002493.html.
14. “Distracted No More: Going Back to Basics” by Paul Ford, All Things Considered, November 23, 2005.
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
OPTIMIZE YOUR CURRENT CONTEXT
239
Deliberate Switching
One way to help fight this is to approach context switch-
ing more deliberately (notice a trend here?). Instead of
just jumping over to an IM or email, make it a deliberate
act. Close down what you’re working on. Take a couple
of deep breaths (we’ll talk more about the importance of
breathing and email apnea in just a bit). Muster up some
curiosity and interest in the new activity. Face it full on and
well-armed.
operating system (CP/M, MS-DOS, et al). There were no windows.
No mouse. No email, no games. A working setup that is so bland, it
turns out to be inspiring. Or more precisely, it’s a setup that helps
you maintain your focus on the task at hand.
One of my favorite tools for portable writing is my Sharp Zaurus.
Toward the end of its life, I ended up taking everything off of it
except the vi editor. I took off the wireless card and synchronized
it using only the CF memory card. This left me with a device with
very few distractions; there is literally nothing else to do on it except
write. No games, no email, no Web—just the chapters and bits of
text on which you’re working. It’s spartan but effective.
On a more full-featured system, you can run a specialized applica-
tion to hide everything except the one application you’re currently
using. For instance, on the Mac you can use Think!15 to black out
every application other than the one that has focus, or DeskTop-
ple,16 which can hide your desktop icons, replace your wallpaper,
and autohide application windows on a timer.
Single-Task Interfaces
Under Mac OS X, you can use the utility QuickSilver to set up
globally accessible keystroke-based commands. It reminds me of
the terminate-and-stay-resident program SideKick on those early
systems.
15. Available from http://freeverse.com/apps/app/?id=7013.
16. See http://foggynoggin.com/desktopple.
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
OPTIMIZE YOUR CURRENT CONTEXT
240
For instance, I have it rigged so that with just a few keystrokes I
can send a one-line email message to someone in my address book.
Now on the surface of it, this doesn’t sound like much. However,
being able to send an email message without bringing up all of Mail
is a huge advantage.
/> Say you’re in the middle of some other task. You get the sudden
thought that you have to send an email to someone. Perhaps you’re
in the middle of debugging an application and you realize you will
be late for a lunch appointment. You press a few keys, send off the
mail, and get back to debugging.
Now compare that to the usual experience.
You’re in the middle of debugging, and you realize you have to send
an e-mail. You context switch to the Mail application, bring it up,
start to send the email, and notice several new emails have come
into your inbox, and now the distraction is right in front of you.
You will quickly become ensnared by the new email messages and
lose your train of debugging thought. Context blown.
In a similar vein, I have Quicksilver rigged so that I can add a line
to my to-do list with just a few keystrokes. Otherwise, you run the
same risk as with email. You have to turn your context to the to-do
list, and as soon as you’re there to type in your new entry, you see
all the other things you’re supposed to be doing, and once again
you are distracted.
You can do the same sort of thing in Linux by keeping a small
terminal window open with a shell script that will add to your to-
do list.
When you have a thought, it’s much better to send it to where it
belongs—whether that’s the to-do list or email—and then get right
back to what you’re doing.
Organize and Process Tasks Efficiently
While we’re talking about streamlining your interface and work
habits, we’ll have to take an obligatory tangent to discuss GTD.
David Allen’s Getting Things Done: The Art of Stress-Free Produc-
tivity [All02], known by the acronym GTD, is a hugely popular
book/method/cult aimed at helping you organize, prioritize, and
effectively complete your work.
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
MANAGE INTERRUPTIONS DELIBERATELY
241
He supplies a methodology and a lot of tips and tricks (who knew
a labeler could be so much fun) to help you be more efficient at
plowing through tasks.
In terms of the ideas we’ve looked at here, Allen makes three criti-
cal points. The first two have to do with processing email or other
inbox-related piles, the last is a more general note:
1. Scan the input queue only once: Whatever input queue you are
dealing with, be it in an email inbox, voicemail, or paper inbox,
don’t use the arrival box as a storage device. Go through and
sort the new arrivals into whatever piles are necessary, but
don’t keep rescanning the same old stuff in the input queue.
If it’s something that can be dispatched in less than two min-
utes, then do it and get it over with, or pawn it off on someone
else entirely if you can (aka delegation). Constantly reviewing
the same 1,000 inbox messages to work on the last 20 impor-
tant ones just wastes your time and mental energy.
2. Process each pile of work in order: Once you have your piles,
work them. Stay on task, and avoid context switching. As we
saw earlier, switching to another task will blow your men-
tal stack, and you’ll lose more time as you get back into the
task. We programmer types are highly susceptible to being
distracted by shiny things. Stick to your pile.
3. Don’t keep lists in your head: Allen spots another important
aspect of maintaining an exocortex. Dynamic refresh of men-
tal lists is very expensive. Instead, keep to-do lists and such
somewhere in your exocortex—on a sticky note, in a wiki,
in a calendaring or dedicated to-do list tool, or in something
similar.
The GTD method has a lot of fans, and if effective prioritizing and
task organization are the sort of thing you have trouble with, GTD
might help.
8.5 Manage Interruptions Deliberately
Even the best organized to-do lists and daily plans will not help
insulate you from distractions, however. Everyone is subject to dis-
tractions, but these days we have a wider selection of distractions
than ever.
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
MANAGE INTERRUPTIONS DELIBERATELY
242
Figure 8.5: A maze of twisty little passages, all alike
The Net offers the widest assortment of distraction in history.
Everything from the usual disgust at greedy, rapacious spammers
to a cool how-to make your own snow-making-machine video on
YouTube; inflammatory Digg postings about yet more election fraud
or thieving politicians (as shown in Figure 8.5); a couple of IMs from
your closest friends; and a dozen new Wikipedia articles—all there
to entice, inform, and distract you.
Here are some suggestions to help cut down on interruptions from
your team, your communication channels, and yourself.
Set Project Rules of Engagement
When is it OK to interrupt your teammates with a question, to ask
for help tracking down a bug, or to request an impromptu code
review? When is it OK for them to interrupt you? How about emer-
gencies from your manager?
These are all valid questions, and the best way to manage them is to
provide answers up front—before the project begins. Set up certain
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
MANAGE INTERRUPTIONS DELIBERATELY
243
Can’t All Be Winners
Not every day will be a productive day. If events turn
chaotic, it might be more effective to acknowledge that
and realize you’re just not going to get in the groove. Fight
the fires, enjoy the pizza at your desk, and hope for a better
tomorrow.
times of the day as work sessions where you are not to be inter-
rupted. Set up other times for collaboration, daily stand-up meet-
ings,17 and the usual assortment of unanticipated contingencies.
Maybe you are freshest in the mornings or perhaps late in the day.
However you manage to work it out, at least you’ll have one portion
of the day where you can actually be productive. I’ve heard from
teams who have created email-free afternoons or entire days: no
email, no phone calls, no interruptions. The developers involved
said these were the most productive, happiest times of the week.
TIP 42
Establish rules of engagement to manage interruptions.
So establish the rules of engagement (really, the rules of interrup-
tion) for your team early in the project.
Rein in Email
But not everyone plays by the rules. Your teammates in close prox-
imity will honor the rules you’ve set up, but what about co-workers
in remote offices or all the people you might deal with from other
companies, customers, and all the rest of the sea of humanityr />
that’s on the other end of an email, IM, or phone call?
You can’t get the whole world to play by your schedule.
Or can you?
17. See Practices of an Agile Developer: Working in the Real World [SH06].
Report erratum
Prepared exclusively for Jose Luis Loya
gggggggggggggggg
this copy is (P2.0 printing, January 2009)
MANAGE INTERRUPTIONS DELIBERATELY
244
Beware of Email Apnea
In February 2008, Linda Stone coined the term email
apnea. One morning, she noticed, “I’ve just opened my
email, and there’s nothing out of the ordinary there. It’s the
usual daily flood of schedule, project, travel, information,
and junk mail. Then I notice...I’m holding my breath.”
email apnea: a temporary absence or suspension of
breathing, or shallow breathing, while doing email.∗
Shallow breathing, hyperventilating, or holding your breath
altogether are not just mere inconveniences or odd side
effects; not breathing normally and deeply can be seri-
ously damaging to your health. Bad breathing contributes
to stress-related diseases, fires up parts of your flight-or-fright
response, dumps glucose into your bloodstream, and has
a host of other unfortunate effects.
Does the anticipatory stress of email affect your breathing?
How about a program crash or tracing through a debug-
ger? Or any other common scenario on the computer?
If you find any of these affect your breathing, just sit back
and take a deep breath. Every time.
∗.
See http://www.huffingtonpost.com/linda-stone/just-breathe-building-th_b_85651.html.
You are more in charge of email than you think; it’s up to you as to
how often you pick up and respond to email. Here’s something to
try: limit your email handling to specific, scheduled times during
the day—probably not first thing, though. Set a time, pick up and
prioritize your email, and time-box it. Move on to real work after
some fixed time. It can be a hard discipline to maintain, but I have
some tips that might help.
First, fix your email announcement. A bouncing icon is irresistible;
it begs to be clicked. So too is an endless stream of unreasonably
chipper “You’ve got mail” pronouncements. If you can, turn it all
off. At a minimum, play a sound only on important messages, such
as those from your spouse or boss.
Report erratum
Pragmatic Thinking and Learning Page 30