Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Patching the symptom instead of the cause
card 6 of 6
Ask where the bad value came from
builds on: Agents optimise the signal they can see
An error marks where bad data was noticed, not where it was made. Before you accept a guard, catch or special case at the crash site, ask where the value came from and whether it is ever legitimate. If you skip that question, the cause keeps producing wrong results, and now nothing raises an alarm.
Terms on this card
- guard
- An early check that returns, skips or branches when a condition holds, so the code below never runs on that input.
Lesson goal: Spot fixes applied where the error surfaces rather than where it originates: a null check at the crash site, a special case for the failing input, a catch around the throwing line. Explain why the error disappears but the cause keeps producing bad results. ·
the whole lesson