Revised 2016 Sep 22.1
(These notes are primarily for INFO-I210, but may also be used by some other classes.)
Pair programming is simply this: two programmers work simultaneously, one as driver and the other as navigator. The driver operates the computer (or records the design or test plan, etc.), while the navigator observes and comments. The navigator should ask questions and make constructive suggestions. After a designated time (perhaps 20 or 30 minutes, depending on your pace), the two switch roles, and continue switching periodically until the project is done.
Watch this to learn about pair programming:
There are three circumstances that …:
There may be an odd number of students in the class, or in a section. Perfect pairing requires an even number. How do we “pair program” with odd numbers?
The instructor requires a pair programming log, mainly to verify the students (especially online) are really pair programming, which is a much tighter form of coordination than just “working together.”
The video describes pair programming face to face, but how do we do it in an online situation?
What if there are an odd number of programmers? You cannot assign everyone to a pair in that case.
There are two solutions:
We will use the first solution, allowing in each section one team (only one!) of 3 students. For such teams, there will be, at any time, one driver and two navigators. When it’s time to switch roles, rotate uniformly, like this:
| Time | Person A | Person B | Person C |
|---|---|---|---|
| 1 | driver | navigator | navigator |
| 2 | navigator | driver | navigator |
| 3 | navigator | navigator | driver |
To ensure that “pair programming” really is pair programming and not some looser form of working together, I will require pair programming teams in INFO-I210 to turn in logs of their working sessions. (If you are in another course, see the assignment instructions to determine if logging is required.) The logs will show who was driving, who was navigating, times of role switch, what was accomplished before each switch, etc.
These are the logging requirements:
Keep a log of your working sessions. By “session” I mean a period of time in which one person is the driver and the other is the navigator. In the log, write the start and end (date and) times of each session, who is the driver, who is the navigator, and what was accomplished. (In the exceptional case of a “pair” of three students, sessions will have one driver and two navigators.) Also describe any problems you encountered in developing the program, and explain how you solved them or attempted to solve them.
Additional requirement, for Lab 6 and later, added 10/19/2015:
If you are pair programming online, your log should also identify the tools and technology you use for this (e.g., Google+, Big Blue Button, pastebins), and tell me about how well this technology works for you. You don’t need to report this separately for each session, unless it changes; just once at the end of the log is enough.
| Date/Time | Driver | Navigator | Accomplishments and Problems |
|---|---|---|---|
| Oct 15 | |||
| 10:00-10:30 | Joel | Kelly | Define desserts function, without tax. |
| 10:30-10:50 | Kelly | Joel | Add tax on desserts. Test function. |
| Oct 17 | |||
| 10:00-10:40 | Joel | Kelly | Begin date_reformat. See 1. |
| 10:40-11:15 | Kelly | Joel | Finish date_reformat. See 1. |
| 11:15-11:55 | Joel | Kelly | Begin employee_reformat. See 2. |
| 12:30-12:45 | Kelly | Joel | Finish employee_reformat. See 2. |
Problem Notes:
Tools and technology: For online pair programming we used Google+ Hangout for voice and screenshare, and pastebin.com to exchange code when we switched roles and when we finished. No problems.
Pair programming got started, and may be easiest to practice, with two people in the same room, literally side by side and looking at the same computer. It is also possible to do pair programming on line—two people in different rooms, not side by side, each with a different computer. But how does that work?
What we need to do, more precisely, is three things:
What I would probably do, if I were pair programming with one of you in an online class, is use Google+ Hangouts. (Use Canvas Inbox to share your Google+ Profile URL with your lab partner.) The driver can share the screen to show to the navigator—you have all done this in the hangout test. You can talk to each other. There is even a “remote help” tool, which allows one person to control another’s computer, and we could try that when it’s time to switch between driver and navigator roles. If that didn’t work well, we could use a paste bin to share code.
But there are also many alternatives, so use what you like.
Voice communication: telephone, Skype, Adobe Connect.
Screen share: Zoom, Adobe Connect, other resources (see below).
Note: I haven’t tested all of these, or even most of them.
Check your understanding: