Learning Goals
3 minBy the end of this lesson you can:
- Spot the three signs a task is worth automating: repetitive, rule-based, error-prone.
- Do the ROI maths — time saved vs. time spent building and maintaining.
- Recognise the "automation trap" (xkcd 1205) where automating costs more than it saves.
- Map the rest of Level 7 to real problems you actually have.
Warm-Up · Your Personal Time Audit
5 minThink about last week at a computer. How many times did you:
- Rename a batch of files one by one?
- Copy data from one spreadsheet into another?
- Download something, then rename it, then move it to a folder?
- Check the same website for an update?
- Send the same kind of email or message again and again?
A computer is a tireless intern that never gets bored, never makes typos, and works for free at 3 a.m. Automation is just writing down the instructions once so that intern can do the boring parts forever. Levels 1-6 taught you the language; Level 7 puts it to work.
New Concept · The Automation Decision
14 minThe three signs a task is worth automating
- Repetitive — you do it again and again. Automation pays back per repetition.
- Rule-based — the steps are predictable. "If the file ends in
.csv, move it to /data" is a rule; "decide which design looks nicer" is not. - Error-prone when done by hand — humans miscopy numbers and forget steps. Computers don't.
The sweet spot is a task that scores high on all three. A task you do once, that needs judgement, is usually not worth automating.
The ROI formula
Return on investment for automation is simple bookkeeping in time:
net_saving = (time_per_run × runs_per_year × years)
− time_to_build
− (maintenance_per_year × years)If net_saving is positive, automate. If it's negative, do it by hand and move on. Note maintenance: automation isn't free forever — websites change, APIs break, formats shift.
The famous chart (xkcd 1205, "Is It Worth the Time?")
How much time you save vs. how often the task happens:
5s 30s 1min 5min 30min
50/day 1 day 1 week 2 weeks 8 weeks 6 months ← automate!
5/day 2 hrs 1 day 2 days 2 weeks 6 weeks
weekly 30 min 2 hrs 4 hrs 1 day 3 days
yearly - - - 2 hrs 5 hrs ← maybe notThe numbers are how much total time you can spend automating before you lose money. A 30-second task you do 50 times a day justifies up to weeks of automation work. A yearly chore? Just do it.
The hidden bonus nobody charts
ROI maths undersells automation, because it ignores three real benefits:
- Consistency — the script does it the same way every time. No "oops, I forgot step 4."
- Scale — once it works for 10 files it works for 10,000 at no extra effort.
- Sleep — a scheduled script runs at 2 a.m. so the report is on your desk before you wake up.
Worked Example · Should Aisha Automate?
12 minAisha runs a small online shop. Every morning she renames 40 product photos by hand — IMG_2931.jpg becomes red-shirt-01.jpg — which takes about 15 minutes and she does it 5 days a week. Should she automate?
Let's do the maths in Python — because of course we can:
# all times in minutes time_per_run = 15 runs_per_year = 5 * 52 # five days a week years = 2 # how long she'll run the shop time_to_build = 4 * 60 # she's new to this — guess 4 hours maint_per_year = 30 # half an hour of fixes a year saved = time_per_run * runs_per_year * years cost = time_to_build + maint_per_year * years net = saved - cost print(f"Time saved over {years} years: {saved/60:.0f} hours") print(f"Cost to build + maintain: {cost/60:.0f} hours") print(f"Net saving: {net/60:.0f} hours") print("Verdict:", "AUTOMATE ✅" if net > 0 else "do it by hand")
Time saved over 2 years: 130 hours Cost to build + maintain: 5 hours Net saving: 125 hours Verdict: AUTOMATE ✅
Read the result
Five hours of building buys back 130 hours of life. That's a 25× return — and it doesn't even count the typos she'll avoid or the fact that the script also runs perfectly when she's sick. This is exactly the kind of task Level 7 is built to crush (you'll write the renamer for real in Lessons 5-7).
If Aisha only sold one product a year, runs_per_year would be 1, saved would be 30 minutes, and the 4-hour build would be a clear loss. Same task, opposite verdict — the frequency is what decides.
Try It Yourself
13 minWrite down five repetitive computer tasks you or someone you know does. For each, mark whether it's repetitive, rule-based, and error-prone. Which scores 3/3?
Turn the worked-example maths into a reusable function should_automate(...) that takes the five numbers and returns the string "automate" or "by hand". Test it on two of your chores.
Hint
def should_automate(per_run, runs_year, years, build, maint_year): saved = per_run * runs_year * years cost = build + maint_year * years return "automate" if saved > cost else "by hand" print(should_automate(15, 260, 2, 240, 30)) # → automate print(should_automate(30, 1, 2, 240, 30)) # → by hand
For a task that takes 10 minutes and costs 3 hours to automate (no maintenance), how many runs until it pays for itself? Compute it in code, then prove it.
Hint
build_minutes = 3 * 60 per_run = 10 break_even = build_minutes / per_run print(f"Pays off after {break_even:.0f} runs") # → 18 runs
Mini-Challenge · The Automation Trap
8 minFind one real story (yours or online) where someone automated something that wasn't worth it — they spent more time building the tool than they ever saved. Write a short note: what they automated, why it backfired, and what the ROI maths would have told them up front.
Show an example write-up
Task: automating a monthly 2-minute copy-paste report.
Reality: spent 11 hours building a fragile scraper.
Maths: saved = 2min × 12/yr × 2yr = 48 min.
cost = 11 hrs build. Net = -10 hours. ❌
Lesson: low frequency × low time-per-run = do it by hand.
Worse, the source site redesigned twice → more fixes.Non-negotiables: the task, the time spent vs. saved, and the ROI verdict it should have gotten.
Recap
3 minAutomate tasks that are repetitive, rule-based, and error-prone — and do the ROI maths first: time saved over the tool's life must beat the time to build and maintain it. High-frequency, low-judgement chores are gold; one-off judgement calls are traps. The hidden wins — consistency, scale, and running while you sleep — make good automation even better than the chart shows. Welcome to the level where Python earns its keep.
Vocabulary Card
- automation
- Writing instructions once so a computer can repeat a task without you.
- ROI
- Return on investment — here, time saved minus time spent building and maintaining.
- maintenance cost
- The ongoing time to fix automation when websites, formats, or APIs change.
- break-even
- The number of runs after which an automation has paid back its build cost.
Homework
4 minPick the single best automation candidate from your chore list. Write a one-page "automation brief": the task, the three-signs score, the ROI numbers, and a one-sentence description of what the finished script would do. You'll have the skills to build it by the end of this level.
Sample · automation brief
Task: sort my Downloads folder into Images / PDFs / Code
Score: repetitive ✓ rule-based ✓ (by extension) error-prone ✓
ROI: per_run 5 min × 250/yr × 2yr = 42 hrs saved
build 2 hrs + maint 1 hr/yr×2 = 4 hrs → net +38 hrs ✅
Script: watch Downloads; for each new file, look at its
extension and move it to the matching folder.Non-negotiables: a real task, the 3/3 score, honest ROI numbers, and a one-line script description.