Class 6 of 6 Unit 3 · Making it real 4 hours · 3 at the keyboard
Capstone: Build It, Prove It, Hand It Over
One real thing, working, surviving bad input, failing the way you specified, and runnable by somebody who has never seen it.
Anybody can get something working while they are standing next to it. This class is about the other three things: proving it works when you are not, writing it down so somebody else can run it, and being able to defend every line of it whoever wrote the first draft.
What "done" means#
A thing that works on your laptop while you are watching it is not done. It is the first of four steps, and the other three are where the value is.
1. It works. The normal case, on real data, in front of somebody else. This is the step everybody does and the only one most people count.
2. It survives. Your ugly input does not crash it, does not silently drop rows, and does not produce a confident wrong answer. It reports what it could not handle, by name, with the row number.
3. It fails in a way you chose. When the file is missing, the network is gone, the value is out of range or the power went halfway, it does the thing your five sentences said it would. Not the thing that fell out.
4. Somebody else can run it. Without you. From the README. On a machine that is not yours.
You are assessed on all four, and the marks are weighted the way the industry weights them: the first is worth the least.
The four things being assessed#
Does it do the job#
The narrow question, and the easy one. It does what the five sentences said. It is worth having a demo you can run in ninety seconds without narration.
Can you defend every line#
You will be asked about a specific line, chosen by me, and asked what it does, what it assumes, and what happens if that assumption is wrong. It does not matter who or what wrote the first draft. A model, a colleague, a forum post from 2013 and your own hands are all the same answer: you shipped it, so you can explain it.
If the honest answer is "I do not know what that line does", that is a finding rather than a disaster, and it is worth more said out loud now than discovered later. The correct move at that point is to simplify until you do know, which is a professional instinct and not a retreat.
Does it behave when things go wrong#
I will break it. Rename the input file. Feed it the row with the empty address. Pull the network. Pull the power halfway through a write. Send the cue twice. What I am watching is not whether it survives everything, because it will not. It is whether what happens is what you said would happen, and whether it says something useful when it cannot continue.
Could somebody else take it over#
Ten lines of README: what this is, how to run it, what it assumes, what it does when it fails, who to ask. A repository with commits whose messages mean something in six weeks. Constants named and in one place. A note saying which parts were generated and what you verified them against.
A tool nobody else can run is a tool that exists only until you are unavailable, and you will be unavailable exactly when it matters.
Choosing a project#
Small and finished beats ambitious and half working, every time and in every year of this course. The best capstones are boring and real.
Projects that have worked:
- A patch checker. Reads the real fixture export, reports address clashes and any fixture whose footprint runs off the end of its universe, with both names and the overlapping range.
- A converter. Takes what one piece of software exports and produces what another one imports. Endlessly useful, entirely mechanical, and every department has one they need.
- A prop with a defined failure. Sensor to decision to actuator, on a cue, with a timeout and a safe state you can demonstrate by pulling a cable.
- A report generator. Turns a cue list or a schedule into a printable page, so a change to the source regenerates everything downstream instead of somebody retyping it.
- A rehearsal timer or a call sheet screen on a Pi, starting on boot, that survives a power cut.
- A file discipline tool. Renames or checks a media folder against a naming convention, reports what does not match, and never touches anything without
--dry-runfirst.
Projects that have gone badly, every year:
- Anything with a deadline outside this room. A capstone that has to work for a real show next week is a capstone you will cut corners on, and the corners you cut are steps two to four.
- Anything you have to learn a whole new framework for. The framework becomes the project.
- Anything where the interesting part is the hardware you have not got yet.
- "An app." If you cannot say what it does in five sentences, it is not scoped.
The test: could you finish it badly in one afternoon? Then you can finish it well in three.
Making it survive the ugly input#
This is Lab B and it is the block that separates a script from a tool. The method is not clever, it is just done rather than skipped.
Write down what you are given, then break each promise in turn. For every input:
| Break it by | And your thing should |
|---|---|
| Missing the file entirely | Say which file, and stop |
| An empty field | Do what you decided in writing that empty means |
| Text where a number should be | Name the row and the column, not "invalid input" |
| A value out of range | Say the range and the value |
| A duplicate | Say both, not just the second |
| The last row, and the first | Behave the same as the middle. Off-by-one lives here |
| Twice as much data as you tested on | Not take quadratically longer. Class 3 |
| The same input twice | Either be safe to re-run, or refuse. Not half-do it |
That last row has a name worth knowing: something safe to run twice is idempotent, and a tool that is safe to re-run is worth roughly double one that is not, because in production everything gets run twice at some point, by somebody who is not sure whether the first one worked.
And the rule that outranks all of this: anything destructive gets a dry run first. Print what it would do, run it on a copy, then run it for real. One flag, one line, and it is the difference between a mistake and an incident.
The standard, in miniature#
Thirty minutes, and it is the capstone in one function. A call sheet: normal case, two ugly cases, and one specified failure. The two rules that matter are the last two, and both are places where the easy behaviour, dropping the row, produces a document that looks correct and is not.
If you can pass all six of these, you know what the marker is looking for. If you cannot, the thing to fix is not your code, it is your instinct about which inputs are worth defending against, and that instinct is the actual subject of this course.
Breaking somebody else's#
Lab C, twenty five minutes on somebody else's project, and it is the most useful half hour in the class for both of you.
You are not looking for style. You are running the four questions on code you have never seen, on a clock, which is exactly the situation that made this course exist.
The order that finds things fastest:
- Read the README and try to run it from that alone. If you cannot, that is finding number one and it is the most valuable one.
- Find everything that writes or deletes. Read those lines character by character.
- Feed it the empty field, the duplicate and the last row.
- Take away something it assumed: rename the input, unplug the network, delete a folder it expected.
- Run it twice.
- Only then read the logic in the middle.
Write down what you did and what happened, in order. Hand that back. A finding written as "it crashed when I gave it an empty address, here is the traceback and the row" is worth an hour to the author; "it seems a bit fragile" is worth nothing to anybody.
Receiving this well is part of the assessment too. A finding is somebody spending their time making your thing better. The professional response is a question and a commit, not a defence.
The handover#
Lab D, and the part that gets skipped in every course and every production.
The README, ten lines. What this is. How to run it, as a command somebody can copy. What it assumes: the Python version, the file it expects, the address it talks to. What it does when it fails. Who to ask.
The commits. Messages that mean something in six weeks, which is when they get read, which is during a technical rehearsal by somebody looking for the change that broke it. That person may well be you.
The failure behaviour, written down as a sentence with a number in it. "If no cue arrives for two seconds it goes to its safe state, which is off. Two seconds was chosen because the console's own heartbeat is one second and one missed heartbeat should not fire the effect."
What was generated and what you verified. Not because it is shameful. Because the next person needs to know which parts had a human's full attention and which were checked against three cases.
And for anything physical, the one page in the case. What it is, its ratings, its pinout, its behaviour on power-up and on loss of control, its indicator codes, and a phone number. This is the same sheet Electronics for Theatre asks for, because it is the same case and the same 23:40.
The last exercise#
Give your project to somebody who has never seen it. Say nothing. Watch them read the README and try to run it.
Do not help. Do not explain. Write down every place they hesitate.
That list is the real result of this class. Everything on it is something you knew and did not write down, and every item is an hour of somebody's time on a production where you are not in the building.
If you want a bigger project than four hours#
Some people want the capstone to be the start of something rather than the end of a module. Three routes, in increasing order of how much of your own time they will eat.
The model box. Wire a 1:25 white card model as a complete show system: pixels on booms, an ESP32 taking Art-Net from a free desk, a servo against a limit switch, a Pi playing sound on OSC. Between HK$900 and HK$2 600, five stages that each stop cleanly, and every layer of a real building at a scale where breaking it costs an afternoon. The full build is here, and stages one to three are what Class 5 taught you.
A tool for a department that keeps asking for one. Find the thing somebody in this building does by hand forty times a production. Do the break-even arithmetic honestly, and if it comes out positive, build it, hand it over properly, and watch somebody use it without you in the room. That last part is worth more than the code.
A Companion module, or a bridge nobody has written. Two products in this building that should talk to each other and do not. Check Bitfocus Companion first, because it very often already does it and choosing that over your own script is the mature answer. When it does not, the module is a smaller and better-supported job than a standalone tool, and somebody else gets the benefit of your afternoon.
All three are assessed the same way, on the same four things, and the fourth one is still the handover.
Where this course leaves you#
Twenty four hours. You should now be able to:
- Read a program and say what it holds, does, assumes and does when it is wrong, in a language you do not know, at speed
- Write a small one that does a real job, on real data, with the failures named
- Choose a data shape on purpose and know what it costs at scale
- Keep the work so it survives you, and find a fault by narrowing rather than guessing
- Direct a model to write the draft and verify it well enough to put your name on it
- Put code on a board that makes a physical thing happen, with a safe state you specified first
- Say which notation and which language a job wants, and why the boring answer is usually right
One of those courses you have already done, and two of them are for other rooms:
| Course | Who is in it | The habit |
|---|---|---|
| Electronics for Theatre | You, last year | Prove it, do not assume it |
| This one | You, now | Four questions of any program |
| Computer Systems and Networking | Media Design, year one. You will not take it | Every signal is a number with a deadline |
| Show Networking and Control Systems | An elective, if you want it | Five questions of any protocol |
The first two rows are the whole of what this school gave you on this subject, sixty four hours and twenty four, and between them they cover the hardware and the software with almost nothing said twice. The third is somebody else's curriculum and is there if you ever need what it knows. The fourth is the one to take next if the protocols were the part that held your attention.
The same discipline every time: establish what is actually true, at the layer where the question can be answered, and never accept a comfortable story instead of a measurement. The how they relate page says which one goes deepest on what, and where to go next is what to read when all four stop being enough.
Numbers from this class#
| Thing | Value |
|---|---|
| The four steps of done | Works, survives, fails as chosen, somebody else can run it |
| Time in this class on making it work | One hour of four |
| Time on everything after that | Nearly three hours of four, which is the ratio of the job |
| Lines in a README | About ten, and never zero |
| Sentences specifying an effect | Five: what, what starts it, twice, power loss, who is near |
| Scope test for a capstone | Could you finish it badly in an afternoon |
| First thing to check in somebody else's | Can you run it from the README alone |
| First code to read in somebody else's | Everything that writes or deletes |
| Safe to run twice | Idempotent, and worth roughly double one that is not |
| Required before anything destructive | A dry run, and a copy |
| What a finding should contain | What you did, what happened, and the row or the traceback |
| Who is responsible for a generated line | Whoever shipped it |
| Value of a tool nobody else can run | Zero, from the day you are unavailable |
Self test with model answers
Answer it yourself first, out loud or on paper, then open the answer. Reading the answer without attempting the question teaches you almost nothing.
-
It survives bad input: the ugly row does not crash it, is not silently skipped, and does not produce a confident wrong answer. It fails the way somebody chose: file missing, network gone, value out of range, power pulled halfway. And somebody else can run it, without them, from the README, on another machine. The third of those is worth the most in assessment and in production, because a silent wrong answer is the failure that reaches an audience.
-
The professional answer is what it does, what it assumes, and what happens if that assumption is wrong, because you shipped it and where it came from is not a category that appears in an incident report. If you genuinely do not know, say so out loud: that is a finding rather than a disaster, and it is worth far more now than when it is discovered later. Then simplify that part until you do know, which is an instinct rather than a retreat.
-
Rename the file away: it should name the file it wanted and stop. Feed it an empty address: it should do whatever you decided in writing that empty means. Feed it text in a number column: it should name the row and the column rather than saying "invalid input". Run it twice: it should either be safe to re-run or refuse, because half-doing it the second time is the worst of the three. Every one of those is a message with a row number in it, not a shrug.
-
Because the afternoon is only the first of four steps. If the working version fills the whole time, then surviving bad input, choosing the failure behaviour and writing the handover all get cut, and those are the three that are actually assessed and the three that decide whether the tool is still in use next year. A project you could finish badly in an afternoon is one you can finish well in three.
-
Six things you knew and did not write down. Each one is an hour of somebody’s time on a production where you are not in the building, and each costs about a line in the README to prevent. The value is in not helping while you watch: the urge to say "oh, you just need to" is the exercise, and every time you feel it you have found one.
Note. These are model answers, not the only correct ones. If yours differs and you can defend it with the arithmetic and a measurement, that is worth more than matching the wording.
The four hours, accounted for. This is the lecturer's view of the session, and it is here rather than hidden in a pack because a student who can see where the time goes can see what the class is actually for.
Run of the session #
240 minutes · 175 at the keyboard · 15 on the idea
- 15min Open The five sentences, read out, and the room finds the missing sentence in each
- 15min The idea What "done" means, and the four things you are assessed on
- 60min Lab A Build the thing that works on the normal case
- 15min Break —
- 45min Lab B Make it survive your ugly input, and the four cases you have not thought of
- 30min Lab C Break somebody else's on purpose, and write down how you did it
- 40min Lab D The handover: the README, the failure behaviour, the one page in the case
- 20min Close Hand your project to somebody who has never seen it and watch them run it
Blocks are an order of work rather than a timetable: a class that runs long at the keyboard is a class that is going well. The minutes are here so you know what you are trading against when it does.
Four hours goes fast, and most of it is at the keyboard. What you do before the class, and in particular whether the software is installed and working, decides whether you spend those hours learning or catching up.
What you must already be able to do#
Everything from Classes 1 to 5. In practice: read code you did not write and answer the four questions about it, convert types at the boundary, choose a data shape on purpose, use git, run generated code through the verification loop, and specify what your thing does when it is alone and confused.
Three things to do#
- Decide what you are building, and write the five sentences. What it does, what starts it, what happens if it starts twice, what happens if it loses power or its network halfway, and who is standing near it. This is the same five sentences as Class 5 and it is the specification. Bring it written down. If you cannot write the five, you have not chosen a project yet.
- Bring the ugly input. The real fixture export with the quoted comma in it. The cue list somebody edited by hand. The row with the empty field. Whatever your thing consumes, bring the worst genuine example of it you can find, not one you invented.
- Make the repository and commit something.
git init, a README with ten lines, one commit. Empty is fine. Arriving with the repository already made removes twenty minutes from everybody's afternoon.
What to bring#
Laptop with everything from the earlier classes working. Your five sentences. Your ugly input. Any hardware your project needs, tested at home, with the cable that carries data.
The calculations this class asks for, with the working shown. Use them to check your arithmetic, never to replace it: the assessment asks for the method.
Growth: what happens at scale
Loop budget and deadline
End to end latency budget
Storage and transfer time
Retrieval, not rereading. Everything here is self-graded, stored in this browser only, and reported to nobody.