Curriculum

Curriculum

Review a Specification for Ambiguity

Scenario

Audit three short specifications for a study-room reservation checker.

Selected choicePick a choice below
Result—

Try it yourself

Choose each specification and predict whether two teammates would build the same checker.

Reveal the explanation
  1. Allow booking if plenty of seats exist and the student seems eligible

    Ambiguous. "Plenty" and "seems eligible" have no measurable boundary.

  2. Return true if freeSeats > 0 and hasPermission is true, else false (no note on negative seats)

    Partially ambiguous. Valid inputs are clear, but negative input handling is left unstated.

  3. Inputs: integer freeSeats >= 0, bool hasPermission. Return error if freeSeats < 0; else return freeSeats > 0 AND hasPermission.

    Unambiguous. Inputs, invalid policy, boundary (0 vs 1), and output type are all locked.

Before drawing a flowchart or prompting an AI agent, run a 30-second ambiguity check: Are inputs typed? Are boundaries explicit? Is invalid input defined?

Your turn

Audit "Students pass when their score is good enough" and rewrite it into an unambiguous 2-sentence contract.

Common mistake Leaving "good enough" or the valid score range (0..100) undefined.

Check your work

Input integer score in 0..100; score < 0 or > 100 returns INVALID_SCORE; score >= 60 returns Pass, else Try again.

Quick check

What is the clearest sign that a specification is free of ambiguity?
Show the answer and reasoning

Correct answer Two readers independently produce the same expected outputs for typical, boundary, and invalid cases

Independent agreement across typical, boundary, and invalid cases proves the specification is unambiguous.