Creative Coding Studio · Lesson 9

Studio discipline: find the bug on purpose

Ākonga stop guessing and work a repeatable routine — reproduce, isolate, change one thing, retest — then review a classmate's project using the same routine.

Other teaching approach: Unplugged Computational Thinking Seminar →
Year 7 Digital Technology · Computational Thinking

Lesson 9: Systematic Debugging, Testing & Peer Code Reviews

Developing computational thinking through Scratch block coding, algorithms, and Te Ao Māori perspectives.

🎯 Ngā Whāinga Akoranga | Learning Intentions

🧠 Students will know:

Common errors in block code: Scratch snaps together, so whole-line syntax errors are rare — the everyday bugs are logic errors (the script runs but does the wrong thing), a value set at the wrong moment, and an event nobody hears. Plus systematic debugging strategies and peer review ethics.

✏️ Students will demonstrate:

Identify and fix intentional bugs in broken Scratch projects, create a test plan, conduct peer code reviews, and provide constructive feedback.

🎥 Media Anchor & Pedagogical Scaffold

Debugging Code in Scratch — Classroom Activity

Video Clip: Students are given existing Scratch code with bugs to find and fix — a structured debugging activity that builds systematic testing habits.

🧠 1. Before Viewing (Activate & Predict)

What steps do professional software engineers take when their code doesn't work as expected?

👁️ 2. During Viewing (Watch With a Job)

  • Watch the full clip. As students find bugs in the provided code, note what they look for first — the wrong block type, missing blocks, or the wrong order?
  • What strategies do they use to test whether a fix has worked? Connect this to how you test your own projects.
  • After watching, open your own project and conduct a deliberate test: try to break it in 3 different ways, then write down what you found and how you fixed it.

🗣️ 3. After Viewing & Kaiako Move (Process & Apply)

Kaiako Move: Run the Bug Clinic from the printed Bug Clinic set (five scripted bugs with an answer key): pairs diagnose the symptom aloud before touching the blocks.

Immediate Task: Complete Section 9 of your Digital Tech Logbook: Bug Clinic Diagnostic Log & Peer Review Sheet.

⚡ Whakaoho | Do Now: Someone Else's Code (10 mins)

Swap seats with your partner and open their Lesson 7 game. Play it once. You are not allowed to fix anything yet — write down one thing that behaved unexpectedly. That list is today's raw material.

📖 Activity 1: Bug Clinic — Diagnose Before You Fix (25 mins)

Each pair takes one card from the Bug Clinic set. Every card shows a short script with one deliberate bug: a loop that never ends, a variable reset at the wrong moment, a broadcast nobody receives, a condition that can never be true, an answer that is never stored. Predict the symptom out loud before you run anything, fix the bug in a copied project, then write the one-sentence rule the bug teaches — for example, "reset variables where the game starts, not where it ends". Finish your logbook Section 9 with the clinic bug and one real bug of your own.

📝 Activity 2: Digital Tech Logbook & Code Reflection (20 mins)

Draft your formal Digital Tech Logbook entry for Lesson 9. Apply exact programming vocabulary (e.g., bug, symptom, diagnosis, test, fix, review) to explain your code decisions.

🏫 Kaiako Planning & Pedagogy Notes

Year 7 Curriculum Alignment: Systematic debugging and peer code reviews (NZC Technology; Te Mātaiaho Phase 3) — diagnosis before repair, and review feedback that names the code, not the coder.