Why Should You Care About Pair Programming?
Tags: womenintech, codenewbie, 100daysofcode, javascript
Published: 2020-07-05 22:13:38

I joined my current company at the beginning of this year and just a month after that the COVID19 lockdown happened, so the whole company ended up working from home. Being the only junior on the team and having very little backend experience, I felt like I needed some guidance on certain tasks I took.

I did everything by the book: read documentation, done my research, asked questions, but many problems I faced were not easily Google-able, they were related to how company codebases worked and how they were structured. The most effective tool for me to solve that problem was pair programming.

Before we dive into the tips, let's introduce some terminology to establish common ground. As per Wikipedia: 
> Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the **driver**, writes code while the other, the observer or **navigator**, reviews each line of code as it is typed in. The two programmers switch roles frequently. ([Source](https://en.wikipedia.org/wiki/Pair_programming))

---
Here are some tips on pair programming I've gathered along the way:

### **1. Use every opportunity to learn and encourage learning**

I strongly believe that even though pair programming can be difficult to facilitate at times, it is beneficial to both parties when done with the right intention. 

The 'drivers' can pass on valuable knowledge, bounce ideas off of the other person, share debugging tips & tricks, and on top of that it feels ohhh so rewarding to share the experience with someone! :) At the same time 'navigators' can pay close attention, catch typos as they occur, suggest solutions, ask questions and get feedback in real time!

### **2. Don't wORk away in silence🙂Think out loud!**

It's very tempting to just continue to code in silence, but if you actually talk things through while working on them there's a higher chance to find potential logic flaws earlier, making sure the code quality is consistent and edge cases are accounted for. This practice will also shave some time off debugging issues later on. It might feel a little uncomfortable to initiate a conversation, but once you get started - the work goes smoothly and time flies. 

Also if you have an idea or a suggestion, say it, don't overthink it! There are no stupid ideas, and maybe yours could provide a fresh perspective on things and change the direction of the whole session! 

### **3. Use this chance to get to know your team**

Pair Programming could be a great way to connect with your teammates. Some of the people joined our team right after the lockdown, so we didn't get to meet and talk to each other in person. Through the sessions I learned a lot about the people I work with: their hobbies, background, likes, dislikes and personalities. I think I've learned more during these sessions than I would've by sitting close to them at the office.

In a nutshell: it's a great team building activity! It's not only about completing a task or a ticket ASAP; it's about team work, being patient and respectful, providing suggestions and listening to another person's point of view.

### **4. Take breaks!**

Pair programming requires a lot of concentration so don't be shy to suggest a coffee, bathroom or a lunch break. This will definitely make the experience more enjoyable and you'll feel less drained by the end of it, especially if you have longer sessions (2+ hours).

### **5. Share what you know**

As you code together, when appropriate, share the tools you use, various tips, shortcuts and commands. If you notice your pair programming partner is not using a shortcut you know and that slows them down, always take a minute to to tell them about it.

We all have different gaps and even the most experienced developers might not know some things. When you teach a teammate something that makes them more effective, the whole team benefits.

---

## **Some tools our team has been heavily using while WFH:**

- Slack calls and their built-in functionality

What helped us greatly in establishing good team communication during pandemic apart from various work chats, was the built-in Slack functionality: audio calls + screen share option. It's really handy for someone to show their screen to go over certain things, while others on the call are able to discuss code in real time, to highlight and point to specific lines using the built-in pen.

- [VS Code Live Share extension](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare)

This was a key tool we used for pair programming, as you can share a live coding session: all people participating just need to be authenticated with their GitHub accounts. One person starts the session and then shares a link with others on the team. That way everyone can be involved in writing code and it allows to swap roles (between navigator and driver) really quickly! If you select a person's name on the left it follows the cursor of the selected team member everywhere they go within the code editor. That makes it easier to follow their train of thought. 🔥

---
I hope you find this article helpful and I'd be happy if you share your own tips in the comments!