Phase 1: Prepare
Step 1 Warm-up recall
From M8.L3: what should a count check compare?
Private: nothing you type here is sent or stored.
Step 2 Learning goal
By the end of this lesson you can:
- write a hand-over note (Foundation);
- state limits honestly (Core);
- present results to a non-programmer (Core).
Phase 2: Teach
Step 3 A familiar example
A good mechanic hands back the car with a note of what was done, what to watch and what is still not fixed. A program needs the same hand-over.
Step 4 Clear explanation
A program is useful only if the next person can run it and trust it. A short hand-over note answers six questions.
STOCK REPORT - hand-over note
Purpose: lists items at or below their reorder level.
How to run: put stock.csv beside the program, then run it.
Inputs: stock.csv with columns item,qty,reorder (whole numbers).
Outputs: a printed list of items to reorder, and the number
of rows skipped as bad.
Limits: does not read other file types; does not update stock;
a quantity written as text is skipped and counted.
Tests: 12 test cases passed, including quantity 0, a quantity
equal to the level, a blank line and a missing file.
Not tested: files over 100,000 rows.Write for a reader who has never seen the code. Use the words of the shop or office, not of programming. Say what the program cannot do and what you assumed, because a hidden assumption, such as a unit or a column order, is how mismatches arise.
When you present results, give the answer first, then how sure you are, then what was left out. A number with no count, no unit and no source is not yet a result.
Step 5 Worked example (4 marks)
Which of these belongs in the Limits line of a note: (a) "written in Python", (b) "skips rows where qty is text and reports them", (c) "fast"?
- (a) says nothing the user can act on. (1 mark)
- (c) is a claim with no evidence. (1 mark)
- (b) is a real, testable limit and says what happens. (1 mark)
- Answer: (b). (1 mark)
Go deeper: the professor's notes
What for.
Cannot do.
Run.
Note
| Section | Content |
|---|---|
| limits | what it cannot do |
| tests | what passed, what was not tested |
At work: A hand-over
Someone else will run your program.
- Write the six parts.
- Ask them to run it from the note.
What a careful practitioner decides. A hand-over note is part of the program.
Phase 3: Practise
Step 6 Learner practice (instant-marked)
1. A hand-over note is written for:
Plain words for the next person.
2. The Limits section should say:
Honest limits.
3. A result presented to a user needs:
Show how far to trust it.
4. A hidden assumption such as a unit should be:
Say it.
Phase 4: Close
Step 7 Recap
- The note covers purpose, how to run, inputs, outputs, limits and tests.
- Write for someone who has not seen the code.
- State assumptions and what was not tested.
Step 8 Exit ticket (ungraded)
Write the Purpose, Inputs and Limits lines for your own program.
Private: nothing you type here is sent or stored.
Step 9 Go further (Extension)
Give your note to a classmate and ask them to run the program from it alone.
In industry: Southwest Airlines: a system overwhelmed
In December 2022 the automated system used to reassign pilots and flight attendants after disruptions was overwhelmed by the scale of the task during and after a winter storm. Staff had to work through records by hand, and the airline cancelled thousands of flights.
Link to this lesson. Test how a program behaves when the data is far larger and messier than normal, and plan a manual fallback.
Source: Wall Street Journal via the AI Incident Database; Dallas Morning News, 29 December 2022
Common mistakes
| Mistake | Why it fails |
|---|---|
| Writing the note for programmers | Use the user's words. |
| Leaving out limits | State what it cannot do. |
| Giving a number with no count or unit | Add count, unit and source. |
Limits. Larger programs also need maintenance plans and training, which are beyond this course.