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.
Error handling idioms across languages
card 1 of 6
Three 'small fixes' that compile
You asked the agent to add config loading to three services and get them building. Java now has `catch (IOException e) {}`, Go has `cfg, _ := Load(path)`, and Rust has `let _ = save(&cfg);`. Everything compiles and the tests are green. Each line looks like a harmless fix. Is it? Where should each of those errors actually go?
Terms on this card
- let _ =
- Rust pattern that assigns a value to nothing, which explicitly discards it and silences the unused-Result warning.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- green
- A test or check that passes.
- let _
- Rust pattern that explicitly discards a value. On a future, it drops it unpolled and silences the unused-value warning.
Lesson goal: Compare exceptions (Python, Java checked and unchecked, JS/TS), Result/Option with ? (Rust) and error values (Go). For each, say where an error should be handled versus propagated and what 'ignoring' an error looks like. ·
the whole lesson