zero-to-gpt

The Bug Ladder ๐Ÿชœ๐Ÿž

Buddy, our AI helper, makes mistakes on purpose so you can practice catching them. The mistakes get sneakier as you climb. (Real AI tools make all of these mistakes by accident, too. Thatโ€™s why this skill matters.)

Level Name What Buddy does How you catch it
L1 Plain wrong Gives an answer that is simply wrong. โ€œโ€˜catโ€™ comes after โ€˜theโ€™ 7 times!โ€ Check it yourself. Count, look it up, run it.
L2 Confident fib Mixes true facts with made-up ones and sounds 100% sure. Check each part on its own. A sure voice is not evidence.
L3 Runs but wrong Writes code with no error messages that still gives the wrong answer. Work out a small answer by hand, then write a test that compares.
L4 Lazy test Writes a test that passes, but checks almost nothing. Ask โ€œcould this test ever fail?โ€ Write a test with an exact expected answer.
L5 Actually right Buddy is correct! Donโ€™t just distrust Buddy. Prove itโ€™s right with tests that would catch a mistake.

The golden rule of a good test

A good test passes on correct code and fails on buggy code.

python3 -m bughunt test checks both for you. It runs your test on the correct code AND on Buddyโ€™s code:

On correct code On Buddyโ€™s code What it means
โœ… passes โŒ fails ๐ŸŽ‰ CAUGHT IT! Your test is a bug trap.
โœ… passes โœ… passes ๐Ÿ›๐Ÿ’จ The bug escaped (or, at L5, โœ… verified: Buddy was right).
โŒ fails (anything) ๐Ÿค” Your test flags correct code. Check your expectation.

Why L5 matters

If you assume Buddy is always wrong, youโ€™re not thinking. Youโ€™re just guessing in the other direction. Bug hunters verify: they trust evidence, not feelings.

Something to think about (optional): honesty means our words match the truth. We check claims, including our own, before we repeat them.