Lite / Building Machines That Respond / Week 35
A README a stranger can follow
You hand your project to a classmate and leave the room. Can they get it running and repeat your best test without asking you a single question?
Why should I care?
A project only you can run is a project that dies when you move on. A good README is the difference between 'it worked on my laptop' and something another learner can build on, and it's a required part of your capstone.
- Structure a README: what it is, how to run it, how to test it, what it can't do.
- Write step-by-step instructions with every setting stated.
- Test the README by having someone else follow it.
Predict
What is the most common reason someone can't follow a README?
- It's too short
- A step or setting the writer 'just knew' was never written down
- It has no pictures
- It uses headings
Guess first, then reveal
Missing steps. Writers skip what feels obvious to them, such as which level to open or which setting they changed first. The only reliable fix is to watch someone else follow it.
Discover
Complete Level 2 of the Washing Machine build: the control sequence and the safe door-unlock rule. Then write a README for your controller so that someone who has never seen it can enter the same sequence and explain why the door rule is safe.
What the interactive shows (text version)
Level 2 of the Washing Machine build asks you to choose which sensor condition ends each stage of a wash cycle and the rule for when the door may unlock. After completing it, you write a README so that someone else can enter the same control sequence and understand the door rule.
Understand
Five sections that cover most projects
What it is (one paragraph: the problem and the machine). How to run it (numbered steps from nothing to working). How to test it (the test plan and how to read the results). Design decisions (short, with reasons; link the notebook). Limits and known issues (what it can't do, what is simulated, what you'd do next).
Steps a stranger can follow
Number the steps. One action per step. State every setting and value ('set the threshold to 60'), and say what the reader should see after key steps ('the belt starts moving'). Avoid 'just' and 'obviously': they hide the steps you skipped.
Test it on a person
Give the README to someone who hasn't seen your project. Watch silently. Every time they hesitate or ask a question, the README is missing something; add it. One round of this fixes more than an hour of rereading your own writing.
Explain it another way
Intuitive
A README is a recipe. If your friend's cake comes out different, the recipe, not the friend, needs fixing.
Technical
A README is the entry point of project documentation: purpose, prerequisites, setup, usage, testing, design rationale, limitations, licence and contact. It should be sufficient for reproduction without the author.
Applied
Open-source projects live or die by their READMEs; many people decide in a minute whether a project is usable from its first screen.
Worked example 1
Improve: 'Open the sorter and set it up like mine, then run it.'
'1. Open Builds → Sorting Machine → Level 3. 2. Set belt speed to 3, red threshold to 60, size limit to 4 cm. 3. Press Run. You should see about 200 parts sorted. 4. Expected result: at least 95% correct (my runs: 96%, 97%, 95%).'
Common mix-ups
If the code is clear, no README is needed.
✓ Code shows how; a README says what it's for, how to run and test it, and what it can't do.Documentation is written at the end.
✓ Write it as you go and test it before the deadline, or the gaps won't be found in time.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Write the README for your capstone using the five sections. Give it to someone who hasn't seen the project; record every question they ask and fix the README for each.
Reflect
What question did your tester ask that surprised you?
Write your answer on paper or in your own notes. Lite never stores what you write.