Programming Each Other

Students explore complex programming concepts by systematizing simple activities.

Core concepts include computational thinking, conditional statements, looping, error handling, and variables.

The comic book, The STEM Sagas: Virtually Rerouted, brings the challenge concepts to life while supporting the idea of collaborative problem-solving with a cast of diverse characters and exciting adventure.

Lesson Plan Overview: Suggested 11 lessons over 15 days

Lesson 1: Introducing the Challenge (45 min) — Students receive a letter from CodeWorks Publishing, a company that is writing a book to teach young children about programming. Students are asked to learn more about programming and to write sample “absent-minded” and corresponding well-thought-out programs to be included at the end of their book.

Lesson 2: Writing Instructions (45 min) — Students explore the everyday challenge of sorting same-colored socks into pairs. They start by breaking down the simplest form of the task—using a fixed number of identical socks—into component steps. In teams, they write instructions for a robot to sort a pile of socks, test their instructions, and share them with the class. They discuss how their instructions could be misinterpreted and think about ways to correct those misinterpretations.

Lesson 3: Looping Loops (45 min) Students review their instructions from the previous session and apply what they learned to a more challenging problem: writing a program for a robot to sort and pair a large (or even unspecified) number of socks. The goal of this activity is to introduce the concept of loops in programming. Students then write a program to explain how to perform a more complex task (such as performing a dance or making s’mores) so other students can follow them.

Lesson 4: If … Then … What? (45-90 min) — Students begin to incorporate decision-making within programs. They revisit the sock-sorting-and-folding challenge, where their robot must decide whether two socks are a match and what to do if they are not. Students practice developing an algorithm that includes decision-making by creating a “guess my number” program.

Lesson 5: Making a Decision (45-90 min)- Students extend their understanding of conditionals to include both if-then-else statements and nested-if statements. They apply their new understanding by updating their algorithms to sort a pile of socks that now includes more than one color. As a class, they discuss different strategies for how to tackle the problem, and update their program using conditionals and loops to complete the task in the optimal way.

Lesson 6: Data Inputs and Outputs (45-90 min) Students formalize some concepts they worked with in the previous activities but have not yet put names to, including variable, input, output, data, and database. After choosing one of three activities, they write a program that includes input, output, and at least one variable.

Lesson 7: Breaking Down the Problem (45-90 min) — Students on breaking down a larger problem into smaller subtasks. They explore several options for how to break down a task and discuss how each strategy is different and under which conditions one algorithm may be more efficient than another.

Lesson 8: Programming Our Absent-Minded Task (45 min) — Students choose their programming tasks for the final CodeWorks challenge and begin to decompose the tasks. They begin to develop their absent-minded programs by combining the various bugs (errors in computer programs that lead to incorrect or unexpected results) that they’ve experienced in previous activities.

Lesson 9: Making Our Program Work (45 min)  Students develop a well-thought-out program to accompany the absent-minded program they developed in Activity 8. They debug their absent-minded programs by looking for places where their code is imprecise or inefficient, and then try to create the best possible programs for their tasks.

Lesson 10: Preparing Our Presentations (45 min)  Teams develop presentations for the two programs they created. Students are reminded how their work will be assessed.

Lesson 11: Presenting Our Projects (45-90 min)  Each team first presents its absent-minded program, complete with an explanation of how the program can go wrong, and then the companion program, with an explanation of why this program will complete the task correctly and efficiently. Students reflect on how their understanding of programming has grown since they began the challenge.

Display on Website


Legos (assorted)




Drawstring Bag 


Assorted Socks


Wooden Skewers


Cotton Balls


Laminated If-Then-Else Cards


Foam Graham Crackers


Foam Chocolate Bars


Laminated Campfire Picture


Team Portfolio


Science Notebook


Downloadable Curriculum and Supporting Files


PEO Activity / Section

Supporting Materials

Kit Materials 

This kit provides materials for an average class size of 32 students working in teams of four.

Activity 1 Preparation; Steps 5-6

Exact Instructions Challenge | How to Make a Perfect Sandwich
In this video (22:55), two young girls in England try to write instructions for their parents to make a ham sandwich. Their mother, who speaks Spanish, translates the instructions into Spanish. The first daughter’s instructions (0:00–3:24) do not result in an edible sandwich. The parents then try the second daughter’s instructions (3:25–6:36), which also do not work. After reworking her directions, Daughter 1’s second try is again a failure (6:37–11:32). Daughter 2’s second try (11:33–15:44) is a success.

Exact Instructions Challenge | Ramen Edition
In this video (8:05), two children write instructions for their father describing how to prepare ramen noodles. In the first segment, the younger child creates two sets of instructions that the father cannot follow correctly (0:50–2:40). In the second part, the father follows the older child’s instructions (2:41–3:56). The younger child then fails again (3:57–4:38). Finally, the group follows instructions sent to them by others.

Exact Instructions Challenge | The Holderness Family
The two children in this family write instructions for tooth-brushing and making toast. The first child’s instructions for brushing teeth do not work (0:55–2:08). The second child’s instructions for making toast (2:09–3:59) also fail. The second child then gives instructions to her mother for brushing her teeth (3:59–5:09). In the last segment, the mother follows the younger child’s instructions for making toast (5:10–5:44).

NOTE: Some of the suggested video segments include instructions for two tasks. You may want to show a portion of those videos depicting only one task, or have students concentrate on just one task when they write instructions later in the activity.

Activity 1, Step 18

What Do Programmers Actually Do?

Activity 2, Preparation and Unplugged Extension

The Easiest Card Trick for Beginners—You Can’t Screw Up!
The trick in this video is intended to be done with two people: the magician and a volunteer from the audience. At about 0:24, the presenter of the video is playing the role of the volunteer. Some students may be confused as to when the presenter is the magician and when he is the volunteer.

For an added challenge, play the video for students without sound.

Make sure to show it at least twice so students have time to write down everything they see

Activity 2, Tech Extensions

Have students try the Basic challenges (Level 1), in which they use command blocks to move around a series of blocks. Note: There are also downloadable versions of this app.

Blockly Games: Maze
Have students try the first two puzzles in the Maze. Programming commands are presented in Blockly the same way that commands are presented in Scratch. Star Wars: Building a Galaxy with Code Blocks
Have students watch the introductory video (2:39), which presents the programming challenge, and then try Puzzles 1–6, which allow them to explore the basic commands available to them (move up, move down, move left, move right). Puzzles 4–6 begin to introduce JavaScript text programming (the language that underlies this app); thus, these puzzles might be more suitable for older students.

Activity 3, Preparation

Box Step Tutorial

Easy Line Dance Tutorial

Hip Hop Dance Moves Tutorial

Activity 3, Step 12, What to Watch For

Row Your Boat with Rounds

Top 5 Rounds/Cannons

Activity 3, Tech Extensions Hour of Code—Mark Zuckerburg Teaches Loops
In this video, Facebook founder Mark Zuckerberg describes how loops improve programming efficiency. Lesson 13: Maze Loops
In this series of challenges, students explore looping using Angry Birds characters and directional blocks. Lesson 14: Bee Loops
Students work with looping while trying to move a cartoon bee to get nectar and make honey. Lesson 13: Maze Loops offers a similar challenge.)

Have students try the Loops challenges (Level 3), in which they move around a series of blocks using command blocks. In this level, they can create a process (PROC1) that can be run over and over in the main program. Note: There are also downloadable versions of the app.

Blockly Games: Maze
Have students try Puzzles 3–5 in the Maze. Programming commands are presented in Blockly the same way that commands are presented in Scratch. Puzzle 3 introduces a “repeat until” block. Dance Party
Students can use to create their own online dance programs.

Activity 4, Tech Extensions Hour of Code—Bill Gates Explains If Statements
Bill Gates uses clear examples to illustrate “if” statements. Lesson 11: Conditionals in Bee
In this series of challenges, students explore conditionals while moving a bee around to find nectar.
   NOTE: To find similar lessons at, search for “ bee conditionals.”

Blockly Games: Maze
Have students try Puzzles 6–10 in the Maze. Programming commands are presented in Blockly the same way that commands are presented in Scratch. Puzzle 6 introduces an “if path . . . do” block.

Activity 4, Background, Sorting

Bubble Sorts
This site offers videos and helpful explanations of bubble sorts.

LEGO Bubble Sort
This video of LEGO towers and LEGO people shows a bubble sort in a very understandable way for young children.

Insertion Sort, Kahn Academy
Using a card game as an example, this site offers step-by-step instructions and a simulation on how to do an insertion sort.

Visualization and Comparison of Sorting Algorithms
This wordless video, best for use with older children, provides a visual representation of various sorting algorithms, demonstrating the speed that they are able to achieve. The sorting algorithms include selection sort, shell sort, insertion sort, merge sort, quick sort, heap sort, bubble sort, comb sort, and cocktail sort.

Activity 5, Tech Extension Coding: Conditionals provides educational hip-hop videos that explore standards-based skills and content. Show students the Coding: Conditionals video, which explores conditionals in programming.

Activity 9, Tech Extensions Lesson 5: Maze: Debugging
In this series of challenges, students explore debugging while moving Angry Birds around the screen.

This application teaches computer programming concepts through debugging puzzles. In the game, Gidget the robot was damaged on its way to clean up a chemical spill and save the animals. Players are asked to fix the malfunctioning code to allow Gidget to function properly.
NOTE: The Gidget application may be more suitable for older students.