I would say this is a bit more personal, but one thing that has worked super well for me is a really good pair of sound-cancelling headphones. I personally have these ones. They're definitely expensive, but the hours they've saved me have justified the cost for me.
How does it help?
1) It allows me to physically shift between work and distraction, which prompts me to mentally switch as well. When someone asks me a question, I take off the headphones, and I feel like I've switched modes to address the issue at hand, and when I want to go back to work, I put them back on, and I'm mentally back in the zone. The physical action of switching works really well for me.
2) They're not just for music. Just being able to cancel out generic white-noise of the workplace (AC, background conversation) is a good way for me to focus on the task at hand.
3) It relieves stress. A study done by the The Journal of the Acoustical Society of America described how low-level noises, when exposed to for a long time, increase stress levels. I think an argument can be made about using noise-cancelling to calm down and better tackle a problem at hand.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.