IT TAKES TWO…

Anita Toth
3 min readApr 5, 2021

to tango, to make it right, carry on the human species…but have you ever thought it would include programming?

And no, pair programming does not mean having a cat napping on your keyboard, though this will inevitable happen if you’re a cat owner.

While most envision programmers to be solitary creatures, hunched over in front of their laptops or laying in bed… and continue envisioning this as post-pandemic pair programming could be like this.

However, pre-pandemic when people commuted to their offices, pair programming involved two programmers working on the same workstation, each having their own keyboard and mouse. Now, extensions such as VS Code Live Share (https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare) make it possible for two programmers to write code together remotely.

Pic of me and my pair programming partner.

When I first learned about this concept at the start of my web development bootcamp, my first thought was “oh no, here we go again with team building projects” that were ever the focus of the school curriculum growing up.

These team building activities all lead to the inevitable pitfalls were there was always the one person jumping to becoming the leader and forcing ergghh I mean leading the group with their ideas, and also the ones that did the minimum work and rode the coat tails to get the grade.

Thankfully, mostly pair programming did not resemble my previous experience with team building activities. The off chance it did was for a couple of reasons I will touch on at the end.

So how exactly does pair programming work?

During pair programming, one person is the driver and writing the code and the other is the navigator who reviews each line of code as it is being typed. They can be swapping roles or not.

What are the benefits you ask?

For me as a coding newbie it was great to be able to bounce off ideas, talk the code through with someone else (and not my rubber ducky). It was also great help in debugging issues as two brains are better than one, right?

Our code had fewer mistakes as we were correcting it as we typed, and most of the time any problems we faced we were able to brainstorm and solve without any mentor assistance.

According to other researched articles on pair programming, there is a host of other benefits like shorter and tighter code, developing better interpersonal and social skills, and the project won’t die if one of the pairs leaves the company.

But wouldn’t this cost the company more $ and be 50% less efficient?

Not really.

According to studies, two programmers working on the same thing are only 15% slower than if they worked independently. Plus add on the host of benefits and those easily cancel out the marginal decrease in efficiency.

When pair programming does not work…

For me it was when there were three of us in the group or when the skill levels were different. Note that other articles mention personal hygiene as a pitfall which remote working has taken care of nicely.

Based on my experience pair programming on multiple projects during bootcamp and seeing the benefits; I would highly embrace it moving forward on the job as an addition to the independent work. As the saying goes, “everything in moderation”.

Had to share as writing this in middle of Ruby/Rails week (https://www.flickr.com/photos/dav/94735395/)

Sources/Additional Resources:

--

--