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.
Overbuilt code: speculative abstraction and defensive clutter card 4 of 6

One email, four abstractions

builds on: Why agents fill gaps with plausible guesses
You ask for a password-reset email. The agent adds a `NotificationChannel` interface, a `ChannelFactory.create(type)` with a single `case EMAIL`, an `EmailChannel` class, and a `NotifyConfig` with `retryCount` and `priority`. Search the call sites: there is one caller, and it never sets the config. The tells are one implementer, a one-branch factory and unused options. **Better:** an `EmailSender` class with `sendReset(User)`. If SMS ever arrives, extract the interface then, shaped by the real second case.
Terms on this card
interface
A type that lists method signatures without code; classes that implement it supply the code, so callers can use any of them interchangeably.
factory
A function or class whose job is to create objects, usually picking which concrete type to build from an argument.
caller
Any place in code that invokes a function or uses a name, sometimes called a call site.
Learn this step by step on Bytewise
Lesson goal: Spot code bigger than the task needs: interfaces, factories or config options with one user, generic frameworks for a single case, and redundant null checks and try/catch on paths that cannot fail. Explain the later cost: more code to maintain, contracts blurred by defensive checks, and real bugs hidden in noise. Name the simpler version. · the whole lesson