I’m going to revisit an argument I had in… Ooooh… 2001ish? I wanted to make some edits to my university’s fledging student union website. In order to do this, I needed to learn the arcane art of SSH. This was one of my first introductions to text based config files. I was horrified! A single typo, or a stray comma could break everything. The instructions our WebMaster provided were laughably unclear. Manually creating a config file – and getting it right – was a chore.
So I downloaded PuTTY and never looked back. It had a simple GUI. Well… simple enough. It was impossible to type an IP address into a box designed for a port number, it could tell that username was unlikely to contain a non-ASCII symbol, and that made it slightly easier to configure a connection.
The job of the computer is to do the hard work for us. Computers shouldn’t recognise that we’ve made a mistake – they should stop us making mistakes in the first place!
Flash forward to today. I wanted to release an update to my NPM package of SuperTinyIcons – which are hosted on GitHub.
I figured that I’d have to click a link on GitHub, do the OAuth dance, click on a few GUI elements, and hit a big save button.
Don’t get me wrong – I love the utility and versatility of the command line. I’ll happily manually edit a JSON file in nano and use
sed to update a bunch of documents. I rely on
grep daily. But when it comes to configuring things – I am undone. I don’t want to learn whitespace rules just to get something working.
Let’s take a simple example. Here’s a snippet of YAML from the official guide to releasing NPM packages via GitHub:
jobs: build: runs-on: ubuntu-latest
What are valid options for “runs-on”? Where would I find them? What are the differences between them? What happens if I spell something wrong?
Luckily, the GUI was invented to save us from ourselves:
M A G I C !
This goes for almost every element of the config file. If there are a set list of choices, present them to the user. If there is only one option, hide it. If there are two options, give them a checkbox.
The thing is, GitHub gets part of the way there. If you want to setup a webhook – you get a GUI.
Why does one part of GitHub offer a user-friendly way to manage configuration, and another part only provide a user-hostile environment?
To make it worse… NPM IS OWNED BY GITHUB!
I’m not saying you can’t have a text file. I’m not trying to take your toys away from you. Have a
sudo mode which lets user hand-stitch a config together with butterflies and a binary keyboard. Go nuts!
Want to store the config in git so you can see what changes have been made? Brilliant!
To be explicitly clear – store the config in a text file. But have a GUI first, and expose the text file to any masochists who want to manually replace all the tabs with spaces.
I just can’t be bothered reading 22 thousands words of YAML spec, a further two thousands words of GitHub instructions, and – no doubt – a hundred different StackOverflow questions, just to send data from one computer to another.
I heard someone say that part of Amazon’s success was its relentless focus on convenience. How is manually creating fragile text files convenient for me?
We have to stop this fetishization of the text file as the primary method for configuring computers.