Why You Should Start Pair Programming
Tags: productivity, beginners, codenewbie, programming
Published: 2020-08-27 18:01:25

# Introduction
I spent a lot of time working independently, trying to build a foundation with Ruby, and scratching my head constantly. I finally had my first pair programming experience after the first month of my code boot camp at Flatiron School. That is where I met my good friend and programming partner, Austin. Things started to change. We both buckled down on Ruby labs with our loud birds chirping in the background. There were many great "ah-ha" moments. 

I believe there is a lot we can do independently, but sometimes working with others can be very beneficial. In this blog post, we will discuss the benefits of pair programming and how to do it effectively. Let us start by explaining what pair programming is.

## Definition
Pair programming consists of two programmers working together to solve problems. Typically, one programmer is the "driver," and the other is the "navigator." The driver is focused on the actual actions of building the application. This is the programmer that is typing on the keyboard and bringing the ideas to life. The navigator figures out which steps to take and the approach to building the application. They can also help catch errors that may go unnoticed by the driver. At times, the driver and navigator may swap roles to take a break from one role and even out the workload. 

## The Benefits
I believe there are three main benefits to pair programming. They are peer review, spreading the load, and engagement. All three of them can go a very long way.

<img src='https://media.giphy.com/media/OeQsvMC3uEL6g/giphy.gif' alt='High five'>

### Peer Review
Nobody writes perfect code. If you believe that you only write "clean code" and do not need to check for errors, then it is going to come back to bite you eventually. It is essential to review your code and make sure that everything works as expected. If it is a SaaS application, then this part is even more important to ensure usability and user-friendliness. The good news is that pair programming can make the process of finding and fixing errors much easier. 

You can have your navigator watch over you as you write code to catch errors in realtime. This can help improve workflow and reduce the time spent fixing errors at the end. If you are unable to work together live, then review as you go. 

One way you can do this is by using Github pull requests. These allow programmers to view changes committed to the external repository, review the code line by line, and discuss changes that need to be made before pushing to the main branch. 

### Spreading the Load 
At times, programming can feel very intimidating, especially if working independently. Depending on the project, there can be many moving parts to watch. Keeping track of syntax, algorithms, gems, and everything in between can become overwhelming. We can work more efficiently and stress-free by splitting the work with our partner. Not only will productivity increase, but also the quality because you can focus on smaller parts of the project.

### Engagement
Ever spent hours on a project and felt extremely bored and unmotivated? Working with a partner is much more engaging and might help reduce those feelings. Not only do you have support, but someone to chat and bond with. Doing this can provide that much-needed humility. It also helps build trust with your partner because you are relying on them and keeping each other accountable. The projects you work on together begin to feel a lot more real. 

Here are a few tools you can use to stay connected:

* [Slack](https://slack.com/): Chat rooms organized by topic, groups, audio/video, and private messaging.
* [Zoom](https://zoom.us/): A conference app with audio/video meeting capabilities and screen sharing.
* [Skype](https://skype.com): A conference app similar to Zoom, but a little less light-weight. 

## Effective Pairing
Pair programming can be a waste of time if it is not done efficiently. Everyone has their preferences, but I will share a few tips that have made my experience better.

### Find the Right Partner
Finding a partner is sort of like dating because there is a compatibility scale. There are certain things you want to look for in a "partner." You need a partner that you can work well with, does not cross boundaries and has similar availability. It may also be a good idea to work with someone close to your level. If you are a beginner, your best pair programming partner might not be someone who has built 30 web applications. 

I met my partner in my boot camp cohort, which worked out perfectly because we were on the same module and had similar skill levels. At the same time, you want your partner to bring in different perspectives from yours. Go ahead, put yourself out there!

### Make a Schedule
Set time aside that is strictly for programming. We wish we could pair while binge-watching Netflix, but that does not work too well. Especially when watching Narcos, you would just miss all the subtitles. 

<img src='https://media.giphy.com/media/3o6Mblpo7jq1JBaXLi/giphy.gif' alt='Schedule'>

Be very strict in following your schedule and try not to cancel often. Making too many excuses can become tiresome for your partner and might cause them to believe you are not serious. Remember that one hour of high intensity focused work is better than four hours of less focused work. It is also much easier to find an hour to work together. Do not make your sessions too long! 

[Google Calendar](https://calendar.google.com) is a great way to create a schedule that both you and your partner can view and update. Be sure the schedule works for both parties.

### Switch Roles 
Earlier we went over the differences between the driver and the navigator in pair programming. It is important to play both roles. Being a driver improves your skills in execution while being a navigator improves your ability to explain and break down your code. Both of these need practice.

You also need to give your partner a break from fulfilling one role. If you went on a 24-hour road trip, would you want to be the driver the entire time? Probably not. Divide the work and make things a lot more interesting and less repetitive.

One way you can do this easily is by using a Pomodoro app like [TomatoTimer](https://tomato-timer.com/). It times your work sessions into 25 minute periods. You can use this timer to switch roles and take breaks. There are also many other free apps on the app store and the web. 

### Find a Quiet Place
It can be difficult to accomplish anything without a quiet place to work. Both you are your partner need a suitable environment free of distractions. Steer clear of the room where your three parakeets are, you will not want to be unmuting yourself every time you need to speak. I have had to do this and it distracts everyone. 

## Wrapping Things Up
These are just a few ways to get started on improving your pair programming experience. I hope you can utilize these tips. Do not forget to discuss your pair programming approach with your partner. 

---

Feel free to share your approach to pair programming. What improved your experience? Did you try anything that did not work? I would love to hear your response!