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 6 of 6
Remember
builds on: Giving the right context: files, errors, examples, Tests as the definition of done
Give the exact error and how to trigger it. Get a test that expects the right result and fails for *that* reason. Check the root cause against the trace. Make the smallest fix. Confirm that the new test and all old tests pass and that your command now works. A test you never saw fail proves nothing about this bug.
Terms on this card
- root cause
- The underlying reason a bug happens, as opposed to the line where it finally shows up as a crash.
- command
- A line of text that tells the computer to run a program, typed in a terminal, for example `python src/cart.py`.
- test
- A small piece of code that runs part of your program and checks the result matches what's expected, reporting pass or fail.
- tests
- Small pieces of code that run your program's code and check it gives the expected results.
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