What is Pair Programming? Glossary

You have more people who know how the new program works. This means that if one of the pair leaves the company, it will not kill the project. Both of them can share their knowledge with each other and can learn many new things together. If driver encounters a problem with code, there will be two of them who’ll solve problem. When driver is writing code, navigator can think about a solution to problem. Expert–expert pairing is a good choice for higher productivity as both of them would be expert, so they can work very efficiently.

The navigator focuses on the overall direction of the programming. The collaboration between developers can be done in person or remotely. The programmer at the keyboard is usually called the “driver” ; he writes the code. The other person is the “Navigator” who reviews each line of code as it is typed, checking for errors. You may switch between roles slower or faster, depending on your context.

With pairing, it is like having somebody review your code instantly and regularly. Two people have to be there and understand the program being written. And if one sees problems with the other’s code, then it can be instantly corrected. You also have fewer chances of having bugs written into your code.

definition of pair programming

This can become a Ping Pong anti-pattern if the same person is always writing the tests and the same person is always making them pass . One person is the “driver,” and the other is the “navigator” in pair programming. The driver is the individual who is actively writing code at the keyboard.

Related Articles

Pair programming involves you and another software developer sitting in front of a computer. Some businesses employ pair programming, whereas others do not. That’s because pair programming has both benefits and drawbacks that you should think about before applying it in your organization. Your team develops better interpersonal and social skills. Team members can learn to communicate with each other, work together, and share information. The “Watch the Master” phenomenon can arise if one member is more experienced than the other.

  • They agree on one small goal at a time, such as writing code, testing or just taking notes.
  • This way, they get experience working on the different parts of the system being built.
  • Plan with your partner and include them in the process.
  • In an attempt to share goals and plans, the programmers must overtly negotiate a shared course of action when a conflict arises between them.
  • The first time I’ve ever experienced the potential of the Internet to transform learning.
  • Most programmers connect by pairing programming to solve an issue without using TDD.

Pair programming can ensure that one or two people aren’t holding all the knowledge critical to a project. Pairing them with a variety of programmers helps spread knowledge and keeps them from burning out. It improves the code that’s produced, and it’s less likely to contain errors since it’s reviewed by both pairs as it’s written. Ken Becks, the Agile Manifesto signer and developer of extreme programming invented pair programming.

It’s important for both partners to be open-minded and give the other person a chance to write code, make mistakes, and correct themselves. For example, if the driver makes an error, give them several seconds to correct it before pointing it out. Having someone quality checking the code as it’s being written will improve accuracy. Issues and bugs can be caught immediately rather than down the road when it’s harder to debug. I am an experienced full-stack software developer with over a decade in the field, primarily in back-end…

What Is Big Data?

The navigator looks around, double-checks the code, and maintains an eye on the larger picture. Usually, you pair program in the office, at your desk, or at your colleague’s desk. You can take your laptop and pair in a meeting room on a big screen, or on a terrace when the weather’s nice. Or, you can remote pair program by using specific tools to pair with people wherever in the world, as long as they have a good internet connection.

Plan with your partner and include them in the process. Thus the navigator will now be the driver and create the code. You https://globalcloudteam.com/ can change responsibilities every 30–40 minutes or whenever you finish developing a particular feature or function.

definition of pair programming

But studies have shown that two programmers working on the same program are only 15% slower than when these programmers work independently, rather than the presupposed 50% slow down. In an online survey of pair programmers from 2000, 96% of programmers stated that they enjoyed work more while pair programming than programming alone. Furthermore, 95% said that they were more confident in their work when they pair programmed. However, as the survey was among self-selected pair programmers, it did not account for programmers who were forced to pair programs.

Managing skill levels

PCMag.com is a leading authority on technology, delivering lab-based, independent reviews of the latest products and services. Our expert industry analysis and practical solutions help you make better buying decisions and get more from technology. Fewer mistakes are introduced into your code because a lot of errors are caught as they are being typed.

definition of pair programming

Remote pairing can introduce complexities such as extra delays in coordination, a potential loss in communication and an increased reliance on task-tracking tools. Pair programming is a development technique in which two programmers work together at single workstation. Person who writes code is called a driver and a person who observes and navigates each line of the code is called navigator. Knowledge is constantly shared between pair programmers, whether in the industry or in a classroom. Many sources suggest that students show higher confidence when programming in pairs, and many learn whether it be from tips on programming language rules to overall design skills. Pair programming is an software development technique in which two programmers work together at one workstation.


But by then, you, as the original programmer, might not even be around to appreciate the code review. In sum, it helps your programmers learn from each other while coming up with programs and applications with better code quality and fewer bugs. Collaborating on a single project helps your team to appreciate the value of communication and teamwork. In an attempt to share goals and plans, the programmers must overtly negotiate a shared course of action when a conflict arises between them. In doing so, they consider a larger number of ways of solving the problem than a single programmer alone might do. This significantly improves the design quality of the program as it reduces the chances of selecting a poor method.

Problems are picked up on earlier and potential bugs are identified by two people instead of one. Before the pair settles on an approach to a particular problem, they discuss, evaluate, and talk through any trade-offs involved. Solutions are evaluated up-front rather than after they’ve already been implemented.

Here you can assess technical capabilities and communication skills and the capacity to operate in a group. You can only swap one time if the session is less than 60 minutes long. Having only one person lead could be more efficient if the session is shorter, but you can still switch halfway through. The collaboration, plus the fact that each technician is validating the other, ensures that more thought goes into the writing of each routine. It also helps to make the code self documenting or, at least, better documented. The pair should be equally engaged and be participative for the duration of the task.

definition of pair programming

An applicant is paired with an experienced worker and given a specific task to complete. Juniors write code while senior or mid-level devs navigate. Senior specialists are in charge of coding and instructing their junior colleagues. Junior developers learn to tackle problems much faster when they work in pairs.

Life is Good When Your Agile Teams Are in Sync!

Navigator is observing each and every line of code written by driver, so mistakes or error can be detected easily. Feeling like you’ve lost your edge in your remote work? Follow these tips to stay energized, sharpen your skills, and tighten …


Some of the very first programmers were the women who worked on the ENIAC . These women worked in pairs, allowing them to discuss ideas and improve each other’s work. The first time I’ve ever experienced the potential of the Internet to transform learning.

To establish the right development team size, managers must look at each member’s responsibilities and communication paths, as … Particularly when a novice works with an expert, the novice should take definition of pair programming any opportunity to learn. Quick commits to code pair well with switching between the driver and the navigator. Ensure the two developers will be able to work together well, without any hiccups.

What does pair programming mean?

A developer micromanaging during a pair programming session is one of the most unpleasant behaviors. Traditional pair programming and remote pair programming are very similar. Code reviews are a process wherein another programmer takes a look at your code to find something that needs improvement or find defects in it. It combines testing with quality control to ensure that everything in your code is good. Your developers learn more about things that are specific to the applications that they are working on as well as software development in general, best practices, and other areas.

댓글 달기