Test Small First
Try the tiniest example before the full homework. Two numbers before twenty. One maze corner before the whole map.
- Explain why tiny test cases find bugs faster
- Pick a minimal example for a word problem
- Describe what to do when a small test fails
Finish first
Topic contents
Lesson 1 of 3
Shrink the problem
You would not bake a wedding cake as your first ever bake. You try cupcakes. Programs deserve the same respect.
If average-of-three fails, test average-of-two you can do in your head. If maze code fails, test a straight corridor with no branches.
Step through the animation. See a big task reduced to a five-minute check.
Lesson 2 of 3
Expected versus actual
Write what you expect beside what the program prints. Mismatch means the plan or code missed something, not that you are bad at computing.
Teachers call these test cases. You can write them before code exists.
Maze lab backtracking is easier when you test dead ends on a three-cell map first.
Lesson 3 of 3
Then plan on paper
Small tests feed into the plan-before-code capstone next. You will reorder steps with proof from tiny examples.
Keep a notebook of tests that caught bugs. Future you will thank present you.
Quality beats speed when you are still learning how to test and plan.
Practice
Work these out yourself
No answer key here on purpose: these are the questions worth thinking through before you move on. Open one and work it out.
0/3 attemptedAssessment
Check your understanding
Answer each question, then read the explanation. That is where the learning is.
Finished this topic?
0 of 3 lessons marked done. Marking the topic complete ticks the rest.
