From prompt to requirements
medium 35 minThe prompt is one sentence.
Video lesson · Chapter 1 of 6
Make a prediction
See it run
What each question buys: a method, a refusal, a lock, or nothing at all.
Operations
The seven measures
One question per theme. Watch what each answer turns into.
Step 1 of 8
One sentence
| Ask | Answer | Becomes | |
|---|---|---|---|
| Members | |||
| Events | |||
| Amounts | |||
| Sorry cases | |||
| Users at once | |||
| Rules | |||
| Edges |
Design the laundry room of a student house. Nothing to build from yet.
Step 1: One sentence
Members who starts something?Events what happens, in order?Amounts how many, how long?Sorry cases full, late, twice, not yours?Users at once can two calls meet?Rules which gets a second version?Edges stored? screens? not today?- When
- First three minutes
- You leave with
- Rows that become code
If the right column stays empty for both answers, the question was not worth asking.
In the real world
The same from prompt to requirements doing real jobs. Pick one and step through it.
Notes as people write them, and the sentences they become.
Step 1 of 6
Several floors
| Note | Sentence | Measure | |
|---|---|---|---|
| 1 | several floors | layout is data | Amounts |
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 |
How many is an amount. The layout becomes data that is read when the lot is built.
Step 1: Several floors
Common mistakes
The bugs interviewers watch for, with the fix beside each.
A pattern before a fact
criticalNo fact supports it yet, and you will defend it for the rest of the round.
Wrong# first line on the boardclass LaundryRoom(Singleton): ...Right# first line on the board# R1 a resident can start a free machine of a kindAdjectives
majorNobody can test fast, secure or flexible. Say what must never happen.
Wrong# must handle concurrency wellRight# Q1 two panels never start the same machineFull as a surprise
criticalThe sorry case was never asked, so the caller meets an index error.
Wrongmachine = self._free[kind][0]Rightmachine = self._first_free(kind)if machine is None: return None # R6Charging before finding
criticalR6 has two halves: nothing comes back, and no money moves.
Wrongself._payments.charge(resident, kind.cents)machine = self._first_free(kind)Rightmachine = self._first_free(kind)if machine is None: return Noneself._payments.charge(resident, kind.cents)A feature without a sentence
minorIt costs minutes that the hard part needs, and nobody asked for it.
Wrongclass NotificationService: ...Right# not now: messages. Would be a listener on the end of a cycle
Interview tips
Ask with a default
- I assume that full is a normal answer. Right?
- A nod is enough
- Six questions in all
Number the sentences
- R for what, Q for how well, A for assumed
- R4 is quick to say later
- Stop at ten
Listen for the hint
- A long answer marks the hard part
- A shrug means: you choose
- Read back and wait two seconds
Fence aloud
- Name it
- Give a reason
- Say where it would fit