From prompt to requirements 00:00:00 Make a prediction You will decide which clarifying question can change the design, and convert the answer into a condition another person could test. A user clicks reserve and walks away. Two minutes later, can somebody else take the seat? You cannot know from the verb reserve alone. Decide whether this is a temporary hold or a completed sale, how long the hold lasts and what happens at exact expiry. Those decisions change both the state model and the expected result. 00:00:33 The tailor who measures before cutting A tailor does not guess whether the coat must fit over a jumper. Measuring shoulders is useful; asking whether the wearer will add a thick layer changes the necessary clearance before the first cut. An interview question earns its time when the answer can change an invariant, a boundary or an example. Capture the decision as an observable rule, just as the tailor records the measurement and allowance. A requirement is a sentence about the system that can be true or false. "The room should be easy to use" cannot be checked. "A resident may hold at most two machines" can: you can write the test before you write the class. The prompt is short on purpose. The interviewer wants to see whether you build what was asked or what you remembered. Two candidates with the same prompt may need different classes, because they got different answers. 00:01:26 Decide what reserving means A customer asks to reserve a seat. If reserve means sold, the first click takes money; if it means held, it needs an expiry. Ask whether checkout can take several minutes and what another customer should see while the first pays. Agree that a hold makes the seat unavailable for two minutes, after which another customer may claim it. There is now a testable requirement. Write down the two contracts. Under an expiring hold, a second buyer at eleven fifty-nine must wait. After expiry the seat can be released. Under a sale there is no automatic release. Asking which timeline is correct prevents implementing an expiry process the product never wanted. 00:02:10 Return a borrowed copy For a library, ask whether returning any copy of the same title is allowed. If loans attach to barcodes, scanning a different copy must leave the original loan open. That answer changes the entities and the core test, so ask it before choosing a data structure. Take two physical copies to the returns desk. A member borrowed copy A but presents copy B. A title-only system may incorrectly close the loan. If the requirement is copy-level accounting, the member still owes A. Test the correct barcode immediately afterward to establish the positive case. An interviewer may say to make an assumption. Silence still leaves two people testing different behaviours; state the assumption aloud and run a boundary example. When a decision is cheap and reversible, choose a reasonable default and get to the first working use case. Standards such as the Internet specification for requirement levels give words like must and should specific meanings. A mandatory requirement and an exception with a documented justification lead to different tests. Gherkin takes another approach: given a starting state, when an action happens, state the observable result. Two reviewers can now disagree about an example they can actually run. 00:03:31 Try an interview follow-up How would you run this step in a real project? I would include every actor who changes or depends on the result. We turn vague words into examples, agree on what is outside scope, and name an owner and date for each open question. Where possible, the examples become executable tests so a later behaviour change makes the disagreement visible. A library says that holds expire at closing time. Two branches close in different time zones. Ask which branch owns the deadline and whether a pickup at exactly closing succeeds. Write down one example just before the boundary and one at it. Those answers determine the clock, comparison and acceptance tests. 00:04:17 What to take with you Seven measures turn a prompt into a spec: Members, Events, Amounts, Sorry cases, Users at once, Rules that change, Edges. Ask the one or two questions per measure whose answers would change a class, a structure or a lock. Write eight to ten sentences that can be true or false, read them back, and write down what you leave out. Then every sentence becomes a method, a field or a test, and the round has a finish line.