5

Course 1 | Lesson 5

Maze: Debugging


Lesson time: 30 Minutes

Lesson Overview

Debugging is an essential element of learning to program. In this lesson, students will encounter puzzles that have been solved incorrectly. They will need to step through the existing code to identify errors, including missing blocks, extra blocks, and misordered blocks.

Teaching Summary

Getting Started

Introduction

Activity: Maze Debugging

Maze: Debugging

Extended Learning

Extension Activities

Lesson Objectives

Students will:

  • Predict where a program will fail
  • Modify an existing program to solve errors
  • Identify an algorithm that is unsuccessful when the steps are out of order

Getting Started

Introduction

Ask students about problems they solve in everyday life.

  • How do you fix something that isn't working?
  • Do you follow a specific series of steps?
  • The puzzles in this unit have already been solved for you (yay!), but they don't seem to be working (boo!)
  • We call the problems in these programs "bugs," and it will be your job to "debug" them.

Activity

Maze: Debugging

As your students work through the puzzles, observe how they search for bugs. Identify different strategies used and ask students to share with the whole class. This helps students to recognize that there are many ways to approach these problems.

Extended Learning

Use these activities to enhance student learning. They can be used as outside of class activities or other enrichment.

Planting bugs

Have students go back through previous levels, purposefully adding bugs to their solutions. They can then ask other students to debug their work. This can also be done with paper puzzles.

Connections and Background Information

PARCC / Smarter Balanced Assessment Skills

  • Click / tap
  • Drag and drop
  • Select object
  • Use video player

ISTE Standards (formerly NETS)

  • 1.a - Apply existing knowledge to generate new ideas, products, or processes.
  • 1.c - Use models and simulation to explore complex systems and issues.
  • 4.b - Plan and manage activities to develop a solution or complete a project.
  • 6.a - Understand and use technology systems.
  • 6.c - Troubleshoot systems and applications.
  • 6.d - Transfer current knowledge to learning of new technologies.

CSTA K-12 Computer Science Standards

  • CT.L1:3-01. Use technology resources (e.g., puzzles, logical thinking programs) to solve age appropriate problems.
  • CL.L1:3-02. Work cooperatively and collaboratively with peers teachers, and others using technology.
  • CPP.L1:6-05. Construct a program as a set of step-by-step instructions to be acted out.
  • CPP.L1:6-06. Implement problem solutions using a block-based visual programming language.
  • CT.L2-01. Use the basic steps in algorithmic problem solving to design solutions.
  • CT.L2-06. Describe and analyze a sequence of instructions being followed.
  • CT.L2-08. Use visual representations of problem states, structures, and data.
  • CT.L2-12. Use abstraction to decompose a problem into sub problems.

Next-Gen Science Standards

  • K-2-ETS1-1. Ask questions, make observations, and gather information about a situation people want to change to define a simple problem that can be solved through the development of a new or improved object or tool.

Common Core Mathematical Practices

  • 1. Make sense of problems and persevere in solving them.
  • 2. Reason abstractly and quantitatively.
  • 5. Use appropriate tools strategically.
  • 6. Attend to precision.
  • 7. Look for and make use of structure.
  • 8. Look for and express regularity in repeated reasoning.

Common Core Math Standards

  • K.CC.B.4 - Understand the relationship between numbers and quantities; connect counting to cardinality.
  • K.OA.A.3 - Decompose numbers less than or equal to 10 into pairs in more than one way, e.g., by using objects or drawings, and record each decomposition by a drawing or equation (e.g., 5 = 2 + 3 and 5 = 4 + 1).
  • K.OA.A.5 - Fluently add and subtract within 5.
  • 1.OA.A.1 - Use addition and subtraction within 20 to solve word problems involving situations of adding to, taking from, putting together, taking apart, and comparing, with unknowns in all positions, e.g., by using objects, drawings, and equations with a symbol for the unknown number to represent the problem.
  • 2.OA.A.1 - Use addition and subtraction within 100 to solve one- and two-step word problems involving situations of adding to, taking from, putting together, taking apart, and comparing, with unknowns in all positions, e.g., by using drawings and equations with a symbol for the unknown number to represent the problem.
  • 2.G.A.2 - Partition a rectangle into rows and columns of same-size squares and count to find the total number of them.

Common Core Language Arts Standards

  • SL.K.1 - Participate in collaborative conversations with diverse partners about kindergarten topics and texts with peers and adults in small and larger groups.
  • L.K.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts.
  • SL.1.1 - Participate in collaborative conversations with diverse partners about grade 1 topics and texts with peers and adults in small and larger groups.
  • L.1.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using frequently occurring conjunctions to signal simple relationships.
  • SL.2.1 - Participate in collaborative conversations with diverse partners about grade 2 topics and texts with peers and adults in small and larger groups.
  • L.2.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using adjectives and adverbs to describe.