Session 19: Finding and fixing faults
Learning outcomes
- Match a symptom to a fault class
- Write a fault inventory before changing code
- Fix compile faults one message at a time
- Explain capitalisation, semicolon, brace, = versus == and pin-mode faults
Kit and components
- Uno, push button, breadboard, onboard LED, lab PC
Pre-reading about 20 min
Students read these on their phones before class. They are listed on the student Before class page.
Session plan
- 0:0010 minRecap
Quiz: evidence and test tables
- 0:1020 minDemo
Symptom first
Project the symptom table from Code Along chapter 9. Show one fault of each class and ask the class to name it before revealing the fix.
- 0:3055 min
- 1:2525 minBuild
Practice inventory on the bench
Students download the practice faulty sketch from the Practical Assessments page, write a fault inventory on paper, then repair it and demonstrate it on the bench.
- 1:5010 minWrap-up
Assessment briefing
Conditions for S20, what to bring, and how the grid is marked.
Checkpoint: ready to move on?
Students pass Five faults at once and have a written fault inventory for the practice sketch that names all five classes.
Extension for fast finishers
Plant a fault in a partner's sketch and time how long each of you takes to find it.
Catch-up path
Work through the fault classes table with hints open, saying the class aloud before each fix.
Homework and practice
Revise the five fault classes.
Facilitator notes
- The practice sketch is not the assessment sketch. Keep the door-bell sketch out of sight until S20.