Tipclaude-codechatgpt-codex

Ask for tests before you ask for code

Get the AI to write failing tests first. The code it writes next is far more correct.

Ben Carr

Oct 16, 2026

Tip
Before writing any code, write unit tests that describe the behaviour I want. Wait for my approval. Then write the smallest code that makes them pass.

Tips and gotchas

Paste real error output back in rather than describing it.

Comments