Skip to content
PlayOwl

Coding · Grade 8

Testing, Debugging and Secure Design

Learners make the garden app trustworthy: they design thorough unit tests that cover normal, edge and invalid inputs and every branch, debug systematically with tracebacks, minimal failing examples and assertions, and apply secure design principles (input validation, least privilege, safe defaults, failing securely, careful error messages). They finish by seeing why passwords are stored as hashes and why data must be kept separate from commands.

  • 4 lessons
  • About 90 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, trace code, highlight a text, match pairs, put in order and sort into groups
See plans Included with Family, Teacher and School plans. Open in PlayOwl

What learners will discover

  • Design unit tests that cover normal, edge and invalid inputs and every branch, and judge how thorough a suite is.
  • Debug systematically using tracebacks, minimal failing examples, assertions and regression tests.
  • Apply secure design principles: validate untrusted input, least privilege, safe defaults, fail securely and avoid leaking information.
  • Explain why passwords are stored as salted hashes and why user data must be kept separate from commands.

Lessons

  1. Thorough unit tests 5 steps2 practiceabout 22 min
  2. Debugging systematically 5 steps3 practiceabout 20 min
  3. Secure design principles 5 steps3 practiceabout 20 min
  4. Protecting passwords and commands 5 steps3 practiceabout 18 min
  5. Check what you learned 8 questions at the end

Keep exploring

Games to practice with

More 8th grade coding

Guide for grown-ups