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.
Text, time and money: classic data traps
card 1 of 6
Green tests, tidy fixtures
builds on: Why agents fill gaps with plausible guesses
You asked the agent for an order summary: a 40-character preview of the customer's note, the order total, and a due date 30 days out. It finished in two minutes. Tests are green, and its summary says: 'Handles formatting and rounding.' The fixtures use notes like `"Please ring twice"`, prices like `10.00` and dates in June. Real customers write emoji and accented names, buy items at `19.99`, and order on the night the clocks change. Which of these real cases did the green tests ever touch?
Terms on this card
- fixtures
- Fixed sample data that tests run against.
- green
- A test or check that passes. Red means it fails.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
Lesson goal: Spot agent code that is wrong for real-world data: string length, slicing or case-folding that breaks on non-ASCII text, naive datetimes and DST or time-zone shifts, and floating-point arithmetic for money. Name the safe type or library in each language (for example Decimal or BigDecimal, integer cents, zone-aware datetimes). ·
the whole lesson