A few years ago, I had no power for 8 months, so I was coding on paper first. One day, after finishing a program, to my surprise, I noticed that I was sweating and was being bitten by mosquitos. The days before that I could barely sleep or concentrate due to the heat.
So now when I hear lawnmovers, etc., I make a conscious effort to keep myself focused. I mean, now I know that it is possible to ignore the outside world, so if I look to the side because of a noise, I try to recenter my eyes and tell myself: "here"