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.
Tests that restate the implementation card 6 of 6

Ask where the expected value came from

builds on: What makes a test able to fail
For every assertion, ask where its expected value came from. The test stays green when the logic is wrong if the value: - came from the code itself, - came from recorded output nobody checked, - or only says 'something returned'.
Terms on this card
green
A test or check that is passing.
assertion
A statement in a test that checks a condition and fails the test if the condition is false.
Learn this step by step on Bytewise
Lesson goal: Spot tests whose expected value is computed with the same formula as the code, snapshots that freeze current buggy output, and assertions that check only 'not null' or 'no exception thrown'. Explain why these stay green when the logic is wrong. · the whole lesson