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.
Workflow: fixing a bug from an error message
card 1 of 6
A crash, and the urge to say 'fix it'
builds on: Giving the right context: files, errors, examples, Tests as the definition of done
You run `python src/report.py data/march.csv` and get a traceback ending in `ZeroDivisionError: division by zero`. You open the agent and are tempted to type: 'the report is broken, please fix it.' The agent will probably produce a change that makes the crash go away. How would you know it fixed the actual bug, rather than hiding it or breaking something else?
Terms on this card
- traceback
- Python's printout when a program crashes: the chain of files, lines and function calls that led to the error, ending with the error type and message.
- ZeroDivisionError
- Python error raised when code divides a number by zero.
- CSV
- Comma-separated values: a plain text file of table data, one row per line, with columns separated by commas.
- agent
- An AI tool that doesn't just chat. It reads your project's files, edits them and runs commands to carry out a task you give it.
- src
- Short for "source": a common folder name for a project's main code files.
Lesson goal: Fix a bug end to end. Give the exact error and how to reproduce it, have it reproduce the failure as a test first, review the root-cause explanation, apply the minimal fix, and confirm the test passes and nothing else broke. ·
the whole lesson