Pair Programming in CS 330
What is Pair Programming?
| |
Two programmers working side-by-side, collaborating on the
same design, algorithm, code or test. One programmer, the
driver, has control of the keyboard/mouse and actively
implements the program. The other programmer, the observer,
continuously observes the work of the driver to identify
tactical (syntactic, spelling, etc.) defects and also thinks
strategically about the direction of the work. On demand,
the two programmers can brainstorm any challenging problem.
Because the two programmers periodically switch roles, they
work together as equals to develop software.
-- Laurie Williams of North Carolina State University Computer Science
|
|
References
Rules
Pairs must follow these rules. Adapted from
Bob Noonan's rules.
- Share
Develop each program together.
Everything for an assignment is done together.
Do not divide up the assignment.
That is a violation of pair programming.
- Play fair
Take turns typing or writing [driving] while the other
person observes and reviews [navigates].
You must be in the same place working on the assignment.
Each person should drive. Perhaps use a timer to switch every
15-30 minutes depending on the length of the program.
Use scrap paper and a pencil for the navigator to make notes.
- Hold hands and stay together
All programming should be done together; do not create things
done alone. The literature of pair programming shows that most defects
are traceable to things done individually.
One reason to use pairs is to enhance your learning in
ways that don't happen when you work individually.
Four eyes are examining the code as it develops.
- Say you're sorry
"Ego-less programming ... is essential for effective pair
programming." Do not insist on having things your way or else.
Do not get defensive about criticism. Criticize constructively
and helpfully. Be polite. Work things out as a pair.
Remember the Golden Rule:
Treat your partner as you would like to be treated.
- Take a nap
Sometimes you'll need a break from programming. Get a snack.
Take a walk. Sit out in the courtyard.
- Don't hit people
Sometimes you may need a break from each other.
You may work on an assignment individually if you do it entirely
individually as does your partner. This will be helpful if you run
into scheduling difficulties.
But respect your partner and discuss your need for separate work
as soon as you realize it.
You may not switch to another partner.
Once you choose a partner, your only other choice is to work alone.
Logistics
If you choose to pair with someone in your section,
let your instructor know that you are partners.
For each assignment, work together on one person's account
to build the assignment.
Submit one copy of the assignment with both names and userIDs
in the comments.
Email the program to the other partner as a backup.
You should never work on an assignment separately
and turn it in as a pair-produced project.
If you start working on a project individually and get more than 25%
of it completed, you must complete the project individually.
Your partner must also do the assignment individually.
Discuss the situation with your partner as soon as possible.
Pair programmers work together.
If you need help, visit your instructor as a pair.
If you send email for help, use a carbon copy (cc, not bcc) to
show that both partners are asking and seeing the email.
Tests will be done individually.
No pairs are allowed on tests.