What Programming Teaches About Problem Solving

Pexels. Protected under Creative Commons CC0. ">Rubik's Cube - Problem Solving - Photo from Pixabay.com - Author Pexels

Problems are rarely solved on the first try. The more complicated they become, the more trial and error takes place. Programming teaches kids that problem solving is a process not a destination. It’s a life skill that can carry over to any future profession or simply dealing with life’s challenges.

Debug code, debug life

Rubik's Cube - Problem Solving - Photo from Pixabay.com - Author Pexels

Image Credit: Pexels. Protected under Creative Commons CC0.

A valuable process computer programmers learn is debugging. It’s an iterative process through your program to learn what it’s doing and find where issues may lie. It’s really a glorified name for trial and error.

Teaching kids how to debug early on sets them up for the more complicated challenges computer programming and life can present. Is your game character not interacting with an object they way you want? Do the numbers not add up? Or does the whole thing freeze?

Debugging code teaches young programmers it’s okay not to succeed on the first or 50th try. What’s important is through each iteration of your process you get closer to the goal. They learn to not fear mistakes.

Solving complicated problems

Solving any complicated problem is rarely done through a straight line. Complicated problems require solving one problem and then the next. Complicated computer programs involve multiple variables, objects, and other moving parts to produce a final result. Sometimes those moving parts will require you to fix something small to get the big result.

Teaching loops in computer programming allows us to bring these principles to our students. We help students manually work through the entire process of the problem. It produces more lines of code, and it helps them see a pattern and see how the pattern solves little problems along the way. Finally, they can translate the pattern into a loop which accomplishes the same goal in less lines of code. Many times they include some form of debugging somewhere in the middle.

Kids get problem solving

The most exciting part of teaching our students problem solving through computer programming is watching that “aha!” moment. When they start asking, “What if?” we start seeing creative outcomes from their work.

I can’t help but wonder what other problems they’ll solve in the future once they learn the process and never fear making mistakes.