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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations

Pair Programming Pointers

If you and your team engage in pair programming, we have some pointers here that might help you get more out of it.

David Bernstein user avatar by
David Bernstein
CORE ·
Sep. 21, 18 · Presentation
Like (2)
Save
Tweet
Share
4.44K Views

Join the DZone community and get the full member experience.

Join For Free

Pair programming is the one Extreme Programming practice that I get the most pushback from both developers and managers.

Most of us have experienced programming as a solitary art form and we've done it alone. We figured out a bunch of things for ourselves and we don't necessarily feel comfortable doing our work in the presence of another. But think about how worse off medicine would be if surgeons didn't pair up to do surgery.

If Uncle Bob Martin is correct and the number of software developers going into the field doubles every five years then we are an industry of amateurs with an average experience level of two-and-a-half years. Yet developing software is some of the most complex and intricate work that humans have ever engaged in. Pairing and mobbing are great ways to share information and refine skills as software developers.

So here are some basic tips for a successful pairing session.

Pair programming is not about taking turns at the computer. It's about bringing two minds to bear on the same problem. It's about collaborating and thinking through problems with another person to help us gain clarity. We do this all the time. I'm sure you have the experience like I have had where I was stuck on a problem so I called over a colleague and just thinking about how to explain the problem to them, I've come up with the answer. Externalizing a problem or saying it out loud to someone else helps us gain a different perspective and sometimes that's enough to help us discover a solution that we hadn't thought of before.

But pair programming is more than just externalizing your ideas. It's about forming a true collaboration where both the driver and the navigator are engaged in solving the same problem together. These are typically not skills that we were taught in school or on the job, so learning how to effectively collaborate in a pair it's something that we must be open to.

If we're stuck and I suddenly get an idea that I want to try out then I passed the keyboard to my partner and have them drive. Likewise, if my partner has an idea and starts typing on their own then I'll offer to be the driver.

I see the driver's role as primarily being in service to the navigator. As the driver, I try to handle the minutia of working at the keyboard so the navigator can think about things at a higher level of abstraction.

The navigator is also in service to the driver by giving instructions to the driver so that they are easy to understand and execute. The level of abstraction that a driver can assimilate is constantly in flux. If an operation is new to the driver then the navigator may have to spell out the steps in detail, but once the driver is familiar with a set of operations then the navigator can give it a name and then refer to it just by name.

When we are pairing and mobbing I very often think that we are in service to each other. By working through problems together we gain different perspectives then we would've had by ourselves and we also learned a tremendous amount from each other. Much of the details of being a fine craftsman and software developer can be learned through pairing and mobbing. This includes everything from key bindings to coding conventions. Pairing and mobbing are the fastest ways I know to propagate knowledge across a team.

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

  • 10 Most Popular Frameworks for Building RESTful APIs
  • How To Perform Local Website Testing Using Selenium And Java
  • A Beginner’s Guide To Styling CSS Forms
  • What Is the Temporal Dead Zone In JavaScript?

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: