Pair-Programming
Pair-Programming means sitting side-by-side with one of your colleagues through the whole adventure: coding, unit testing, and then functional testing.
Agile methodology and Scrum process does helps us managing the iterative development process but is silent on how to deliver code.
Extreme Programming (XP) recommends some of the engineering practices, and one of which is Pair Programming. But please note that we should adopt XP engineering practices in a ways that add most values to our project and the practice we are following.
Pair Programming is easily the most controversial Agile technique because of its inherent benefits and risks, and it is ultimately the project team’s job to figure out whether the benefits outweigh the costs when trying to determine whether or not teams should pair on a specific project, and for what percentage of the time.
Roles In Pair-Programming Practice
Here both the partners collaborate on design, implementation, code and test. Partners alternatively swap the role of Driver and Navigator.
Driver: is the person who is at the keyboard, who answer’s navigator’s questions and is always open to feedback (Fine scale feedback).
Navigator: is an active observer who monitor the ‘big picture’, help the driver avoid distractions, track tasks and review code, asks questions, navigates the implementations and ensures use of best practices.
It is also recommended that during pair programming the person typing at the keyboard swap the keyboard with the partner every now and then. Forcing to switch the pairing roles regularly, results in increased productive and focused bursts of work. It also ensures that you take breaks.
But sometimes even when you’re not in the driving position, you might come up with an awesome solution to your problem that you need to type straight away. If that happens, you shouldn’t “steal” the keyboard from your partner, but instead let them know about your idea so they can incorporate it themselves.
Cohesive teams are more successful.
Why to adopt Pair Programming?
- to Eliminate waste and bring in Higher productivity
- for Effective Knowledge sharing or Transition
- to get Higher-quality code
- for Risk Mitigation
- for more deliberate design direction
Benefits of Pair Programming If implemented correctly:
- Way to build quality software.
- Eliminates waste: Having a pair to debate the most effective way to solve a problem means less time wasted and more time writing excellent code solving the right problems.
- Effective Knowledge sharing: Pairing ensures cross team sharing of knowledge of the entire code base. If a team hires a new member, the knowledge share gained through pairing makes these Knowledge share effective. This also results in reduced risk for the project.
- Technique Transfer: Allows transfer of techniques from experienced teammates to the partner.
- Highest quality code possible: Getting quality code out the door in a timely manner is served best by pairing.
- Risk mitigation and negates negative effect of interruptions: Pair Programming lessens the negative effect of interruptions (sickness, vacation, attending emergencies), because one of the team members can deal with the interruption while the other continues to work on coding.
The primary issues with Pair Programming:
- Inability to multitask: While working physically beside someone else, it’s impossible to respond to emails and IMs. That’s part of what fuels the productivity gain in of pair programming, but it does have some negative impact on the team: if you’re needed for something critical, it may take a while to respond. – This is probably why Extreme Programming requires teams to be co-located (e.g., in the same physical space).
- It’s important to take personality traits into account when pairing individuals together. This can also affect how we look at potential new hires, since it’s important to make sure new team members will get along with whomever we may pair them with in the future.
- Sometimes it is very difficult to share tight spaces like a computer area. We all occasionally need a little bit of privacy, which you can’t really have while Pair Programming. To compensate, create a high quality work environment.
- Product Owner and Management also need to be aware of the benefits of Pair Programming, and should not be misguided by unrealistic financial and legal implications.
- Social distancing in the pandemic era.
Cultural Tips:
Encourage people in your organization, project and programs to socialize outside of work. Socializing with co-workers outside the office is an effective way to open channels of communication, to create a better understanding and to break down any walls of pre-judgmental or mistrust between team members. It also helps to decrease individual bias, stereotyping and false objectifying. It creates happier work environment and reduces attrition rate. Cohesive teams are more successful.
@Mohammad Sami -Agile Transformation Coach
Also check my blog on Refactoring: Refactoring secures short-term as well as long-term gains to keep tab on maintenance cost and to improve codes maintainability, readability, scalability and portability. “Refactoring“.
Also check my blog on Continuous Integration (CI): In software engineering, Continuous Integration is the practice of merging and building (and automation testing) all developer working copies to a shared mainline several times a day or sometimes on every code check-in (if infrastructure supports that). CI keeps the entire development team in sync, removing the delays due to integration issues. Please see my blog on “Continuous Integration”.
NOTE: Please note that due to some technical issues we have lost users comments until February 2022. My apologies. Please do comment and share your thoughts in the comments below