2 min read

Necessity in Automation

Necessity in Automation

The more I've learned about code/coding, the more I see inefficiencies in daily life. Anything done repetitively and predictably is a sign to me to automate.

This applies to things from the manufacturing and services industries to content management and data manipulation. To an extent this is already happening, yet quite often it comes to my attention that tasks are still done by hand.

I'm guilty of this too, but perhaps to a lesser extent. Maybe I could put ssh keys everywhere to eliminate the requirement to take time to enter my password but by the same token, perhaps I cannot be bothered.

Therein comes the other factor involved in automation; the initial investment, be it time or money, to set up. If it takes many hours to set up a system that saves a few seconds, this normally would be too much of a time investment to bother. However a system that saves hours and hours per month of work and only takes a little initial time investment is definitely a wise move.

This extends into the territory of short one liners that someone who works on the command line often will be familiar with. Using tools like sed, awk, grep and rename combined with a working knowledge of vim (or your preferred text editor) can turn an undesirable slog into an effortless task. One particular example this would be when I made a Drupal subtheme and had to rename all the associated CSS files to the appropriate theme name.

rename "s/base-theme-alpha(.*)/new-sub-theme-alpha\1/g" *.css

Not too much time saved with this one liner but it prevents the necessity of altering the name of each file one after the other.

I was taught in high school physical education classes about the principle of SPORT (Specificity, Progression, Overload, Reversibility, Tedium) and how it can be used to train better. This same acronym can be equipped in part to training and work in general. If an employee has to, almost ritualistically, complete a repetitive and mundane task they'll suffer tedium, get bored and distracted leading to a reduction in effectiveness and work rate.

Let scripts and code take care of the uninteresting, repetitive work. Free yourself and your employees from those shackles to be more productive thinking up things that AI is currently not advanced enough to think up. A certain amount of what I, and a lot of others in my industry do, is inventing. I create new modules, find new ways of solving problems and fix things to work more efficiently and save time. Learning that database records and updates were being entered manually and HTML was formatted in the same way every week was a clear sign to me that I could automate and the inspiration for writing this post.