So, your kid has decided to have a go at coding. They're doing well, having fun, making good stuff happen. Then the dreaded question is uttered. "Why doesn't it work?"
Adults who have never coded can still help in these situations. Remember; Computer programs are just a set of instructions.
It's a good idea to use the first rule of problem solving; start with the most simple solution!
Turn it off and turn it back on again
The old adage of IT staff using the cure-all "turn it off and turn it back on again" still rings true.
Press the red stop button and press the green flag to restart it.
A lot of stuff tends to happen on "When green flag clicked". After doing a few edits it can be hard to remember that you have to actually click it! I see a lot of kids get caught out with this one.
Doing too many things, too quickly
This one usually crops up on things like costume or backdrop changes.
The costumes change, and change back again so quickly the human eye doesn't see it, usually a wait block cures these problems.
If variable are being used, it's good to check to see if the variable is being over written in an unexpected part of the script.
Is it logical?
This one can be tricky to figure out with kids. First you need to know what they would like the program to do.
Help your child think about what the program needs to know in order for that to happen.
Ask a few questions about their project.
People quite often assume that computers know stuff that they don't.
Read the code aloud
Sometimes saying a problem out loud makes it clearer.
Read aloud, everything that is happening, step by step. Often, you will see a lightbulb moment on your child's face. Use terms that help describe what is happening over time. For example:
"When you press the space key the character moves from here to here, then it changes costume from a to b."
Draw a flow chart
If a program has become complex, and debugging is starting to become tense, grab a pen and paper! Just draw it out, simple boxes and arrows that show each step of the program.
If you think there is a big design issue, cut out squares of paper for each step so that they can be easily rearranged.
In real life we use a visual representation of code all the time when designing, refactoring, or problem solving. It helps people communicate ideas and is a great skill to develop.
I hope that these hints and tips will help parents get involved with coding projects!
It's always fun to enjoy hobbies with your kids and they will think you are great, for being interested and useful.
Many thanks for reading!