A useful software question is not only “Does this work?” It is also “What would show that our expectation is wrong?” A counterexample is a particular case that challenges a broader claim. It gives an abstract assumption something concrete to meet.

Look for the boundary

Imagine a rule that accepts a booking when its end comes after its start. The familiar case is easy to picture. Less familiar cases include equal times, a missing value or a booking that crosses midnight. These cases ask different questions about the same sentence. Before checking an answer, the intended rule needs to be clear.

Separate the rule from the check

A successful check shows what happened for the cases examined. It does not establish that every possible situation will behave correctly. Equally, an unexpected result may expose an unclear requirement rather than a programming mistake. Naming that distinction makes a discussion more useful: is the behavior wrong, or is the expectation incomplete?

Keep the discovery useful

When a surprising case reveals a problem, record the input, the expected outcome and the reason for that expectation. A small repeatable example is easier to discuss than a general statement that something feels unreliable. After a change, that example can help check whether the same problem returns.

Counterexamples are useful because they narrow uncertainty. They turn confidence into a specific question that can be answered, revised and discussed. The aim is a better description of behavior, with its limits made visible.