This is more important, now that many of us are working from home. I live by myself, so I won’t have much to say about how to minimize distractions from your family. I’ll cover things that let me focus on being productive.
Unfortunately, the internet can be a huge source of distraction – but it’s difficult to program without access to the internet. StackOverflow and technical blogs are our programming manuals.
I use RescueTime to track what I’m doing during the day and show me what are common sources of distraction for me. When I want to work, I can set RescueTime to “focus time”, to block access to distracting websites.
There are other programs to block access to websites. If you find yourself spending more time than you want on certain websites, try blocking them during work hours.
I use the Brave browser with uBlock Origin. This combination hides distracting advertisements from me when browsing.
You can also use uBlock Origin to hide sections of websites by adding filters in uBlock Origin’s Settings page. For example, I hide the suggested videos section of YouTube. When I need to watch a programming video, to solve a problem, I don’t get pulled into an hour of watching videos.