Chapter 4: Reading and debugging

Hypothesis

One specific guess about the cause that a single check could prove wrong, such as "the price is already a string by line 40". Debugging goes fastest when you test one at a time and change one thing at a time.

If an agent changes five things and the bug goes away, nobody knows which one did it, and the other four stay in your code as superstition. Ask for the guess and the check before any change, because a guess you can disprove in one command is cheap.

Say it to your agent

“Give me three hypotheses for why this fails, each with one command or log that would rule it out. Run those checks and report what they showed. Change no code until one has survived.”

The workshop

Name a word, or describe what you mean in everyday language.