If I could ditch the computer altogether, I'd do so in a heartbeat. Unfortunately, to do my job, fulfill errands, or to make most projects happen in the modern world I usually need access to a computer and to the internet.
Are there ways to address this problem? pg mentioned getting a computer that wasn't connected to the internet, but admitted that the strategy didn't work.
What are your strategies?
- Editing your /etc/hosts to block the worst offending sites that offer no real value
- Using tools that augment sites that are distracting but can be useful (e.g. YouTube)
- Using website blockers - I made one that uses AI to recognise what is and isn't on task 
- For me the single biggest thing is changing my physical environment for better habits. E.g. coffee shops and coworking spaces aren't the best for focused work but they at least make me more consciously aware that I should be working and not wasting time on distractions. Obviously you are in an office this may be difficult to change though.
The deepmode extensions sounds great. But how does it know, what I am supposed to be working on? And how does it handle context switches? For example programming, then literature research.
You set a task description on the extension's popup page and then this gets sent to the API which will figure what the relevant categories are (this doesn't always work perfectly but you can edit them yourself after).
If you want to switch contexts you can just set a new task, although if the topic is the same - e.g. machine learning both in the case of programming and literature research then you shouldn't need to.
Same issue. Now I use an website/application blocker. I set up a schedule 8:30~19:00 so that I can't access distractions during my workday, even If I wanted to! My tool of choice is focus https://heyfocus.com/?utm_source=focus_about I'm not affiliated to the developer, I just really like the app. I locked down the settings so that there's no way to undo the block while it's running: the lack of options is oddly freeing and it forces me to face the issues at hand. I also set up a night schedule 22:00~6:00 so that I don't waste a good night's sleep online (but I do cheat on that sometimes...).
Secondly, I use Adblock Plus and other plug-ins to edit out parts of websites. I removed the homepage, up next and recommendations from my youtube experience. That sidebar at the side of every article/video? Gone. I can't recommend this enough, modern webpages are exhausting to look at.
Lastly, I recommend you to edit your host file to block annoying content while browsing: https://github.com/4skinSkywalker/anti-porn-hosts-file. You can find all sorts of lists online to suit your needs. Note that the host file blocks whole websites (e.g. reddit.com), not specific pages (reddit.com/r/news/). Good luck with your effort!
I find I'm most productive by postponing heavy browser usage until later in the day. So I start by postponing mindless browsing until then. When trying to avoid distractions, I only open my browser for a specific tasks and close it when it's complete. I don't open my browser if the tasks or inquiry can be postponed until later (for me, innocent sounding inqueries often end up being time-killing hydras - postponing it keeps my priorities in check, and often my interest in the task or inquiry doesn't even survive the day (on the contrary, an unimportant inquiry or tasks can easily suck up a couple hours)). I found logging my browser usage, both time spent running and why I was using it, to be helpful too. I don't do that often though, but when I feel I've wasted too much time surfing I try and crack down.
On top of that, I try and write scripts to avoid opening the browser - it also saves me from having to enter stuff into the log :^) The most frequently used example is a youtube scraper (download the first x videos for query y).
I'm also a heavy Emacs user, so I apply some of the methods towards avoiding endless elisp tinkering, as that can be a timesink too! On the topic of Emacs, I will add one last thing: keeping an agenda in org mode and deliberately clocking in and out of tasks helps me stay focused on what I'm doing - I seem to respect the clocked in time much more.
I struggled with this very problem OP and that lead me to build Focus Window (https://apps.apple.com/us/app/focus-window/id1444457097). Every single time I would work on a task I would be distracted by so many things including emails, websites, slack etc. To beat the distraction now I turn on Focus Window and that allows me to focus on a single application at a time, then I hide my desktop icons to "clear" my mind and lastly I play music that is soothing to the ear to remain calm and on task.
I have been using the switch_off addon for Firefox and Chrome since last one year. It has worked very well for me in avoiding online distraction. It blocks specified websites at specified times of the day, and also prevents opening more tabs than specified. It is a paid addon tough.
/etc/hosts blocking of every site you reflexively open, including this one. It still takes some effort but now when you start screwing around you know it's a conscious choice.
This. Having a tiling windows manager also helped me focusing on the task at hand somehow.
Theoretically, one could set up vim/emacs for development, lynx for browsing that documentation, mutt for email, slack-term, etc. Do not start the X session. Images, sounds, videos are the biggest driver of distractions. Use 3M Peltor earmuffs on top for that extra bit of isolation. If only our willpower wasn't a finite resource.
A simple trick is to turn off the all the screens you don't need for your current work. Sometimes working with multiple screens is great, but during some tasks, the browser or mail program lingering on another screen can cause distractions. In my case, I often mindlessly switch to HN as soon as I start a compile/test cycle.
For me, the Cold Turkey app is key. It has a tremendous amount of flexibility for blocking applications, web sites, etc.
Get a child lock software and install it. Such software often has functions to limit websites to non-entertainment only.
Depending on your willpower, you might have to set a very long, random password, write it on the paper, and store that password in a place you cannot get to fast.
None of these apps/extensions to eliminate distractions are effective as long as you have the capability to disable them.
Exactly why do you NEED a computer that is always connected to the internet? Disconnecting works for me, so it should work for most everyone.
I have a raspberry pi (pihole) set up to block ads but also block all my tech news sites e.g. HN, slashdot, reddit, lobste.rs, as well as twitter, facebook, CNN etc. When I'm trying to get stuff done I turn on the blocking. Works like a charm.