Last week, I created a small script to aid my workflow which left me wondering why I didn’t make it earlier. It adds an option in Finder’s context menu to start a static web server in any folder which makes it easier to preview static websites. Technically, it’s equivalent to firing up the terminal, cd
ing to the directory, and using one of the many options to create a static server. The convenience of doing in one step which took three is minor, but automating the process is also advantageous in secondary ways. The crucial benefit is removing the tedious chunk—even if a small one—of my work. I can take pride in how my real work won’t include time to get a static server running.
Everyone’s daily work is filled with similar tedious chunks insomuch that it’s hard to distinguish the real work. Time spent in checking reports buried down a web of links; in collating data from several sources; in syncing files via email. In programming? In creating a build with five manual steps; in setting up workflow that requires several applications to be up and running. Time spent in these trivial tasks eats into the real work; worse, creates an impression that real work is getting done.
Source: XKCD
True, not every mundane task is worth automating. If it requires writing complex code in itself, the effort reduction might be meagre against the effort needed. But, automation is an aspect of programming that is grossly underutilised. There is always lack of attempt to identify repetitive actions. Part of the reason being, repetition isn’t usually felt. I, for instance, didn’t realise that running a server creation should be automated until lately. Considering I make technical solutions for living, it’s easy to assume that less tech-savvy users have a harder time facing mundane tasks.
Even though the technological progress has been breathtaking, the world is rife with inefficiencies that potentially have effortless answers. I think the problem is twofold —
- people, even programmers, don’t perceive that monotony exists; and if they do,
- they don’t realise how a small of an effort it’ll take to solve it.
Programmers’ role shouldn’t be limited to writing code as the potential to add value go beyond building software. They can shine by automating dull tasks. A virtue that a programmer should internalise is of an inefficiency-hater. Something that can be meaningfully automated should be automated; not just for himself but for everyone. Here’s a small list of nifty solutions that can reduce needless effort —
- Too much back-and-forth over email for file changes? Try share folder syncing with Dropbox.
- Taking screenshots involves uploading it to Imgur? Try Lightshot Screenshot.
- Customers frequently misreport bugs when code installation is wrong? Create a script that checks if it’s proper.
- Report creation involves manually pulling many numbers from a page? Create a bookmarklet that uses CSS selectors to copy them at ones.
- Find yourself writing code for something you don’t want? Try Googling, someone must have made a tool already. Incidentally, that’s how I found out about jq.
Most of these problems are drawn from my past experiences. Surprisingly, some are solved just by using the right tool which doesn’t sound very programming-esque. But, using the proper tool is often enough to drastically cut down the effort. The next level of sophistication would be to write a few lines of glue code; following that, creating a script. Which of them is worth it depends upon the end-value.
Automation is about doing more with less and with some thought, I think programmers can solve plenty of meaningful problems with it. Try brainstorming things that you have found yourself, or someone else, doing repetitively, and work the easiest way to solve it. You’ll likely encounter many things that can be fixed.