Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Spotting bad shortcuts in a change
card 4 of 6
Catching it and asking for a real fix
builds on: Reviewing the diff the agent made
You typed:
▸ You: The import crashes when a price cell is empty. Fix it.
The diff on the next card has a swallowed error, a special case for one file and a hardcoded price. Don't just say 'do it properly'. Name what is not allowed and what should happen:
▸ You: Don't catch and ignore errors, no file-name special cases, and no made-up prices. Skip rows with an empty price and list their row numbers in a warning.
Terms on this card
- diff
- A line-by-line listing of changes between two versions of files. Lines starting with '-' were removed and lines starting with '+' were added.
- Swallowed error
- An error that the code catches and then ignores, so the program carries on silently as if nothing went wrong.
- Special case
- Code that behaves differently for one specific input, such as a single file name or customer ID, instead of handling the general situation.
- special cases
- Code that handles one exact input differently, e.g. `if user == "test_user": return True`, so a test passes without the general logic working.
Lesson goal: Recognise typical shortcuts: hardcoded values, swallowed errors (empty catch blocks), disabled checks or linters, special cases for one input, and 'TODO' stubs presented as finished work. ·
the whole lesson