Interruptions are an ultimate killer of productivity for any software developer. When writing code, everything from algorithms to variable names are stored temporarily in the brain. If you are interrupted, your brain is forced free up room in order to switch context. This knocks bits and pieces of valuable programming information out of your head!
During the work day, programmers can achieve what I like to call the programming groove. It's a wonderful place! Ideas and solutions flow elegantly from the mind, through the fingers, into the keyboard, and out to the editor. Seemingly effortless. It can take up to half an hour of uninterrupted work time to get into a programming groove. The slightest interruption can completely derail a developer in this zone. Once disrupted, he or she will likely take an additional thirty minutes to get back into the groove.
You can stand up and tell everyone you don't want to be bothered. It's the most straightforward solution. However, there are some slight visual cues you can give others to show them you want to be left alone. Here are a few that work for me:
Hands on the keyboard.The physical act of programming is typing. You can go on about all the brainstorming, architecting, and white-boarding that goes into software development, but if you aren't physically typing, you aren't actually programming. By keeping the fingers on home row, it shows you have a solution brewing in mind and you're ready to execute a plan. People are more hesitant to interrupt a programmer whose fingers are, quite literally, on the trigger.
Back straight, body aimed forward.More than half of all human communication is through body language. It's important to maintain eye contact with the screen, but using the entire body conveys even deeper focus. Always keep your shoulders and feet square with the computer. Keep the back straight, don't slouch. Slouching is a classic sign of boredom (or laziness) and it's bad for you anyway. Show everyone you're engaged, intrigued, and directly focused on the code on the screen.
Only code-related windows on the screen.This is important, especially in an open environment. People will look at your screen, this is an undeniable fact. Everything in your line of vision should be directly related to the code you are writing. If there is a glimpse of anything else (Facebook, Twitter, email, etc.), it shows that your attention is split, even if it isn't. To most people, if there isn't code on the screen, you're taking a break.
Break off all virtual communication (with the exception of pairing).My company uses Hipchat to communicate. Utilizing a chat tool is a very convenient way to collaborate. It's also a convenient way for people to interrupt you. Sign off. Simple as that. If you absolutely have to be online (especially remote workers), set your status as "busy". I personally like to stay signed into chat with my status set accordingly. If people see that I'm "busy", they tend to leave me alone.
Headphones.Any of the above suggestions can be further amplified by adding headphones to the mix. You're effectively attempting to tune everyone else out, and they notice. A person with headphones on is far less approachable than one without. Use this to your advantage.
What are some of the ways you let people know you don't want to be disrupted? Let me know in the comments!