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.
Learning yourself instead of outsourcing it
card 4 of 6
Debugging a total that's off by a cent
builds on: Workflow: understanding unfamiliar code, Verifying before you accept a change, When not to use an agent
Cart totals are sometimes off by 0.01. Before asking, you note your guess: float rounding. You tell the agent not to edit anything yet. It should confirm or refute your guess with a file and line, then give only a hint. It points at `cart.py` line 42 and suggests storing whole cents. You check that line, write the fix yourself, then ask it to review your fix and quiz you. It's slower today, but next time you'll likely spot this kind of bug on your own.
Terms on this card
- float
- A number type for decimals. It stores many decimals only approximately, so sums like 0.1 + 0.2 can come out slightly off.
- whole cents
- Storing money as an integer count of cents (1999) instead of a decimal (19.99), which avoids rounding errors.
- 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.
Lesson goal: Use the agent so your own understanding grows. Predict before reading its answer, ask it to explain its choices, write key parts yourself sometimes, and only accept code you could explain to a colleague. ·
the whole lesson