92

If you just consider the second part of my question, "Why a developer should not be interrupted while neck-deep in coding", that has been discussed a number of times by smart people. Heck, even the co-founder of SO, Joel Spolsky, wrote a blog post about "getting in the zone" and "being knocked out of the zone" and why it takes an average of 15 minutes to achieve productivity when participating in complex, software development related tasks. So I think the why has been established.

What I'm interested in is how to explain all that to somebody who doesn't know beans about Beans (khmm I mean software development). How to tell the wife, or the funny guy from accounting at the workplace, or the long time friend who pings you on Skype every 30 minutes with a "Wazzzzzzup?!", that all the interruptions have a much deeper impact on your work than the obvious 30 seconds they took from your time. Obviously you can't explain it by sentences like "I have to juggle a lot of variable names in my short term memory" unless you want to be the target of blank stares or friendly abuse.

I'd like to be able to explain all that to non-developers in a way that will make them clearly understand - without being offensive, elitist or too technical.

EDIT: Thanks to everyone for their great insights. I've accepted EpsilonVector's answer as his analogy was the closest one to my original needs. The "falling asleep" explanation is neither offensive nor technical, almost anyone can relate to it, and the consequences of getting disturbed while falling asleep or while being in the zone are very similar: you experience frustration and you "lose" 15-20 minutes of time.

András Szepesházi
  • 581
  • 2
  • 7
  • 16
  • 36
    Have them start from 0 and count to a very large number, mid way through yell _look! squirrel!_ – Tim Post Feb 10 '11 at 14:12
  • 8
    Surely relevant to most professions, try stopping a surgeon mid-flow. – ozz Feb 10 '11 at 14:23
  • 24
    get off skype at work. – Josh Feb 10 '11 at 14:28
  • We have this problem at work, I always ask the senior developer stuff.. Because he is the only person who knows how the code works. Unfortunately I have to interupt him to get my work done, which helps him but really distracts him. – Josh Feb 10 '11 at 14:29
  • 1
    @Josh, if it is bad, you may want to agree upon scheduled times where you can ask. I.e. 8.30 and right after lunch. –  Feb 10 '11 at 19:38
  • 6
    "without being offensive", I knew there was a catch somewhere. :) – biziclop Feb 10 '11 at 19:40
  • 7
    @Josh At work we use Skype for interoffice communication. We need it open. I have a separate work account, but you still run into these issues. – Matthew Scharley Feb 10 '11 at 20:10
  • +1 for skype being used for interoffice communication and therefore can't be turned off, especially as a small popup is imho less intrusive than coming to one's room (because then it completely disturb the target person). – wildpeaks Feb 13 '11 at 06:27
  • 1
    I too am pretty sure this is one of those 'relevant to most professions' questions. Pretty sure you shouldn't interrupt a pilot neck-deep in landing. – Fomite Mar 31 '12 at 04:17
  • If they are a long time friend and they are being a jerk then I think you are allowed to be a bit rude – jk. Mar 31 '12 at 09:32
  • 6
    This is why: http://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-a-programmer – BlaM Oct 31 '13 at 09:39
  • 1
    This is an excellent question, and I totally empathize with you, as I have the same problem. Here's the only solution to it (that I've found working): make sure you always have a set of good headphones with you at all times. The gel-tipped one are the best. This way you can no longer hear what's around you even when listening to music at low volume. Then kill Skype and Facebook and you're good. What I'm trying to say is that I don't think you can ever explain this to a non-developer. Most people don't empathize with your need for concentration simply because they never needed to practice it. – Shivan Dragon Nov 30 '13 at 09:28
  • related: [Interrupting Work Productivity: The Name?](http://programmers.stackexchange.com/questions/53453/interrupting-work-productivity-the-name) "Certainly it is a productivity killer when a developer is constantly interrupted..." – gnat Mar 07 '14 at 07:00

18 Answers18

124

Try the following analogies: First one: "How long does it take for you to fall asleep?" "X minutes" "Now imagine that when you are close to falling asleep, someone walks in and interrupts you, how long will it take you to fall asleep now? Those few seconds you had left, or will you have to start again to 'sink back' to where you were?" "I'll have to start again" "Great. Same thing. Just like falling asleep, it takes me a while to 'sink' into focus mode, and it takes me a while to get back to it once I'm interrupted, except that I also forget half of what I was doing."

Second one: "You know how when you're reading a book you 'sink into it'- after a while you don't even notice the words anymore, and you block out everything around yourself, and are totally immersed in the mental images you see." "Yes." "How long does it take for you to get there?" "About X minutes" "Now imagine that when you are that immersed in the book someone walks in and interrupts you, how long will it take you to get back to that? Will it happen immediately, or will you have to start again to 'sink back' to where you were?" "I'll have to start again" "Great. Same thing. Just like with reading, it takes me a while to 'sink' into focus mode, it's just as annoying when someone breaks me out of it, and it takes me just as long to get back to it once I'm interrupted, except that I also forget half of what I read."

EpsilonVector
  • 10,763
  • 10
  • 56
  • 103
30

I don't think that the state of reverie that Joel describes is technical. It's the same right-brain shift that anyone experiences when they draw or fall under the spell of a really good book. (Betty Edwards' "Drawing on the Right Side of the Brain" describes it perfectly.) Everyone has experienced that sense of concentration where you're unaware of the passage of time.

I think it's condescending right off the bat to imagine that this is something that only technical people understand, that the concept needs to be dumbed down for non-developers to understand. Just explain in plain language - they'll get it.

duffymo
  • 3,032
  • 16
  • 23
  • +1 for plain language - I think that's what he's searching for... –  Feb 10 '11 at 13:39
  • 17
    In my experience, they not necesserily get it - they might accept it as a fact, but still can't relate to that. For most people I know, work is just work that can be suspened or continued any time. –  Feb 10 '11 at 13:40
  • 3
    Not the people I talk to. In my experience, everyone who does work that's doing non-rote tasks would be able to relate perfectly. Maybe you're talking to too many people doing rote tasks. – duffymo Feb 10 '11 at 13:42
  • 3
    @duffymo: Hmm. I don't consider a sales person who is writing a customized offer for a customer doing a rote task. Still, if I interrupt him/her, he/she will lose maximum half a minute until getting back on track. That's what I meant - most jobs are a lot easier to suspend/continue than ours. IMHO. –  Feb 10 '11 at 13:55
  • 5
    It's a matter of how much state you lose. Programmers tend to need to keep a whole program state in their head while coding, but other professions that involve more writing keep state on the document they are constructing. Which state is easier to restore? – Michael K Feb 10 '11 at 14:01
  • 2
    I think a lot depends on whether the person actually experiences the state of flow during his/her work (or free time). If they ever did, they will understand better what we mean. – Péter Török Feb 10 '11 at 14:16
  • 1
    My intuition is that the kinds of people who think it's okay to interrupt someone who is doing technical work are either those whose tasks don't get seriously sidetracked by interruptions, or those who have the ability to close the door. When all of a person's experiences with "flow" come from doing leisure activities, it's hard to understand that flow is a productive resource. – jprete Mar 08 '11 at 21:16
23

Re-route your internal thread to verbal IO, i.e. turn round when they interrupt you and keep mumbling code and looking into the middle distance until they give up and go away. If they talk, just mumble louder.

16

Tell them that coding (or insert other high concentration activity here) is like being a circus performer who does the spinning plates act.

First you start by spinning one plate on a stick, get that going, then start spinning a second plate, get that going, go back to the first plate, give it a little extra spin to keep it going, then start spinning a third plate, get it going, then go back to the second plate, little extra spin, first plate extra spin, third plate extra spin, then start spinning fourth, etc etc.

Then the phone rings and all the plates fall down.

Flow state is gone. You now have to start all over. Get one plate spinning...

I like to think of each plate as a chunk of data, variable, concept, state, etc that you have to maintain in your head.

Dhaust
  • 170
  • 1
  • 9
13

A few months ago I had someone walk into my cube and pull my earbuds out while I was coding. Internal fury aside, my approach was to explain that often times programmers are deep in logical thought which requires a different and concentrated approach to thinking and that interrupting suddenly can really mess up the thought process. It hasn't happened from that person again, so maybe it worked. Another thing you might consider is the busy/free sign. I have a friend that does algorithms and he has a two sided sign that say "Coding - Do not interrupt" on one side and "Free to Chat" on the other. Removing ambiguity is the key here.

n1reu
  • 99
  • 2
  • 16
    As long you leave the "Free to Chat" side up a reasonable amount of the time. If the "Do not interrupt" side is always up, you may as well not have a sign at all... – Dean Harding Feb 10 '11 at 14:06
  • 4
    Seems like it would get annoying, having to flip the sign around all the time. – Nobody Feb 10 '11 at 14:14
  • 3
    You could have a Thinking Cap instead of a sign. Whenever you've got your Thinking Cap on, people shouldn't interrupt you. – Ant Feb 10 '11 at 14:31
  • @rmx - a whole lot less annoying than constantly being interrupted! – Jetti Feb 10 '11 at 14:33
  • 3
    Wouldn't "Free to chat" imply (to managers): "I don't have enough work to do"? – badgerr Feb 10 '11 at 14:42
  • 2
    Or simply put up a sign that reads "If headphones are on, do not interrupt.". Removes the flipping of sign back and forth. – Craige Feb 10 '11 at 14:44
  • @Craige: But requires headphones to work properly. – Chris Feb 10 '11 at 14:56
  • 3
    @Chris: I was not above wearing headphones hooked up to nothing in the college computer lab to avoid interruptions. People assumed if I didn't answer that meant I couldn't hear them. – AnonJr Feb 10 '11 at 15:31
  • 8
    At my workplace our undocumented "in the zone" indicator is presence of headphones. The boss has said, "even if you're not listening to anything, put them on if you're concentrating. We'll take that to mean you're busy." – JYelton Feb 10 '11 at 16:23
  • I have wireless headphones at work (wireless for convenience) - big, *visible* cans. Folks don't see earbuds when they walk up behind you talking away, then get irritated when they have to repeat themselves. – DaveE Feb 10 '11 at 18:59
  • 2
    Hang a sock on the door. – Eric King Feb 10 '11 at 20:08
  • Back in the Borland days, we used post-it notes on our office doors or door frames (since the doors were usually left open except for private conversations). Mine was usually just "Go Away". When you weren't in "groove mode", you moved the post-it from the front face of the door to the back until it was needed again. – dthorpe Feb 10 '11 at 20:47
  • I love how programming itself is really a critical section, in a sense. Semaphores! – Nick Pascucci Feb 10 '11 at 21:09
  • 3
    I would find that person, walk up behind them, and clap my hands over their ears. Having someone pull earbuds out is painful to those of us whose hearing actually works. It's bad enough people banging my headphones to get my attention. When that happens I explain that loud noises startle me and I'll be back when I've calmed down a bit. Then I go out for 10 minutes. –  Feb 11 '11 at 05:39
  • @Dean, +1 for that ... a certain amount of interruption is required, otherwise people will make decisions involving you when you are not around, so it's better to try and guide those interruptions toward specific parts of your day. If you can condition people to look for the sign and follow it, you can do that fairly successfully. – Dave DuPlantis May 13 '11 at 21:04
12

Ok, I'm adding my own answer (I know this is a bit dorky, but maybe it sheds some extra light on what I was aiming at).

I said the following to someone who interrupted me recently at a bad time: "Developing software is like driving a car in a very busy road for the first time in your life. All your attention is focused on the wheel and the pedals and the cars rushing around you, and you simply don't have any extra bit of attention for a nice chat. If you start focusing on what the chat is about, you're bound to lose control over the car and you'll end up in an accident".

This was something the person could relate to, but it is far from a good analogy. If I get interrupted the consequence will be very different from an accident. I've been doing sw development for 2 decades so why do I compare this to something that is being done for the first time. And so on.

András Szepesházi
  • 581
  • 2
  • 7
  • 16
  • 1
    It's a good analogy. Just remove the 'first time' part and emphasize that it is a very busy road, with lots of crossroads, traffic lights, trucks an bicycles and that's it. Especially since the crossroads are good to represent all the decisions you have to take, without always knowing what can hit your car behind the corner. – Goran Jovic Feb 10 '11 at 15:37
  • I don't think this is a good analogy, and I think you admit that yourself, but if it gets them to respect your development time, then use it. – Bernard Feb 10 '11 at 16:07
  • That's not bad. – Marcie Feb 10 '11 at 16:50
  • 4
    Just add that there are already three screaming children in the back that you're struggling to ignore (all your own natural distractions). – Benjol Feb 11 '11 at 08:16
7

"Mihaly Csikszentmihalyi on flow" is a good TED Talk about this idea of being really productive under certain conditions that may or may not appeal to people. Don't forget that for some people they may never want to understand the explanation and thus it is kind of like beating the dead horse recursively ad infinitum.

JB King
  • 16,795
  • 1
  • 40
  • 76
4

I call it a programmers trance. There are lots of good analogies here, so what's one more eh? As has been said earlier, a programmer will mentally navigate several different logic flows until the right one presents itself. THEN it gets written in code and saved on the computer.

So, say you're writing a term paper or important document. The thoughts are flowing into words into the computer but you haven't saved the changes yet. Then poof, the power goes or the computer crashes. Getting all that back will take as long or longer and will never be the same as the original. (How many of us old timers have had THAT happen?)

This is what happens to the code in your head when interrupted. Thoughts are as fragile as smoke. If they have not yet been saved and something comes along to disrupt them, they're gone.

R Hughes
  • 111
  • 3
  • I like this one the best, because a lot of people will understand it, and because it sufficiently expresses that it won't take 15 minutes to get back into it, it will take longer than the first time and with worse results., – orbfish Apr 09 '11 at 22:27
3

Dear Distinguished CoWorker, In an effort to become more efficient I am focusing on my work and am answering questions through email at moments between work to keep interruption at a minimum to better serve you and Company name_. Please email me and I will get back to you as soon as I can. Thank you.

2

If you listen to music, put up a sign that says something along the lines of

Headphones on? Please do not interrupt.

This is only effective if anyone reads and you don't always have your headphones on.

Ian Potter
  • 111
  • 3
2

I think of it as a big web of complex connections that I have to build up in my mind, a structure of interlocking relationships that affect each other in varying, not-always-obvious ways, all of which have to be understood and kept clearly in focus as I write code. Building this web takes anywhere from 5 to 15 minutes on a project I'm reasonably familiar with, and several times that on one less intimate.

When my concentration is interrupted the web begins to collapse, and if the interruption lasts more than a few seconds or I'm required to think about some other even-slightly-complex thing ("When the server went down last week, what did you tell the customer?"), the web utterly collapses. When the interruption is over I have to build the whole web up again, largely from scratch.

If it takes me 10 minutes to build the web and I'm interrupted for just 2 minutes three times an hour, you need to understand that instead of coding for 50 minutes of the hour I'm only getting 24 minutes of work done. Those 3 tiny interruptions cut my productivity in half.

Matthew Frederick
  • 1,719
  • 10
  • 15
1

Neil Ford told about it last Devoxx. He wrote a book about it: The productive programmer. He explains tips about 'flow' breakers. If you are in the flow you are at your highest concentration point. But if you get interrupted it takes +-20 minutes to get back in your flow.

You might want to explain em if you get out of your flow you random access memory in your brain loses the data about what your are working and you need 20 minutes to get the data back in you RAM ;)

Jeff
  • 111
  • 2
0

I don't know about the rest but for Skype at least I would suggest using the "Do not disturb" mode. And if you must use it to communicate in work, having a second work-only account that you don't share with anyone you don't want to disturb you at work :)

Adam Lear
  • 31,939
  • 8
  • 101
  • 125
sashoalm
  • 313
  • 1
  • 2
  • 8
0

I usually put the following status on my IM Clients:

I am at work and since I cannot multi-task, please do not bother me...

At least it seems to do the trick with the

long time friend who pings you on Skype every 30 minutes with a "Wazzzzzzup?!"

Yaneeve
  • 219
  • 1
  • 3
  • 11
  • 1
    You do know that you can go offline or just exit your IM Client, Skype, etc. – Spoike Feb 10 '11 at 21:04
  • @Spoike Not if IM is also being used for work, as is common. – Eric Wilson Mar 07 '14 at 11:30
  • 1
    @EricWilson Register a different account for use at work, and don't tell the *long time friend who pings you on Skype every 30 minutes with a "Wazzzzzzup?!"* – Daniel Beck Mar 09 '14 at 16:16
  • @EricWilson: If you want to focus on your work for some chunks of time you can still turn off or log off IM/email even if it is used for work. I've been able to do so at the places I've worked at. – Spoike Mar 16 '14 at 11:44
0

You could try explaining, but you could also try this:

You interrupt them, while they are doing something that requires deep concentration, whether it is reading, watching a movie, calculating or even better counting something. Then, all you have to explain is that it is exactly like that for you when they interrupt you. Should do the trick. Just please don't bother them while they're driving or something like that :).

Goran Jovic
  • 2,748
  • 23
  • 28
  • Someone obviously doesn't like my approach to the problem, but sometimes the only way is to *explain by example*. Especially if the topic is obscure to the people you're explaining it to. – Goran Jovic Feb 10 '11 at 15:39
  • It doesn't sound like explaining by example. It sounds like "get your revenge." – Marcie Feb 10 '11 at 16:50
0

I don't explain. I kindly inform them that the interruption just added 6 weeks to schedule.

Throwback1986
  • 259
  • 2
  • 2
  • 4
    This suggestion is along the same lines as "be rude, and people will stop bothering you." It might be effective, but is not a good way to work in a team. – Marcie Feb 10 '11 at 16:49
  • I don't believe a "good way to work in a team" was specified as a requirement :) As I understand, the question was directed to interruptions - which may or may not be orthogonal to team membership. – Throwback1986 Mar 13 '13 at 06:15
0

What I do at the office is find hotdesk spots (hiding spots) in different departments in the office, this way no-one knows where you are and cannot disturb you, but if this is not an option, just get a sign and exlpain that unless it is of vital importance do not disturb!

kyndigs
  • 369
  • 1
  • 10
0

It doesn't have to be complicated. Something as simple and non-hostile as "I'm working on something that takes a lot of concentration. Can this be put in an email? I promise to look at it as soon as I'm done here."

Andy Lester
  • 4,810
  • 2
  • 16
  • 23