Full Steam Ahead - Optimising Productivity

As much as we don’t like to admit it, it’s all to easy to get distracted when working remotely on your home computer. I realise that I don’t have as much self control in this regard as I would like, constantly getting distracted, reading various online blogs etc. and so I decided to fix this problem once and for all.

Using Software to Regain Control

So how do we develop software which optimises our productivity without infantilising us to the extent that we just ‘End Task’. It’s an interesting question, because we’re basically developing parental control software for ourselves, which just feels patronising.

So the goal here is to make it about empowerment. You use this software, not because you are incapable of avoiding distraction, but because you want to improve your focus and maximise productivity. There is no draconian lockdown - the user is simply given the tools to take their productivity into their own hands.

The software allows the user to create a list of blacklisted processes (executables), e.g. games or apps. When the blacklist is enabled, these processes are not allowed to run on the system (they are terminated immediately).

It also allows you to blacklist websites as well. A substring of the blacklisted domain can be entered into the website blacklist. Any domain accessed which contains the blacklisted substring will disallowed, and no data will be returned by the request.

Technical Breakdown

Technically speaking, it’s a fairly simple story. The core process is programmed in Rust, mostly using cross platform rust crates.

A very simple, lightweight background process is run by the app, which iterates through running processes every second, killing the blacklisted ones.

For the web blacklist, a proxy service is set up and assigned as the system proxy. This means that all traffic utilising the system proxy goes through our proxy service. As a result, we can intercept any blacklisted website, preventing any data transfer.

There are problems with this approach. For instance, the software does need to be assigned to the system proxy, which means no other system proxy can be used simultaneously. In addition, if the process goes down but the proxy is still set up, then no web requests will work without manually disabling the system proxy (easy to do).

Written on July 27, 2020