Stage 6 of 6 · Logistics, evidence, next steps
Lab & hand-in
The clock for the day, the pair protocol that makes design a two-person sport, and evidence that, for the first time, is mostly documents. Two classes to the midterm; this week's paper skills are its paper questions.
The two hours
| Minutes | You do | Checkpoint before moving on |
|---|---|---|
| 0–10 | Station up, SSH in, circuit wired and traced (same as Week 4), project folder and venv created. | (.venv) prompt; circuit signed off. |
| 10–25 | On paper, together: re-derive the reaction timer's coarse steps, find R4's hiding place, write the false-start trace. | Trace matches the worked table; both partners can explain the flag. |
| 25–35 | docs/requirements.md and docs/design.md written and committed. | Docs committed before any .py exists. |
| 35–55 | Translate to reaction.py, run, play a few rounds. | Valid rounds and false starts both behave. |
| 55–70 | Fill the verification table, R5 honestly; commit. | Every row has a result; none says "seems fine". |
| 70–110 | The design ladder: full cycle per rung, swapping roles each rung. | Each rung's spec committed before its code. |
| 110–120 | Assemble the evidence, exit ticket, clean shutdown, pack. | Drive returned; kit packed; station restored. |
Working as a pair
This week the pair roles have industry names: the navigator owns the spec and the design (writes requirements, sketches pseudocode, keeps the trace honest), the driver owns the translation (types, runs, reports what the machine actually did). The navigator may not touch the keyboard; the driver may not silently "fix" the design, a divergence between design and code goes back to the navigator as a finding. Swap every rung. The point is not ceremony: it is that both of you practise both roles before the midterm makes you play them alone, and that the spec stays a real interface, not a formality. Disagreements about behaviour are settled by editing the requirement, then the code, in that order.
What to hand in
| Item | How to produce it | Shows that |
|---|---|---|
| Repository URL | Paste into the Omnivox form | docs/requirements.md (with verification column), docs/design.md, reaction.py, ladder rungs with their spec files, commits from both partners in spec-before-code order |
trace.jpg or docs/trace.md | Photo of the hand-written trace table, or a Markdown version | A design was executed on paper before it was executed on silicon |
ladder-spec.md | Already in docs/; note in the form which rungs were completed | Requirements you wrote yourselves, with IDs and acceptance criteria |
station.txt | Typed in nano | Station number, Pi model, boot-drive label, both names, who navigated which rung, exit-ticket answers if asked |
Counts as completion of in-class work. The habit being graded all semester starts here: documents beside code, in the same history. The project's D-milestones will expect exactly this repository shape.
Exit ticket
Answer without looking at the hub; write the answers at the end of station.txt if the teacher asks for them.
- Repair this requirement: "The night light shall work well in the dark."
- Write the pseudocode for: blink the LED once per second until the button is pressed.
- In the timer design, what would go wrong without the
false_startflag? - Which notation would you pick for a system with NORMAL, ALARM and MUTED modes, and why?
- Why does the verification table beat "we ran it and it worked"?
Packing up
Homework and next week
This week's homework (2 h)
Design without a computer
Pick one everyday machine, a microwave, a crosswalk signal, an elevator door, and give it the full treatment on paper: 5 requirements with acceptance criteria, pseudocode or a state diagram, one traced path. Note it in your journal for the Week 7 reflection log. Then read the control-flow chapter of the Python tutorial, break, continue and else-on-loops included, and trace two of its examples by hand. Ten minutes of trace-table practice per day until the midterm is the single best preparation it has.
Week 6 · Tuesday, October 6 (Monday schedule)
Object-oriented programming
Note the date: no class Monday October 5; Tuesday the 6th runs on the Monday schedule. The timer's design kept state (flags, modes) and behaviour (functions) side by side; next week they move in together. Classes package state and behaviour into objects, which is what LED(17) and Button(27) were all along; you will finally build your own. Bring the breadboard kit.