Suddenly, the door opens and every iota of concentration that you’ve mustered disappears.
It could be your co-worker, your parents, or your housemate. It doesn’t matter.
“Hey, did you get that email I sent you?”
“Did you check your credit card bill?”
“Hey bro, want to go for a beer?”
Your first instinct is to lash out with the fury of a thousand suns. Who wouldn’t? The million or so things that you have been juggling in your head are long gone from your consciousness, because someone interrupted your train of thought. Interruptions are to a programmer what Gabe Newall is to a Big Mac; unrelenting and devastating.
Your first instinct is to unleash a barrage of comic-book-guy-esque indignant rage. Why wouldn’t you? This… Person has invaded your workspace, displaying no respect for your work… No, your art. You want to make the invader pay.
But that in itself is folly. This person who you are about to give a verbal beatdown probably has no idea why you’re so irate, and why you’re so dependant on peace and quiet in order to do your work. And you’ll probably end up escalating things, and both parties walk off thoroughly pissed off.
“If I don’t understand, why should I care?”
I think programmers tend to have a sort-of superiority complex when it comes to non-coders. “How could they possibly understand? They don’t even know what a bloody variable is, for god’s sake! Why bother explaining?”.
And of course, we’re not surprised when we then get interrupted, or others don’t show the desired reverence towards our work. We’ve never actually told the person why it is so damned important that we be left alone to work.
People who don’t understand something often don’t have the same motivation to give it the same degree of respect. But how do you explain software development in a short enough time to maintain interest? I like this analogy:
“Suppose you’re fixing the engine of a car. Now, if you make a mistake, the car might not work and the passengers will be stuck. Somewhere dreadful. Like Slough. Now, if you’re not careful and don’t pay enough attention, you might make a botched job where the engine starts, but it pumps lethal carbon monoxide into the cab, and kills everyone onboard. Programming is a bit like that.”
“The sock-on-door-handle methodology”
Being a productive person means setting up your own work environment that is conducive to how you work. Often, that means filtering out any distractions. I personally like to add Reddit, Facebook and Twitter to my hosts file, listen to a radio station I like (Usually World Radio Switzerland, BBC Radio 4, NPR or Triple-J) and focus on my work from there.
Other people, when passing your workspace will not see someone deep in conversation at their desk. They may see a closed door, but won’t know what you’re actually doing behind it. As with the previous point, education is better than getting someones back up. Letting people know that you absolutely cannot be disturbed is far, far better than getting in an argument that leaves both parties thoroughly annoyed.