DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Strong-Style Pair Programming

When the driver and navigator ask questions of each other, they engage each other in meaningful conversation and they also can understand each other.

David Bernstein user avatar by
David Bernstein
CORE ·
Jan. 12, 17 · Opinion
Like (2)
Save
Tweet
Share
3.36K Views

Join the DZone community and get the full member experience.

Join For Free

Pair programming is not about taking turns using the computer or being someone else’s typist. It’s about engaging two minds on the same problem so that a solution can be developed more quickly and with higher quality than if one person was working on it alone.

The two roles in pair programming are referred to as driver and navigator. The driver is the one with hands on the keyboard. It’s the driver’s job to get ideas into the computer and deal with the minutiae of typing. However, the driver’s main goal is to trust and support the navigator. As the driver, I often think of myself as in service to the navigator. I still voice my opinion or challenge things if I have questions, but as the driver, my hands are full — both literally and figuratively — so it’s hard for me to think several steps ahead. This requires being comfortable working with an incomplete understanding of the task, but that’s often a more efficient way to work.

The navigator, on the other hand, is free from the minutiae of having to type in code, and so is able to see from a broader perspective. One of the main jobs of the navigator is to share information with the driver at the right level of abstraction. The overall goal is to present information so it’s easier for the driver to process. The navigator should give the driver the next instruction needed to implement just in time and at the correct level of abstraction so the driver can enter it most efficiently. The navigator is thinking about the problem at a higher level of abstraction so has a sense of the direction they want to go.

It’s the navigator that tells the driver what to do next, but what if the driver has an idea for what to do next? Simple, just pass the keyboard. This helps keep both pair partners in sync with each other.

There are several different kinds of configurations you can adopt when doing pair programming.

One of my favorite approaches to pair programming is what Llewellyn Falco calls “strong-style pair programming.” He defines strong style pair programming as follows “In order for an idea to go from your head into the computer, it must go through someone else’s hands.”

The best advice I can give both the driver and the navigator is to take a break and ask questions when you have them. When you ask questions of each other, you engage each other in meaningful conversation and you also help to understand each other.

These natural breaks are also ideal for passing the keyboard back and forth. We want to trade driver and navigator frequently throughout the day. Typically this is anywhere from just a few minutes to twenty or thirty minutes, though some purists would say that naturally trading the keyboard every two to six minutes is ideal.

When I see teams stuck in the roles of driver and navigator for more than an hour at a time I’ll sometimes introduce an external timer initially set for twenty-minute intervals so they have a reminder to trade off. Since timers can interrupt the workflow of a pair it isn’t ideal, but it helps form the habit of trading off frequently, which tends to boost overall productivity among the pair.

Driver (software)

Published at DZone with permission of David Bernstein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A ChatGPT Job Interview for a Scrum Master Position
  • What Is Policy-as-Code? An Introduction to Open Policy Agent
  • Build CRUD RESTful API Using Spring Boot 3, Spring Data JPA, Hibernate, and MySQL Database
  • Application Assessment Questions for Migration Projects

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: