Pair Programming

On this page, you will learn about collaborating by using pair programming.

In the early days of computers, programming was something you did alone. You planned the program in your head, and then you sat down and wrote the code.

The programs people write these days are far too complicated for that. Graphical user interfaces, interacting with servers on the Internet, internationalization, security against malware attacks, and many more requirements are part of a serious software development effort, and a program is likely to have hundreds of authors.

This means that collaboration skills are as important as coding skills today. Even if you don't end up working as a programmer, collaboration is part of most jobs.

CRD-1.B.2

There are several ways to organize a collaboration. In this course, you'll use a collaboration technique called pair programming—writing computer programs in teams of two. One partner, the driver, controls the computer. The other, the navigator, helps catch errors and keeps track of how the code being written fits into the overall plan. The navigator is also in charge of reading the lab pages out loud. Aim for equal time in each role, switching about every five minutes.

How not to do pair programming:

The biggest mistake in pair programming is for the navigator to tune out and let the driver do all the work. The navigator has to be paying attention; otherwise you're just taking turns doing the entire work instead of making use of the benefits of having two people.

How to collaborate in pair programming

CRD-1.C.1:

In the first unit, we'll use these symbols to remind you to switch roles at specific points in the lab. After this unit, you're on your own to be sure to switch about every five minutes.
Pair Programming Swap Pair Programming Swap

CRD-1.C
  1. Your teacher will hand out instructions for the Lost on the Moon game.