When to automate a repetitive task:
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham SEP field: This is a regular but infrequent task which we share in the team. It won't be my turn to do it again until December so I'll do it manually now and hope someone has automated it before then.
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham I'm a fan of the variant of "need a run-up", where you don't know what you're doing, but want to make sure that when you have to redo it, you redo the working steps the same way.
The best way of doing this is to write down the steps. In a script. So when you do get it working, you have most of your automation already written.
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham If not automated that already, around the 4th-5th time max is when I am "I need to automate it this time, it will take some effort, but I am not going to do this manually again". However, the threshold might be lowered if the given environment is already tedious.
-
@simontatham SEP field: This is a regular but infrequent task which we share in the team. It won't be my turn to do it again until December so I'll do it manually now and hope someone has automated it before then.
@cunobaros @simontatham Automating something also provides complete documentation - that benefit shouldn't be underestimated 🧐
Sometimes I write a bash script which does (semi-)automagically a job which needs to be done quite rarely. Thus I don't forget something important

-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham one more case - when task is too complicated so doing it manually is asking for a trouble -> automating makes it less prone to mistakes
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham me when procrastinating on setting up ansible
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."REALITY: "Automating this 5 minute task is way more fun than doing it, so I'll spend all day automating it"
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham I've ended up putting together a shell script that maintains markdown checklists and records executions and artefacts in a git repo. It allows me to hone messy processes over time to the point where they can largely be automated, while still documenting the necessary steps where reliable automation hasn't yet been achieved. It gives me a lot of comfort
GitHub - amboar/checklists
Contribute to amboar/checklists development by creating an account on GitHub.
GitHub (github.com)
-
@simontatham I'm a fan of the variant of "need a run-up", where you don't know what you're doing, but want to make sure that when you have to redo it, you redo the working steps the same way.
The best way of doing this is to write down the steps. In a script. So when you do get it working, you have most of your automation already written.
@darkling
I've had tasks that:
- I know I'll need to do exactly 5 times
- are complicated
- have many unknown unknowns - many thngs could go wrong, but I don't know which ones
- any of those unknown unknowns could do a lot of damageI don't automate those, since I can't do error handling for an error I can't anticipate.
I write down what I'm doing, with commands, including a lot of sanity checks, and what to expect from an output.
Then I repeat these steps by hand.
@simontatham -
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."[puts together an automation after having to do it 30 times]
[never have to use it again]
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham from the mix of these things is why I have my own tool for handling hundreds (if not thousands) of SQL scripts that I've been tinkering with for over 20 years.
Which means I can add an extra item to the list:
- having built a tool for doing some amount of the automation occurring in my work, gives me a head start each time a new need for automation becomes apparent.I occasionally shock myself at how early that became true, seeing innovative components dated 2005 or so.
-
@darkling
I've had tasks that:
- I know I'll need to do exactly 5 times
- are complicated
- have many unknown unknowns - many thngs could go wrong, but I don't know which ones
- any of those unknown unknowns could do a lot of damageI don't automate those, since I can't do error handling for an error I can't anticipate.
I write down what I'm doing, with commands, including a lot of sanity checks, and what to expect from an output.
Then I repeat these steps by hand.
@simontatham@wolf480pl @simontatham If any damage isn't reversible, then absolutely.
I've mostly used my pattern in things like new data-ingest pipelines, where you can keep the original upstream data, and just nuke the interim stuff and try again if it all goes wrong.
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham don't forget "if i automate this, i'll have to do something else that's worse"
-
@simontatham SEP field: This is a regular but infrequent task which we share in the team. It won't be my turn to do it again until December so I'll do it manually now and hope someone has automated it before then.
@cunobaros @simontatham I've certainly come into teams where it is apparent that has been the operating mode for some years.
-
@simontatham and it can be really hard to tell the last three cases apart when you're in them
@Taneb @simontatham quite true but I can say I've had multiple "ran off the runway" cases where I coded a good solution and then had another instance crop up ten or fifteen years later.
So now I still default to making something once I feel I understand the problem-solution pair - even though I definitely won't be doing the work in ten years time.
-
When to automate a repetitive task:
NO-BRAINER: "This is obviously going to be faster to automate than to do it by hand _even once_. Let's automate it right now, and not do it by hand at all."
FORESIGHTED: "Doing it once by hand is faster than automating it, but I'm going to have to do it a lot of times, so it still saves time to automate it first."
NEED A RUN-UP: "I don't yet understand this task well enough to automate it, so I'll do it a few times by hand first to get the idea."
RAN OFF THE RUNWAY: "Great, now I've done this by hand a few times, I think I can automate it reliably! Oh, oops, turned out I only had one more case of it left to do."
TERRIFIED OF RUNNING OFF THE RUNWAY: "This is a one-off, so it would be a waste of time to automate it, I'll just do it manually."
[next day] "Oh, oops, I made a mistake and have to do it again. But it should be fine this time."
[a month later] "Even though I've had to redo it 25 times already, surely _this_ is the last time? So it would still be a waste of time to automate it."@simontatham Sometimes I'll do a task by hand the first time (and f*** it up a bit) and then go back and cherry-pick my shell history to write the automation, subbing in variables as I go... but yeah. Generally legit.
-
R relay@relay.an.exchange shared this topic