Remote Pair Programming: Still Productive at This Pandemic Situation
Today, I have been working from home for more than 4 months. Everything was done remotely. Honestly, working from home have several benefit instead of working from office. I can start working earlier, take a 30 minutes nap, no stress during trip to and from office, better work-life balance, money saving for both side (employee and employer), positive environment impact that can reduce greenhouse gas emission, healthier work life.
As I said before, remote working will shift how you work and coordinate between the teammate, including pair programming.
A brief introduction to pair programming
According to this site⁴ :
Pair programming is where two developers work together on the same programming/coding task while sitting next to each other, and most importantly of all, they work on one computer only. It is a widely used methodology in software development; according to Stack Overflow Insights 2018, pair programming is used by 28.4 percent of all respondents. Typically the pairing setup will include two sets of keyboards, two mice and either one screen or two screens which are mirrored.
To understand the concept of pair programming, just imagine playing “seesaw” in the playground by minimum 2 people. One person at one site push the ground with his/her feet that will go up and the other side will go down. At pair programming, there will be a turn for who will take over the keyboard and write code. It’s not like two people writing code at the same time.
Benefit of pair programming
The proverb says, two heads are better than one. So, in what scenarios when pairing went absolutely amazingly?
- Novice-expert pairing when one person is more experienced and willing to teach. The obvious benefit is that there is the sharing of context and distribution of knowledge within the team. It will increase the confidence level and developer satisfaction. The code quality is increased and produce less defects.
- Expert-expert pairing when two people are at equal levels. When a solution from one person need to be challenged then the result is the fusion of the best ideas from both side.
Jump to the floor
Today, its not possible to work closely due to social distancing rule. Fortunately, we can use editor that capable to perform pair programming remotely. Meaning, code quality can still maintained by applying pair programming principles.
Setup the editor
At this article, I will show you how to perform pair programming remotely using Visual Studio Code, a.k.a VS Code. I will not compare it to other editor.
If you haven’t VS Code, just get it from https://code.visualstudio.com/Download. It can run on macOS, Linux and Windows.
After VS Code installed, you need to install the Live Share and Live Share Audio extension by combination Ctrl+Shift+P or visit menu View | Command Palette…
1. Start live share
Open your working directory, click Live Share | Start collaboration sessions…
Then you must to sign either Microsoft or Github (I choose Github).
Just authorize and if the process successfully, the browser will ask you to open a new VS Code instance. After, you can click Start call button to open voice communication as well. Click Copy Invite link to invite your co-workers. The link can be sent in any type of electronic media, e.g. email, messaging app or SMS. Currently, the link has a pattern like this : https://prod.liveshare.vsengsaas.visualstudio.com/join?<a unique code>
2. Accept pair invitation
After your co-workers visited the link, the browser will suggest to create a new instance of VS Code.
In order to have a convenience, it’s possible to perform voice communication as well by clicking Join button.
Anything you done will influenced to your co-worker editor as shown below. You will hear your co-worker voice instantly. You or your co-worker capable to change any code and review both side.
During this pandemic period, you still capable to perform pair programming just like your co-worker sit next to you. No barrier between except the location. You still get the benefit from pair programming and the most important is productive when working remotely.