I am not sure whether this question has been already discussed or not, but I would really like to know What are the ways you follow if you get extreme/moderate disturbance while you are coding (office/home/anywhere).
I use active noise-cancelling earphones, plus music that blocks out the external noise for that.
Earphones, and just wear underpants and a string vest. Take the phone off the hook.
You'll find nobody will disturb you.
White noise can have the effect of masking background noise. After a few minutes your brain starts to filter it out.
It depends on the reason you are being disturbed. If there is just general background noise then noise-cancelling earphones is a good idea. I only use them as a last resort as I prefer silence to music, but if it gets too bad I still prefer my own music or podcasts to a noisy office.
If people are in the habit of disturbing you to ask questions you have to break them of that habit. Try being polite and tell them that you don't have time now but could attend to their problem later. (I know you have already been interrupted and may feel that you may as well help them out, but you need to wean them off the expectation of instant gratification every time they come to you with a problem). Let people know that you're available to help out at specific times of the day. (Say straight after lunch) or an hour before you go home or whatever suits you.
It is very important to try and get your co-workers to respect your time and to understand that interruptions can be incredibly counter-productive. (Just make sure that you respect your co-worker's time in turn).
Good Luck!
Here are a few of the ways I use:
- Realise that you are not a coding machine. You're a human being. Get yourself in the 'mood' for coding. I find I'm more easily distracted if I'm not. I work more productively in the mornings, so I start coding as soon as I sit down for work, and keep on coding until I run out of steam. Make others aware of your routine.
- Tell others that you need quality coding time and not to disturb you, unless it's absolutely necessary.
- Don't be afraid to take your phone off the hook.
- Turn off your email.
- Turn off your computer's clock. This works for me as I'm a terrible clock watcher, and that distracts me.
- Don't be forced to switch tasks by others, this can be a big distraction and can slow you right down. Tell them instead that you'll get round to it.
- Do switch tasks if the current one is boring you or you're not making much headway. The break can often help.
- Have a word with your manager and physically move away from the distractions by having a quiet room or space. Tell your manager that your performance will improve if so.
- Have a set period of the day for discussions or idle chit-chat or otherwise set up more formal meeetings.
- Lastly, don't beat yourself up if you find that you are distracted. Do easy maintenance jobs instead or research on the internet.
If you keep getting distracted there are many ways to just blank out the rest of the world. Calming music i find the best when integrated with some noise cancelling headphones.
Here is my spotify playlist that i listen to when have to get down to some serious coding.
Click For Playlist
Apart from that, i suggest asking them to be quiet and respect that you are trying to work. Also, take a break and sometimes join the distraction for five minutes. It will clear your mind and sometimes if you are stuck, you will come back with a better state of mind and be able to fix the problem.
Schedule a meeting room for yourself and use that time to get some work done free from the normal environment/distractions.
If it's possible, talk a walk outside to get away for a few minutes and recharge/refocus.