Just Enough Automation

Every developer faces the same question dozens of times: “Should I automate this task?” The answer is rarely obvious. Automate too little, and you’re drowning in repetitive work. Automate too much, and you’re building elaborate systems for problems that don’t exist.

In projects I’ve worked on, I’ve inevitably had to weigh this decision, and the answer invariably is “Maybe?”. But “maybe” isn’t helpful when you need to make a choice.

What should factor into this decision? Where is the threshold between valuable automation and wasted time? What intangibles are we trying to optimize for?

Terms

So let’s try to quantify this.

Value Delivered = Value of the Task
                - The Effort of Implementing the Task

Simple enough, if I see a penny on the roof of the parking garage next door, is it worth going down the stairs, navigating the parking garage, and picking up the coin? Maybe not, but there exists a pile of coins where the hassle is definitely worth it.

So for tasks that we are never going to do again, we best optimize for the effort
to get the task done and nothing else. Let’s expand our equation to accommodate an
ongoing effort:

Value Delivered = Value of the Task * Number of Iterations for the Task
                - The Effort of Implementing the Task

So if the task is repeatedly done, or perhaps the effort for automating the task is exceptionally low, it may be the best return on our time.

The Hidden Costs

Everyone who has decided to handwash that one dish instead of putting it in the dishwasher has made this calculation in their mind. However, let’s spend a moment talking about the non-obvious consequences of automation.

Maintenance. Whether you’re doing the task yourself or automating, there’s going to be some upkeep:

  1. If you’re out of the office, how do you make sure the task still gets done and
    someone knows how to do it?
  2. If you write that script (workflow, program, process), who will go and update
    it as the task changes, and make sure it’s still doing what it’s supposed to?
Value Delivered = Value of the Task * Number of Iterations for the Task
                - The Effort of Implementing the Task
                - Maintenance Costs

Documentation. If you’re doing a task that has any impact beyond yourself, you’re going to need to document it. This is the proverbial Sticky Note on the fridge to buy milk. There’s also a cost of occasionally running out of milk when we can’t be bothered to leave a note. Let’s add that in:

Value Delivered = Value of the Task * Number of Iterations for the Task
                - The Effort of Implementing the Task
                - Maintenance Costs
                - Documentation Costs

Mistakes. However you perform a task, the human element will exert itself. That could be a typo in your script or leaving a $1,000 tip instead of a $10.00 tip. What will happen to the value proposition when you discover your mistake?

Value Delivered = Value of the Task * Number of Iterations for the Task
                - The Effort of Implementing the Task
                - Maintenance Costs
                - Documentation Costs
                - Mistake Costs

Long Term Effects.

Life is a sum of all your choices
– Albert Camus

Choices you make on small items have a cumulative effect on the long term. Working out today won’t make you much more than sweaty, but working out for the next decade may change your life.

The same principle applies to automation decisions. Each choice to automate or perform a task manually builds your skills and shapes your approach to future decisions. Performing the task manually might improve your understanding of the process, while automating it might develop your technical skills. The key is recognizing that these long-term effects compound over time, potentially outweighing the immediate cost-benefit calculation.

Consider the developer who always automates their deployment process versus one who manually deploys each time. After a year, the first developer has built robust automation skills and reliable deployment systems, while the second has gained deep intuition about deployment nuances. Both outcomes have value, but they’re different kinds of value that affect future decisions.

Long Term Value = Value of the Task * Number of Iterations for the Task
                - The Effort of Implementing the Task
                - Maintenance Costs
                - Documentation Costs
                - Mistake Costs
                ± Long Term Effects

Conclusion

Automation is a tool, not a goal. We should never automate something for the sake of automation. Our professional lives are full of rituals:

A ritual is a repeated, structured sequence of actions or behaviors that alters the internal or external state of an individual, group, or environment, regardless of conscious understanding, emotional context, or symbolic meaning.[^1]

Essentially performing an act regardless of its effectiveness at being fit for any particular purpose (e.g. Standups filled with idle chatter, meetings that fail to state or accomplish a goal, creating dashboards that will never be used).

I think automation can be a great self-documenting tool, or a means to fight human error, but it should be wielded with purpose.

References