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.
Giving useful feedback on a wrong result
card 4 of 6
Finding the clue in your own run
builds on: Giving the right context: files, errors, examples, Running and trying the result yourself
From the project root you run `python stats.py data/orders.csv`. It crashes with `ZeroDivisionError`. The last file-and-line entry in the traceback points to `stats.py`, line 42, in the function `average`. The agent's summary said it edited `load_orders`, a different function.
That mismatch is your best clue: the fix probably went into the wrong place. Put it in your reply, together with customer `C-104`, the input that triggers the crash.
Terms on this card
- traceback
- Python's name for a stack trace: the printed list of files, lines and functions that were running when an error happened. The actual error is on the last line.
- ZeroDivisionError
- The error Python raises when code tries to divide a number by zero.
- function
- A named block of code that does one job, such as `average` or `load_orders`, and can be called from elsewhere.
- CSV
- Comma-separated values: a plain-text table file where each line is a row and commas separate the columns.
- summary
- The message the agent writes at the end saying what it did. It is the agent's own claim, not a check.
Lesson goal: Respond to a wrong result with concrete evidence: the failing command and its output, the observed vs expected behaviour, and a pointer to the faulty line. Do not reply with 'still broken'. ·
the whole lesson