SPIKE™ Prime with Python

Pair Programming

Students learn why it is important to have roles when programming together.

45 min
Beginner
Years 7-9 OR Key Stage 3

Prepare

Check to make sure SPIKE Prime hubs are charged, especially if connecting through Bluetooth.

1. Engage

Ignite a discussion with students. Ask students to imagine they are riding in a car with 4 people. Discuss what the roles of each person in the car would be. While students might identify some fun roles the people in the backseat have, hopefully they identify that at least one person in the front seat as the driver. If students do not recognize that someone should navigate (even if just following the app), prompt them with questions to identify this role.

Focus on the roles of the driver and navigator. Ask students what roles do the driver and navigator have?

2. Explore

Explore with students the roles of driver and navigator when working together to program.

Discuss that pair programming is more than just two people working on the same project. In Pair Programming, each partner will have a role to play. Review these roles together as a group.

  • A “driver” is thinking about the programming needed and using the computer to type in the code.
  • A “navigator” helps direct the driver, making sure all the code is correctly written – the ports are correct, the operators are precise, and so forth.

Have each team member take a role to practice working together.

Ask students to create an image on their hub. Students can view Light Matrix – Actions – show_image() in the Knowledge Base to see all the preloaded images.

  • Ask Partner 1 work as the “driver”.
  • Partner 2 should work as the “navigator.” Choose his/her favorite image.
  • Partner 1 should type the program to display the image chosen by Partner 2.
  • Partner 2 verifies the programming as it is typed and before the program is tested.

Have students hold up the hubs to share the images with the class.
Have students switch roles and then complete the same activity.

Each student should obtain one sticky note.

  • Have each person write the name of the image they liked best on the sticky note.
  • Have students create a bar graphs on a wall to show the popularity of images.
  • Sticky notes containing the same image will be placed vertically to represent the number of times it was used. Each image name should have its own column.

3. Explain

Review the bar graph with students and discuss their favorite images.

Discuss how students worked in their roles. Ask students questions like:

  • Why do you think it is important to each have a role when programming?
  • What is important about the driver’s role?
  • What is important about the navigator’s role?
  • How often do you think partners should switch roles?
  • How were the roles important when creating the bar graph? Why do you think this is different?

4. Elaborate

Students will work together to play a debugging game.

Explain to students that each partner will take a turn being the “driver” and then the “navigator” to practice these roles.

  • The partner acting as the driver will create a new program that inserts either a word or image or combination of both.
  • The driver should intentionally make an error.
  • The role of the navigator will be to find the error and explain how to fix it.

Students should complete several rounds to ensure they each get practice in both roles.

As a class, discuss how students were able to be successful in each role.

5. Evaluate

Teacher Observation
Discuss the program with students. Ask students questions like:

  • Where did you find the list of images available for the light matrix?
  • How did you work together as a team?
  • What did you do in each role to help your teammate?

Self-Assessment
Have students answer the following in their journals:

  • What did you learn today that might be helpful in working with a partner to program?
  • What did you do in each role to help your teammate?
  • What characteristics of a good teammate did I display today?
  • Ask students to rate themselves on a scale of 1-3, on their time management today.
  • Ask student to rate themselves on a scale of 1-3, on their materials (parts) management today.

Teacher Support

Students will:

  • Practice pair programming.
  • Modify programs.
  • SPIKE Prime sets ready for student use
  • Devices with the SPIKE App installed.
  • Student journals
  • Sticky notes

CSTA
2-CS-02
Design projects that combine hardware and software components to collect and exchange data.

2-AP-16
Incorporate existing code, media, and libraries into original programs, and give attribution.

CCSS ELA
SL.8.1
Engage effectively in a range of collaborative discussions (one-on-one, in groups, and teacher-led) with diverse partners on grade 8 topics, texts, and issues, building on others' ideas and expressing their own clearly

SL.8.4
Present claims and findings, emphasizing salient points in a focused, coherent manner with relevant evidence, sound valid reasoning, and well-chosen details; use appropriate eye contact, adequate volume, and clear pronunciation

RST.6-8.3
Follow precisely a multistep procedure when carrying out experiments, taking measurements, or performing technical tasks

L.8.6
Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases; gather vocabulary knowledge when considering a word or phrase important to comprehension or expression

Vocabulary
Driver
Navigator
Pair programming