If your child would happily play games all Saturday morning, here is an idea for the next two weeks before Halloween: trade a little of that game time for making a game. Not a big one. A 30-second Halloween dodge game in Scratch is enough to show what coding really teaches.
The honest answer
Coding won't turn game time into homework, and it won't make a kid a pro overnight. What it does change is this: kids move from playing by the rules to writing the rules, and then testing whether those rules are fair.
The game: a cat, some spiders, and 3 lives
Picture a simple Scratch game. A cat runs down a spooky hallway, spiders crawl across, and the player starts with 3 lives. The round lasts 30 seconds.
Before anyone drags a single block, it helps to answer four questions:
- Goal: a 30-second dodge game with 3 lives, where each spider bump costs exactly one life.
- What to remember: how many lives are left (starting at 3), the 30-second timer, the score, and whether the cat is still touching a spider.
- Done when: 1 bump leaves 2 lives, 2 bumps leave 1, and 3 bumps end the game. Someone else plays a full round and it feels fair.
- Edge cases: two spiders at once still cost only one life, lives never drop below 0, and if the timer runs out on the last life, the game shows one message, not two.
What went wrong on the first try, and why
On the first test run, one spider bump wipes out all 3 lives. Game over in the first second.
The reason is simple arithmetic, not a broken computer:
- The game checks for a spider touch 30 times a second.
- One bump lasts about 0.1 seconds, so it gets noticed on 3 checks in a row.
- Every check takes a life. One bump, three checks, three lives gone.
The program did exactly what it was told. It just was not told the right thing. It was counting checks, when the rule the player cares about is bumps.
The fix: change one thing, then test again
Before fixing anything, write the answers on paper first: 1 bump should leave 2 lives, 2 bumps should leave 1, and 3 bumps should end the game.
Then change only one thing. Right after the "change lives by -1" block, add one block: "wait until not touching spider." Nothing else moves.
Test again from the start. 1 bump leaves 2, 2 bumps leave 1, 3 bumps end the game, matching the paper exactly. Now there is a rule you can say out loud: lives left = 3 − bumps. From here on, every time something changes, the whole game gets tested again from the start.
The same idea carries over when kids move to Python. A short loop can look at a list of checks, such as [0, 1, 1, 1, 0, 0, 1, 1, 1, 0], and count a bump only when "touching" switches on. That list has 6 touching checks but only 2 bumps, so the player ends with 1 life, not 0.
What kids learn from a 30-second game
This is computational thinking in everyday clothes, and each step maps onto a real thinking skill:
- Decomposition: a "fun game" becomes four plain questions: goal, what to remember, when it's done, and what could go wrong.
- Pattern recognition: 30 checks a second times 0.1 seconds is 3 checks. Spotting that pattern explains the bug, and "lives = 3 − bumps" describes the fixed game.
- Abstraction: the player only cares about bumps, not checks. Choosing the right thing to count is the whole fix.
- Algorithms and testing: predict on paper, play, compare, change one thing, and test again from the start. Then let someone else play to see whether it is fair.
The same habit shows up off the screen too: one turn each in a board game, one goal is one point (not three), and one press of the doorbell should ring once.
Later the path continues. Python is where kids write a loop that counts each bump once. JavaScript lets them build the same game in a browser, moving the cat with the arrow keys. C++ comes later, for contest problems and speed. Some of our class puzzles are inspired by CCC Junior; families who want to enter a contest register on their own, and CodeSky is not an official program of any contest.
Try it at home
Ask your child: what game would you want to build first? Then help them answer the four questions before they start. When something breaks, that is not failure. It is the next rule to fix.
If your child loves games and wants to start making them, come meet us. CodeSky runs after-school coding classes in Markham, from Scratch to Python, for elementary and middle school kids. Book a free trial class at 9833 Markham Rd Unit 2, Markham, ON L6E 0E5, or email info@codesky.ca.



