< Course B (2021)

Lesson 5: Programming with Harvester

40 minutes

Overview

Students will apply the programming concepts that they have learned to the Harvester environment in this skill-building lesson. Students will continue to develop sequential algorithm skills and start using the debugging process.

Purpose

In this lesson, students will develop debugging skills and will continue developing their programming skills.

CSTA K-12 Computer Science Standards (2017)
    • 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
    • 1A-AP-11 - Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.

Agenda

Objectives

Students will be able to:
  • Identify and locate bugs in a program.
  • Translate movements into a series of commands.

Preparation

  • Play through the puzzles to find any potential problem areas for your class.
  • Make sure each student has a reflection journal.

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the students

Vocabulary

  • Algorithm - A list of steps to finish a task.
  • Bug - Part of a program that does not work correctly.
  • Debugging - Finding and fixing problems in an algorithm or program.
  • Persistence - Trying again and again, even when something is very hard.
  • Program - An algorithm that has been coded into something that can be run by a machine.
  • Programming - The art of creating a program.

Teaching Guide

Warm Up (5 minutes)

Introduction

Vocabulary

This lesson has three new and important vocabulary words:

  • Bug - Say it with me: Buhh-g.

Something that is going wrong. An error.

  • Debugging - Say it with me: Dee-bug-ing.

To find and fix errors.

  • Persistence - _Say it with me: Purr-siss-tense.

Not giving up. Persistence works best when you try things many different ways, many different times.

Debugging, Persistence, and Frustration

Discuss: Prepare students for today's online exercises by asking them what they would do if they thought they had a bug in their code. More specifically, what would they ask themselves?

  • Was everything in the first step right?
  • How about the second? Third?
  • Where did my program go wrong?
  • What does that tell me?

Prompt: Debugging can be frustrating! But persistence can help us get through it. What are some things we can do to persist through frustration?

Example responses:

  • Count to 10
  • Take deep breathsProg
  • Journal about bugs we've found
  • Talk to a partner about bugs
  • Ask for help

Transition: Let your students know that frustration is part of coding. Everyone gets bugs! It's okay if they think they have a bug but they can't find or fix it right away. Using strategies like those listed above can help them persist through frustration and solve any problem!

Main Activity (30 minutes)

Programming with Harvester

At this point, students should already be familiar with the programming environment. Some new things to look out for in this lesson are confusion about the debugging process or not remembering to use the pick corn block when the harvester reaches corn.

Teaching Tip

Show the students the right way to help classmates by:

  • Don't sit in their chair
  • Don't use their keyboard
  • Don't touch their mouse
  • Make sure the classmate can describe the solution before you walk away

Circulate: During online activities, the role of the teacher is primarily one of encouragement and support. In addition to the ideas listed in the last lesson, some more ideas on how to do this are:

  • Remind students to use the debugging process before you approach.
  • Have students describe the problem that they’re seeing. What is it supposed to do? What does it do? What does that tell you?
  • Remind frustrated students that frustration is a step on the path to learning, and that persistence will pay off.
  • If a student is still stuck after all of this, ask leading questions to get the student to spot an error on their own.

Transition: Have students grab their reflection journal and take a moment to review lessons for themselves.

Wrap Up (5 minutes)

Reflection

Prompts:

  • What was today’s lesson about?
  • Draw a face that shows how you felt about today's lesson in the corner of your journal page.
  • Draw a time you found a bug in your code.
Creative Commons License (CC BY-NC-SA 4.0).

This work is available under a Creative Commons License (CC BY-NC-SA 4.0).

If you are interested in licensing Code.org materials for commercial purposes contact us.