Pulling the Plug on Procrastination
Put an end to doomscrolling and increase your productivity with the help of an $8 smart plug and Neil Chen's custom Python script.
Complain as we might about the constant distractions that are seemingly all around us in today’s digital world, most of the time we waste is given freely. Our favorite social media apps, for instance, do not simply appear in front of our faces — we choose to open them and scroll endlessly through a digital dumpster. So if we want to kick bad habits like this to improve our productivity or mental health, it will take a conscious effort to make different choices.
But that is hard to do! It is so much easier to just click and start mindlessly scrolling (just for a few seconds, we tell ourselves) to avoid doing the things we know we should really be doing. So to help, Neil Chen came up with an interesting solution — make it hard to access websites that hog too much of our time. It might not be a huge hurdle to jump through, but by adding just a little friction, it can be enough to make us think twice about whether or not we really need to visit one of those websites.
The solution Chen came up with makes use of a cheap IoT smart plug, which acts as a switch. The button on its side turns it on or off, and its current state can be read wirelessly via an API. A custom script running on Chen’s computer continually polls the state of the switch in the background. When the switch is found to be turned on, the script updates the /etc/hosts file on the machine to effectively block access to problem sites by causing them to resolve to 127.0.0.1. When the plug is switched off, these entries are removed from the file, allowing normal access once again.
The plug can be installed in any outlet within range of your Wi-Fi network. Chen suggests installing it across the room from your computer. That adds just enough friction to cause a person to think twice about their web browsing choices, but does not make it too difficult if you really need to get access.
If you want to try this out for yourself, Chen has made the script freely available for download via GitHub. As for the smart plug, you can pick one up for about $8.