Topic 4 of 5 · 3 min read
Tiny diffs that are faster by hand
Goal: Compare prompt-plus-review time with typing time and choose the faster path for a small change.
For a change you could type in under a minute, type it. Prompting, waiting and reviewing only pays off when the change is bigger than that overhead. Using an agent for a one-line fix is like starting a truck to cross the street.
Check yourself · 1 of 3
You know a timeout constant is on line 12 of config.py and needs to change from 30 to 60. What is the fastest safe path?
Why it matters
An agent request has fixed costs. You write the prompt, wait for the run, then read the diff to make sure it changed only what you asked. Agents sometimes touch neighbouring lines, reformat a file or add a "helpful" extra. For a big task these costs are small next to the work saved. For a one-line fix they are all of the cost, and the review is still on you.
How to decide
Estimate two numbers before you start:
- Typing time. How long would you take by hand, including finding the file? A renamed constant, a flipped flag, a version bump, a typo: seconds.
- Delegation time. Prompt writing, the wait, and reading the diff. Even a quick run is a minute or two once you read what came back.
If typing time is the smaller number, type it. Two more checks push toward hand typing:
- Do you already know exactly what to change? If the answer is in your head, the agent adds nothing but a chance of drift.
- Is the edit mechanical across many files? Then a search-and-replace tool or an editor refactor is faster and more reliable than a model: renaming a symbol in 200 files is a job for the language server, not a prompt.
The balance flips when you do not know where the change belongs, or the edit needs knowledge you lack. Then the agent saves time even for small diffs.
Before and after
Weak: prompting "Change the request timeout from 30 to 60 seconds" in a repo where you know the constant is TIMEOUT_S in config.py. You wait, read a diff, find it also reformatted two imports.
Better:
sed -i 's/TIMEOUT_S = 30/TIMEOUT_S = 60/' config.py
git diff
Ten seconds, and the diff is exactly one line.
What goes wrong
- Habit over judgement. Reaching for the agent for every edit, even when your hands are already on the file.
- Skipping the diff on a "tiny" change. Small does not mean safe. A one-line change to a timeout or a flag can still break production.
- Ignoring the other direction. Refusing help for a small change in unfamiliar code you cannot locate wastes more time than a prompt would.
Examples
Two small changes, two answers
- Bump
"version": "1.4.2"to"1.4.3"in package.json: type it. - Fix a failing date format in a service you have never opened: ask the agent to find where the format is set, then review its one-line change.
A rename the editor does better
Renaming getUser to fetchUser across 120 files:
git grep -l "getUser" | xargs sed -i 's/\bgetUser\b/fetchUser/g'
Or use the editor's rename-symbol command, which understands scope. Either way, run the tests and read the diff.
Key points
- Estimate typing time against prompt, wait and review time before reaching for an agent.
- If you already know the exact edit, typing it removes the chance of drift.
- Mechanical changes across many files belong to editor refactors and search-and-replace, not prompts.
- Small diffs still need a read; a one-line config change can break production.
- Small changes in code you cannot find or understand are where an agent pays off.
Common mistakes
- Prompting for edits you could type faster than you could describe.
- Approving a tiny agent diff without reading it.
- Using a model for a mechanical rename that a refactor tool does exactly.
- Typing by hand a change in unfamiliar code you could not even locate.
Check yourself · 2 of 3
You need to rename a function used in 200 files. Which tool is usually most reliable?
Check yourself · 3 of 3
An agent made a one-line config change. What should you do before merging?
Practice items, not counted towards your mastery.
Start here
- Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity (opens in a new tab)PaperFree
A randomised trial where experienced developers were slower with AI yet believed they were faster.
- How AI assistance impacts the formation of coding skills (Anthropic) (opens in a new tab)ArticleFree
A vendor's own study of how delegating code to AI affects learning a new library.
- Do Users Write More Insecure Code with AI Assistants? (opens in a new tab)PaperFree
A user study where AI-assisted participants wrote less secure code and felt more sure of it.
More for this topic
- Small CLs (Google Engineering Practices) (opens in a new tab)ArticleFree
Why small changes are quick to review and how review cost grows with size.