The Boring Job Is the Best First Project

Every student has a boring job the computer could do: renaming twenty assignment files before a submission, sorting screenshots into folders, copying the same heading into every lab report. The work is not hard; it is repetitive, and repetitive is exactly what computers are for. Your first automation script does not need to be impressive — it needs to take one boring job off your hands and give you the minutes back.

That is why automation beats another tutorial project. A calculator proves you can follow instructions. A script that renames your files proves you can spot a repetitive job, describe the rule, and hand the job to the machine — the same skill senior developers use every day, just smaller.

The Job: A Downloads Folder Full of Messy Names

Here is the job. Your downloads folder has files named like this: "My Notes - Final (2).DOCX", "IMG_2041.JPG", "assignment1.pdf", "photo 2026.PNG", "README.md". Some shout in capitals, some have spaces, some have double spaces, some end in.DOCX and some in.docx. Nothing is broken, but nothing is findable, and every search means reading five wrong names first.

The rule for a tidy name is easy to say out loud: everything lowercase, words joined with single dashes, and the extension lowercase too. Say it once and you could rename five files by hand; say it in code and you can rename five thousand. That is the trick: a rule you can say in one sentence becomes a function, and the function does the boring part forever.

Try It: A Rename Plan in One Run

Paste it into the browser editor and run it — the script never touches a real file. It works on a list of names and prints a plan, so you can read every decision before anything changes.

# organizer.py - your first automation: a rename plan for messy files
def tidy_name(name): base, dot, ext = name.rpartition(".") if not dot: base, ext = name, "" clean = base.strip().lower().replace(" ", "-").replace("_", "-") while "--" in clean: clean = clean.replace("--", "-") return clean + ("." + ext.lower() if dot else "") def plan(files): lines = [] for name in files: new = tidy_name(name) if new == name.lower(): lines.append("%s -> already tidy" % name) else: lines.append("%s -> %s" % (name, new)) if not lines: return "Nothing to rename." return "\n".join(lines) messy = ["My Notes - Final (2).DOCX", "IMG_2041.JPG", "assignment1.pdf", "photo 2026.PNG", "README.md"]
print(plan(messy))
print("---")
print(plan([]))
print("---")
print(plan(["README.md", "notes.txt"]))
print("---")
print(plan(["LICENSE", " draft.txt"]))

The output is four small runs. The messy list turns into a tidy plan: "My Notes - Final (2).DOCX" becomes "my-notes-final-(2).docx", "IMG_2041.JPG" becomes "img-2041.jpg", and "photo 2026.PNG" becomes "photo-2026.png" — the double space collapses into a single dash. Two files are already tidy: "assignment1.pdf" and "README.md" have nothing to fix, so the plan leaves them alone. An empty list prints "Nothing to rename.", a file with no extension, "LICENSE", is already tidy by the same rule, and " draft.txt" loses its stray spaces and becomes "draft.txt".

How the Script Works: Three Small Moves

tidy_name does the whole job in three moves. First it splits the name at the last dot with rpartition, so the extension is separated and a name with no dot still works. Then it lowercases everything, strips spaces from the ends, and swaps spaces and underscores for dashes. Then a small while loop collapses double dashes until none are left — that is what turns "photo 2026" into "photo-2026".

plan is the part that makes the script safe. It walks the list, tidies each name, and compares the tidy name with the original lowercased: a match means the file is already tidy, a difference means the plan prints the rename. Nothing is deleted or overwritten, and the plan is plain text you can read. A script that shows its work before doing anything is a script you can trust.

The last line of plan is the habit that separates a script from a snippet that only works once: an empty list returns "Nothing to rename." instead of crashing. Handle the empty case on purpose, and your tool survives the first real folder it meets.

What Breaks, and What It Teaches You

The first surprise is the double dash. Replace every space with a dash and "photo 2026" — two spaces — becomes "photo--2026". A single replace cannot fix that: replacing "--" once turns three dashes into two, not one. The while loop keeps going until no double dash remains, which is why it is a loop and not a line.

The second surprise is the already-tidy check. It compares the tidy name with name.lower(), not with the original name, because "README.md" is tidy even though it has capitals — lowercasing is part of tidying, so the comparison has to lowercase first. Compare with the original and "README.md" would be renamed on every run — noise, not work.

The third surprise is how much the plan does not do. It never renames a real file, never creates a folder, and never asks what to do when two files tidy to the same name — "My Notes.docx" and "my-notes.docx" would collide. That is honest: a plan that prints is safe to run anywhere, and the collision problem is the next feature, not a hidden bug.

Make It Yours: From Plan to Real Renames

The plan is step one; the rename is step two, and keeping them separate is the professional habit. When you are ready, the real version reads names from a folder with os.listdir, builds the same plan, prints it, and only then renames with os.rename — one call per line of the plan. Print first, rename second: that order is the difference between automation and an accident.

Then grow it one feature at a time. Sort by extension: photos to a photos folder, documents to a documents folder, anything unknown stays put with a note. Add a counter so the plan says how many files it would rename. Each change is one small edit and one run, applied to a job you actually have.

From a Snippet to a Portfolio Piece

When the plan reads the way you expect, save it as a snippet called "first-automation-rename-plan" with a one-line note: "a Python rename plan — lowercase, single dashes, prints before it renames." It is a better portfolio piece than it looks: find a real repetitive job, write the rule, handle the empty and already-tidy cases. Push it to GitHub with a short README, following the portfolio guide.

It is also the start of a longer path. The same pattern — a list in, one decision per item, a safe output — is a budget tracker, a data project, and a file sorter. The data project is the natural next build: same loop, real answers. The Lab courses build the same ideas further.

When the Free Plan Runs Out

Automation burns executions fast: every tweak is a run. Free gives you 20 executions a day, 10 AI requests a day, 10 saved snippets, 3 private snippets, and 3 collaborators per snippet. When you start automating a job every day, that is the upgrade moment: Pro is $9/month or $69/year — unlimited saved snippets and executions, 100 AI requests a day, 10 collaborators per snippet, unlimited private snippets, and GitHub integration. Team ($19/user/month, or $15/user/month billed annually) covers a class or study group automating together — see the pricing page.

Your next step is tonight: paste the code above into the browser editor, run it, and watch five messy names turn into a plan. Then change one thing, run it again, and save it as a snippet called "first-automation-rename-plan". The first time a script does a boring job for you, a program stops being something you write for a grade and starts giving you your evening back.