Intro to Programming - Lesson 8: Designing an App Part 3

Overview

Students learn about Pair Programming by watching a video and then practicing it themselves while working on their project apps. At this stage, students are adding their first lines of code to make their app interactive using debugging skills from the previous lesson.

Goals

Students will be able to:

  • Effectively use pair programming while designing the features of an app
  • Create the code and user interface of an app based on a program specification

Purpose

Pair Programming is an effective collaboration strategy both inside the classroom and in professional settings. As this is the first opportunity students have to program starting from a blank screen, this is a good opportunity to explore the usefulness of Pair Programming.

Resources

For the students

Getting Started (5 minutes)

Important context for teachers: Students will continue to work on adding behavior and code to their app in following lessons, specifically Lessons 9 and 10. We recommend you take a look at Lessons 9 and 10 as well when you are preparing for this lesson to get an idea of where students should be at the end of this lesson and what tasks and activities take place during future lessons.

What makes a good partner?

Prompt: What makes a good partner?

Discussion Goal

Make this a quick discussion and just aim to get a few ideas from around the room. For example, a good partner...

  • listens
  • contributes
  • shares the work evenly
  • and so on...

Remarks

  • Now you've got the skills you'll need for your project, but we'll need a minute to talk about how to use them when working in teams. Today you're mostly going to have work time, but you're going to be practicing a new skill called pair programming.

Activity (35 minutes)

Group: Place students in pairs with their project partner

Teaching Tip

Taking on the Blank Screen: This is the first time students are adding interactive code without an existing base to build from. Some students may need assistance. Direct them back to their Planning Guides to help students understand the events they need to code in their project.

Supporting Pair Programming: Your biggest role in supporting pair programming will be encouraging students to use it early on and helping enforce the switching. Run the timer in the slides and have left and right partners switch roles. You may opt to increase the time to longer periods as time goes on.

Debugging Practices: Students learned a lot of debugging practices in the previous lesson. Encourage students to use these and record bugs they find as they program today. Continue to normalize and celebrate debugging as a normal and fun part of programming.

Do This: List all of the Event Handlers in their programs. They should be able to determine these based on the Program Specification they designed. Include the element ID, action, and explain what happens.

Display: Play the Pair Programming video. Then, review the two roles in pair programming:

  • The Driver manipulates the keyboard and the mouse.
  • The Navigator keeps track of the big picture and guides towards the goal.

Remarks

  • Today we're going to use the pair programming as you work on your app with your partner. To begin we'll make the partner sitting on the left the driver and the one on the right the navigator. Every few minutes I'll ask you to switch roles.

Project: Students work on their projects. Remind them of the requirements for the app:

  • Uses at least three pages
  • Includes examples of images, audio, and text
  • A clear and easy to navigate user interface
  • Clearly communicates information about your topic
  • Code is cleanly written and free of errors

Circulate: Give students time to work on their project. As they do so circulate the room encouraging them to use debugging practices they've learned in previous lessons. Every few minutes ask left and right partners to switch being drivers and navigators.

Wrap up (5 Minutes)

Discuss: How does Pair Programming help when working on a project? How does it help with the debugging process in particular?

Discussion Goal

Use this prompt to reinforce not only the value of pair programming and collaboration while programming, but also to remind students of debugging practices they learned in the previous lesson. Possible answers include:

  • Talking through my code with another person helps me figure out what to do
  • When I get stuck, there's someone there to help brainstorm a solution
  • There's more than one set of eyes to find bugs
  • Different partners bring different perspectives to a project

Journal

Have students add "Pair Programming" to their journals.

  • Pair Programming: a collaborative programming style in which two programmers switch between the roles of writing code and tracking or planning high level progress

Standards Alignment

  • CSTA K-12 Computer Science Standards (2017): 3A-AP-16, 3A-AP-19, 3A-AP-21, 3A-AP-22, 3A-AP-23
  • CSTA K-12 Computer Science Standards (2021): CRD-1.B.2

Next Tutorial

In the next tutorial, we will discuss Code.Org Unit 3 Lesson 9, which describes Learn about Loops and Random Numbers.