Skip to the content
Peabody TeachFor teachers and grown-ups

🧩 Break It into Parts, Then Break It on Purpose v0.1.0

Students split a big job into small parts that are each obviously right, then try to break a number machine with the oddest input they can think of. These are decomposition and testing, the two habits that make programs work.

  • For: 3rd to 5th
  • Time: about 40 minutes
  • The question: How do you cut a big job into small jobs, and how do you check it works?
  • CSTA (2017): 1B-AP-11, 1B-AP-15

You will need

  • The printable's planning sheet and rule cards
  • Pencils
  • Chart paper for the class number machine

The lesson, step by step

  1. Pick a big job

    Write on the board: "Put on a class show." Ask: "Can we do this in one step?" Of course not. Ask groups to break it into five or six parts, and then break each part into smaller ones until each is something a person could just do.

  2. Check the parts

    A good part is small enough to be obviously right. Groups read their parts aloud and the class votes: "Could someone just do this one without asking another question?" Parts that fail get split again.

  3. Put the parts in order

    Some parts must come first and some can happen at the same time. Groups number their parts and circle the ones that can happen at once. This is how a team splits a job among people, and how programmers split a program into functions.

  4. Meet the number machine

    Show a rule card: "The machine takes a number, doubles it, and adds 1." Test with 3 (7) and 10 (21). Ask which numbers the machine hasn't been tried on yet.

  5. Try the weird case

    Groups hunt for the oddest input they can think of: 0, a very big number, a negative number, a number with a point in it, nothing at all. For each one they predict, then test it by working it out. If the machine does something odd, they have found a weird case.

  6. Write a test list

    Each group writes five tests for its rule card: two ordinary, two odd and one on the edge. They share the one most likely to break a rule. Say that this is what testers do for a living.

Questions to ask while they work

  • Could someone just do this part?
  • Which part has to come first?
  • What is the oddest thing you could give the machine?
  • What did you expect, and what happened?

If it goes fast

  • Write a rule that has a weird case on purpose, and let another group find it.
  • Break the show plan into jobs for a real small class event.
  • Decide which test would be the most important if you could only run one.

The printable

Cut the rule cards apart. Each group needs one rule card, the planning sheet and the test list.

◂ The Scoreboard Game · All ten lessons · Read It, Run It, Say It ▸

Nothing on this page is sent to us. The printable has a blank name line and no child's details. No sign-in, no ads.