Command the Coder — Step-by-Step & Find the Bug
Screen-free “coding”: the child gives a precise sequence of simple commands — step, step, turn — to move a “player” (a toy, a willing grown-up, or themselves) across a floor grid to reach the treasure. Then they run the whole sequence, watch where it goes wrong, hunt down the bug (the wrong or missing step), and fix it. The thinking skills are sequencing, being precise, and debugging — the same logic as computer programming, with zero screens.
- Make a simple grid and a goal. Tape a few squares on the floor (or use floor tiles, or squares drawn on paper for a toy). Put the “treasure” on one square.
- Agree on the commands. Keep it tiny: “step forward,” “turn.” Use arrow cards or just say them. Forward-only at first.
- The child gives the whole plan first. “Step, step, step.” Then RUN it — the player does exactly and only what was said, deadpan. An extra step marches comically into the wall.
- Find the bug together. “Where did we want to land? Where did we land? Which step should change?” Let the child locate and fix the wrong step — that’s the heart of it.
- Re-run the fixed plan. Success = the player reaches the treasure. Cheer the debugging, not just the arrival.
- Grow it by one step. Add a turn, an obstacle to go around, or a second treasure — one new challenge at a time.
Variation: the child debugs a plan YOU made wrong on purpose; the child IS the player and a sibling commands them; introduce a simple “loop” (“do ‘step’ twice”). For turns, use a landmark (“turn toward the window”) instead of abstract left and right, which is genuinely hard at 5.
Requirements
- Space: A small clear floor area for a grid, or a tabletop with a paper grid for a toy
- Surface: Flat floor (tape squares flat, no curling edges) or a sheet of paper with drawn squares
- Materials: Masking tape, floor tiles, or paper for the grid; a toy or person as the "player"; optional arrow cards (sticky notes work) and a small "treasure"
- Participants: 1 adult + 1 child; a third person can be the "player"
- Supervision: Light; active if the child is the player walking the grid (clear the area, walk don't run)
Rationale & Objective
Sequencing — putting discrete steps in the right order — is the developmental core here, and it’s trainable at this age: Kazakoff, Sullivan & Bers (2013, “The effect of a classroom-based intensive robotics and programming workshop on sequencing ability in early childhood,” Early Childhood Education Journal, 41, 245–255) found 4.5–6.5-year-olds made significant gains in sequencing after a one-week programming workshop. Bers, Flannery, Kazakoff & Sullivan (2014, “Computational thinking and tinkering,” Computers & Education, 72, 145–157) showed kindergartners can grasp powerful computer-science ideas — including algorithms and debugging — through hands-on, tinkering-based play, with debugging framed as iterative troubleshooting of one’s own solution (see also Bers, 2019, on debugging as one of the developmentally appropriate “powerful ideas” of early CS). The “run it → find the bug → fix it” loop is essentially executive-function practice: Arfé, Vardanega, Montuori & Lavanga (2019, “Coding in primary grades boosts children’s executive functions,” Frontiers in Psychology, 10, 2713) found 5–6-year-olds who did short coding sessions outperformed controls on planning and inhibition. Honest framing — most of this evidence shows near transfer (better sequencing, on-task EF gains on lab measures), not guaranteed far transfer to general problem-solving or math, and young children’s gains depend heavily on adult scaffolding and concrete, tangible tools, so keep it embodied. Note one real limit: left and right relative to a facing toy is genuinely hard — children answer from their own viewpoint, and reliable right/left plus mental rotation isn’t mastered for years (Rigal, 1996, Perceptual and Motor Skills, 83, 831–842) — so favor landmarks and forward-only paths early.
Progress Indicators
- Early: with the adult, gives 2–3 forward steps to reach a goal in a straight line and counts tiles one at a time; runs it by physically moving; doesn’t yet spot errors — says “it’s wrong” but not which step; turns aren’t used yet
- Developing: builds a 3–5 step path with ONE turn and runs the whole sequence before fixing; finds a deliberately planted single bug when prompted to compare where the player landed vs. the goal, and fixes that step
- Proficient: independently composes a path with two or more turns, runs it, self-detects the bug by checking the landing square against the goal, and fixes it with little help; begins to “play computer,” predicting where the player will end up
- Advanced: plans the whole sequence and predicts the outcome before running, debugs longer or branching paths and even someone else’s plan, and uses a simple repeat or “loop” idea (“do this part twice”)
Safety Notes
- Minimal physical risk — if the CHILD is the player on a floor grid, tape tiles flat with no curling edges, keep the area clear, and walk rather than run the steps
- The main risk is frustration when the sequence fails — frame the bug as expected and fun (“Found the bug! That’s what coders do”), never as the child being wrong; a failed run is success, because debugging IS the activity
- Keep it screen-free — that’s the point; resist “upgrading” it to a tablet app to make it easier
- Adapt — if left/right turns cause distress, drop to forward-only or landmark turns; if a child fixates on one failed path, shorten it or switch to a fresh goal; do it together one step at a time for a child who can’t yet hold a sequence
Hints
- Playfulness: make the child the “coder boss” and the adult-as-player a literal robot who does EXACTLY and only what’s commanded, deadpan — so an extra step marches solemnly into the wall (the bug is the joke)
- Sustain interest: rotate goals, grid layouts, and who plays (toy → sibling → adult → the child), and add one new element a week — a turn, an obstacle, a second treasure, a loop — so it grows instead of repeating; let the child design the grid
- Common mistake: making sequences too long or turn-heavy too soon (working-memory overload and meltdown) — start at 2–3 forward steps; and don’t silently fix the bug yourself — ask “where did we want to land? where did we land?” and let the child correct it
- Limited space: no grid needed — use kitchen or hallway floor tiles, or just say “walk me to the fridge one step at a time”; move a toy across a hand-drawn paper grid; arrow “cards” can be scribbled on sticky notes or simply spoken
- Cross-domain: links to early math (counting steps, one-to-one correspondence, position words), executive function (planning, holding a sequence, not fixing mid-run), language (clear, precise instructions), and spatial/map sense
- Progression: 2–3 step straight path → add ONE turn (with a landmark, not abstract left/right) → child debugs an adult’s deliberately wrong plan → longer multi-turn paths and routing around an obstacle → child composes the whole sequence with arrow cards and predicts the outcome → add a simple “loop” and debug someone else’s plan
Sources
- Kazakoff, E. R., Sullivan, A. & Bers, M. U. (2013). “The effect of a classroom-based intensive robotics and programming workshop on sequencing ability in early childhood.” Early Childhood Education Journal, 41(4), 245–255
- Bers, M. U., Flannery, L., Kazakoff, E. R. & Sullivan, A. (2014). “Computational thinking and tinkering: Exploration of an early childhood robotics curriculum.” Computers & Education, 72, 145–157
- Bers, M. U. (2019). “Computer science education in early childhood: The case of ScratchJr.” Journal of Information Technology Education: Innovations in Practice, 18, 113–138
- Bers, M. U. (2018). Coding as a Playground: Programming and Computational Thinking in the Early Childhood Classroom. Routledge
- Arfé, B., Vardanega, T., Montuori, C. & Lavanga, M. (2019). “Coding in primary grades boosts children’s executive functions.” Frontiers in Psychology, 10, 2713
- Rigal, R. (1996). “Right-left orientation, mental rotation, and perspective-taking.” Perceptual and Motor Skills, 83(3), 831–842
- Head Start ELOF — Cognition: Reasoning and Problem-Solving (sequencing; trying and revising solutions)
- UK EYFS — Mathematics (pattern and sequence) and Characteristics of Effective Learning (creating and thinking critically)
- Piaget — Preoperational Stage (egocentric viewpoint explains the left/right-of-a-facing-toy difficulty)
- HighScope — plan-do-review maps onto compose → run → debug
- Montessori — control of error (the player landing on the wrong square reveals the mistake itself)
- Gardner — Logical-Mathematical intelligence (with bodily-kinesthetic and spatial)