MyLeoNes™

Fixing mistakes — Computing, 4–6 years

When a set of instructions fails, we can test the steps and change the part that went wrong.

Find and fix

Debugging means looking for the part of a plan that did not work, then changing it. We can test the plan again after the change. It is careful detective work, not a sign that thinking has failed.

Why test again?

A plan can look right in our heads but behave differently when we try it. Testing shows the exact moment where the result changes. This solves the problem of guessing which part needs fixing.

The robot hits the wall

We tell a robot: forward, forward, forward, but the wall is after two squares. We watch and see the third move causes the bump. We remove that move and test again; the robot stops safely.

Changing everything

When something goes wrong, it is tempting to change every instruction at once. Then we cannot tell which change helped. This is reasonable because we want a quick fix; changing one small part gives clearer evidence.

Debugging daily plans

We debug when a tower falls, a puzzle route fails, or a lunchbox is packed without a spoon. We notice what happened, change one step, and try again. The same habit helps people make reliable machines and programs.

Keep exploring

Other languages

Loading MyLeoNes™…