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.
Happy-path code: the edge cases it skipped
card 6 of 6
Remember
builds on: Why agents fill gaps with plausible guesses
Agent code is written and checked against the typical input. Probe every input with empty, absent, zero/negative and boundary values. Predict the line that breaks, then pin it with one test that is red today.
Terms on this card
- red
- A test or check that is failing.
Lesson goal: Probe agent code for the structural inputs it typically ignores: empty collections, None/null/nil and missing keys, zero and negative values, and off-by-one boundaries on ranges, slices and pagination. Predict which of these a given function will mishandle, and write the one test that would show it. ·
the whole lesson