Computer Programming and ApplesauceSep 26, 2022
It’s Fall, and trees are fruiting, especially Apple trees! A favorite pastime during this season is making applesauce from the abundant apples found in orchards. Would you believe me if I told you making applesauce with your kids is the same as learning to code with your kids?
Algorithms and Recipes
A computer program is a set of instructions that a person creates in a programming language that computers and machines can understand and execute. These step-by-step instructions, called algorithms, must be clear and accurate for the computer to follow. This is exactly like cooking a recipe!
The Excalibur Solutions STEM Academy Content Library Jr. and Content Library use Scratch, a blocks-based coding language, to create computer programs with fun characters and scenes that do a variety of tasks. This fun interface is perfect for kids who are not yet reading and writing proficiently, and it allows them to learn the concepts of coding while creating stories, drawing pictures, or anything their imaginations can think of.
Steps to writing a computer program
When computer programmers set out to write a program, they first consider the problem they are trying to solve, or how they are going to make a task easier to complete. This initial step is where creativity and flexible thinking come in. From here, coders plan out solutions using a diagrams called flowcharts to help them understand the steps required to write the code.
In our applesauce example, this looks like “What should we do with all these apples? Let’s make applesauce!” From here, you’d make a list of the ingredients needed, gather supplies, and begin making the applesauce.
Programmers often come together in pairs or teams to write the code that the computer will read to execute the program. One coder will act as the “driver” and write the code while the other acts as a “navigator” and defines what the code should do. In this manner, coding relies heavily on the skill of collaboration.
Coding and cooking with kids
Anyone who has ever cooked with kids will know these roles well. While making the applesauce, you may assume the role of navigator while your child does the measuring, pouring, and cooking.
Once the code is written, programmers then run and test the code looking for any errors called bugs. This is a process called debugging. The term “debugging” comes from the initial days of computing when actual bugs, such as moths, got caught in the machinery of a computer.
Debugging the applesauce
In our applesauce example, “debugging” is the taste test. Did your recipe turn out like delicious sweet applesauce, does it need anything else, did you confuse the sugar for salt, are the apples too bitter, etc?
When you begin to look at the simplicity of learning to code and relate it to real-life examples, the oftentimes daunting task of programming a computer becomes more friendly and achievable.
Here is a Scratch program we wrote to show you how to make applesauce. We challenge you to remix the project in Scratch to add cinnamon to the given applesauce recipe!
Stay connected with news and updates!
Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.
We hate SPAM. We will never sell your information, for any reason.