Use a Peanut Butter & Jelly Sandwich to Introduce Coding to Your Kid

Use a Peanut Butter & Jelly Sandwich to Introduce Coding to Your Kid

Categorized under: kids home coding exercises

When you provide a computer with a set of instructions (lines of code) to execute, the machine does not have the ability to interpret context or ask questions to gain additional clarity like we humans do; the computer simply does exactly what it is told. To illustrate this concept, we are going to have your child (programmer) write down the instructions to make-a-sandwich and the parent (computer) will execute the instructions.

Let’s get started…..

Step 1: Child (1 minute) – Pick the type of sandwich (Example: Peanut Butter & Jelly or Grilled Cheese) you would like your parent to prepare.

Step 2: Child (1 minute) - Give your sandwich recipe a name (Example: Mike’s World Famous PB&J Sandwich).

Step 3: Child (5 minutes) - Write down the exact steps (recipe), in detail, your parent will need to follow in order to make the perfect sandwich. Include all ingredients, materials & utensils that will be needed. DO NOT skip any steps.

Step 4: Child (2 minutes) - Review the steps to ensure that if your parent follows the recipe exactly, they will be able to make the sandwich.

Step 5: Parent/Child (5 minutes) - Provide the recipe to your parent and have him/her make the sandwich.  You can not interpret the recipe steps or assume that your child meant for you to do things a certain way. You must literally follow the steps exactly as written. (Example: Unless the recipe specifically tells you to un-wrap the cheese slice, you must place the wrapped cheese slice on the sandwich).

Step 6: Recap (2 minutes) - Once the sandwich is complete, briefly discuss the output with your child using the following questions as a guide:

  • Did you prepare the sandwich as your child expected?
  • Were there any areas where your literal interpretation created preparation challenges?
  • What surprised you about watching your parent follow your recipe?
  • What would you have changed about your instructions to make the recipe easier to follow for your parent?

About the Author: Omowale Casselle is the Co-Founder & CEO of Digital Adventures.