The check comes first

A test or an example fixes the meaning before the draft.

If the behaviour can be checked automatically, the check appears first and the draft second. Otherwise the model fits the code to its own example, and you fit the expectation to the code you got. That is development upside down: green means nothing, because the criterion was written after the fact.

A check can be a test, a command with known output, or a short list of manual steps if the interface is not automated yet. What matters is that the expectation is written down before generation. "I will look and see if anything stands out" is not a check.

You can ask the model to write a test. Then you read the test separately from the implementation: is a bug baked into it, does it check a random detail, did it switch itself off. A test that the model wrote together with the code and declared passing is weaker than a test you accepted earlier.

One honest test of an edge case is worth more than ten checks of the happy path. Ask for it explicitly. If you cannot write the test because it is unclear what is correct, stop and find out the rule. Generation will not create that rule.

Practice

  1. What comes first

    You can write a test. When do you fix it in place?

    • After the code has been accepted
    • Before the draft of the implementation
    • Only if the model asks for it
    • Never, the model checks anyway
  2. What is not a check

    "I will look and see if anything stands out." Is that a check? Answer yes or no.

  3. Which test is stronger

    Select the stronger options.

    • An edge case written before the code
    • The model said it ran everything itself
    • An expectation you can show a colleague
    • Ten identical happy paths after the code is done