What about Pair Programming?

Amanda Alling
Nomads Of Code
Published in
4 min readJan 26, 2018

What’s pair programming?

Pair programming is an agile practice, and in its essence is about solving problems together. This means that two programmers work at one workstation and work on the same screen, mouse and keyboard (or remote with screen share or in a hangout).

Why? I can get more done on my own…

Web development is a team effort. A modern web development team can have up to 10 developers working on the same application. This means that communication and the ability to work professionally together is more important than ever.

So why should we work in teams rather than alone? Don’t we get much more done when working alone? Well, this can be true in certain cases but the benefits of working in a pair far outweighs the benefits of working alone, especially as a junior developer.

Some benefits of working in pairs

  • Your code is getting reviewed as you code by your team member
  • Less typos resulting in fewer bugs and faster coding
  • Great for junior developers to quickly understand the code.
  • Pairs can discuss more solutions in a shorter amount of time.
  • Enhanced ability to explain the solutions and notice errors in logic.
  • Diverse coding skills results in smarter code.

Needless to say Pair Programming is our primary learning technique here at Craft Academy.

So how’s it done?

As with anything you need to have a plan and some rules before starting out with pair-programming. First you need to divide the roles — we will have a driver and a navigator.

The driver will type on the keyboard and explain what s/he are doing just like a narrator explains what’s happening in a nature show.

The navigator will closely follow what the driver is doing, taking notice of typos, give suggestions, taking notes, making sure that the driver is staying in scope and try to be one step ahead in the planning.

Driver and Navigator plan the session together by answering following questions:

  • What are we working on?
  • What is the scope?
  • When do we know that we have completed the task or feature?
  • Do we have a user story to work from?
  • How often should we switch roles?

You can either work for 25 minutes and then switch roles, or you can switch roles after making the tests go green It all depends on how complicated the code is and how long it takes. But 25 minutes is a good rule of thumb.

Do’s and don’ts
Do ask questions when you are unsure of what to do next or if you don’t understand.
Do use the proper language eg “we” and “us” instead of “me” and “I” to fortify the collaboration.
Do think about personal space.
Do commit and push your code regularly
Don’t snatch the keyboard from the driver
Don’t be silent “Don’t stop communicating regardless if you’re the driver or the navigator”
Don’t do anything else while navigating, like looking at your phone or going through your email
Don’t try to always be right, make sure to listen and try out suggestions.
Do take care of your personal hygiene, especially when working closely at the same workstation.

Troubleshooting

Do you feel like pairing up is ineffective? Here’s some indicators of non-performance.

Disengagement — when a member physically withdraws from the workstation or does something else like looking on phone or accesses email
Solution: Take a break or switch roles.

Watch the Master — when one member is more experienced than the other thus making the junior member take the observer role, which leads to disengagement.
Solution: Stop, review and explain the code and switch roles.

Silence — when one of the members is silent.
Solution: Take a break and have a talk.

Some final words

It takes two to tango (or to make a pairing session work) — remember that like everything else pair programming also requires practice.

If you want some tips on how to pair program remotely, read this post about git pong.

Craft Academy is a Tech Education Provider that aims to bring new talent to the market and help to solve the shortage of tech workers. We are founded on the belief that modern development standards, agile methodologies and business skills are fundamental for ITC professionals.

Our primary service is a 12-week coding bootcamp designed to provide individuals with a foundation of skills that allows them to enter the industry as junior developers.

With that foundation, our learners find employment in various industries or start their own businesses that bring new innovations to the market.

Would you like to know more about what we do? Follow us here on Medium, Facebook, Twitter, Torgny.io (posts in Swedish) or visit our website.

--

--