I've always been an 'interruptible programmer'. While my bosses have really loved it, they pay for it by my being less productive.<p>You see, the human mind can only hold so many concepts in active thought at the same time. It's somewhere around 7. If paying attention to your surroundings is 1, there's only 6 left. If someone -happens- in the surroundings, there's at least 1 more gone. If something -interesting- happens, there 2 or 3 more as you go off on tangents thinking about them.<p>Yeah, half your mind is taken with your surroundings at times.<p>My solution is to pay attention to my surroundings when working on easy projects, and for projects that -really- need my attention, I put in earphones and block everything out. I have a few different music sets that I've heard so many times and/or they have a sound that doesn't ask my brain to process them.<p>With my earphones in, people have to yell (or call my phone or IM) to get my attention. I don't check even check my email.<p>I usually don't have to resort to the earphones. One line of thinking is that if it takes all your ability to write the code, you couldn't possibly fix bugs in it. You should be writing well below your ability so that you can fix it when it breaks. This usually means the code is easier to read as well. But some things are just innately complex, and there's nothing you can do about it.