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 Trying to automate a task is actually a good way to verify that you understand it, and are capable of describing it in sufficient detail. If you can teach it to a computer, you can probably teach it to a person (and vice versa). If it can be taught—through instruction—is it not de facto automatable?

OTOH, if a task cannot be taught, then it almost certainly cannot be automated, either. It suggests that the "task" is, in fact, something categorically different, like maintenance or caretaking, which requires understanding the system, its dynamic environment, and their interactions.

@8r3n7 I think that equivalence only works in a restricted domain. There are plenty of things it's easy to teach a human but hard to teach a computer, because you're relying on some skill the human already had which is the hard part. Like a task involving vision, or language.

(At least, that's true as long as you mean traditional computer software which is efficient, predictable, and easy to maintain and modify. LLMs complicate this picture.)

Going the other way, it's probably true that any task you can program a computer to do you can teach a human to _understand_. But doing it is another matter, because computers are immune to boredom and humans aren't!