Effective remote pair programming – a practical guide to tools and best practices
Nowadays, we’re living in weird times, that goes without saying. Social distancing, masks, vaccinations, tests – all of this is new to us and we still need to learn how to live with them. COVID-19 has hit many industries, including the IT sector. Many companies have decided to start remote work models and plan to extend them even after the pandemic ends. Outsourcing is also becoming an increasingly popular alternative to boosting development capacity. According to Business Wire, the global IT Outsourcing Market is growing and shows signs of developing further in the coming years. Numerous businesses, having seen the value of remote work, have decided to take it one step further and have turned to software development companies to access the best talents farther away and obtain other outsourcing benefits.
At the same time remote work has both pros and cons. On the one hand, employees are not forced to commute to work on a daily basis, can work from home, cooperate with teammates all over the globe and it’s definitely better for the environment. But on the other hand, our contact with co-workers is limited to online messaging, which can be tough for some people, especially developers. Speaking for myself, sometimes I spend long time working on a task, while in the office I would simply talk to a teammate sitting next to me and ask for help. And I’m sure there are more people like me. So, how to handle remote work and stay productive online? Luckily, there is a way – remote pair programming.
Pair programming – do we need it?
Experienced software engineers probably know the idea of pair/mob programming and they’ve used it in the past, at least once. In my opinion, it is a great tool for sharing knowledge within a team in a short period of time. During pair programming sessions it is possible to establish a common way of working to find great solutions faster (a little brainstorming never killed nobody?) and become more productive, especially for teams scattered around the world. It is also a good opportunity to create a guide of best coding practices you want your team to implement and a chance to try something new. Maybe you’ve read about a new framework but don’t want to test it on your own? Invite your teammate to a pair-programming session!
Pair programming is also a great way to onboard new team members. Guided by an expert, they will get familiar with code faster than if they would have to figure everything out on their own. It’s also a perfect way of shortening the distance between team members working remotely. While these are my personal opinions, I think most of my co-workers will agree with me. The only issue we had – coding together when we’re not in the office – has been solved. How we do it? There’s nothing simpler – we just use available tool
Before you start
If you’re already hyped about coding together – hold your horses, you’ll need a little more guidance before you start. At the beginning, ask yourself – will this be a one-time session or a repetitive activity? If you choose the second option, set a fixed timeslot. When I was being onboarded into my current team, we had 2 hour meetings scheduled for each day of the week and at the morning standup we would decide if we wanted to code together or skip the remote pair programming session. We also tried mob programming and an idea called ‘driver’ – one person shared a session and typed while the rest of the team followed along and discussed the code. Driver was also sharing his screen to show everything what he was doing – searching on the internet, building web application, testing it manually, etc. After 30 minutes we changed ‘driver’ and gave another developer a chance to be in the limelight. It was pretty cool, because it motivated you to pay attention all the time and enabled you to get real-time, practical feedback. Yet, while I appreciate this experience and know I learned a lot, I think it could have been more productive if all team members were allowed to edit a code simultaneously.
We changed our approach and currently we set aside an hour and a half when we want to do a mob programming session with all developers or pick one person to work with on particular task in pair. It is a great way to share our knowledge and talk about a code with a colleague that maybe understands given problem better than you do. I really like it, because you can ask someone about anything you want, anytime, learn new things, create a common way of working and get to know each other better. You don’t feel like you work alone in your home office ;).
I also recommend discussing sprint plans at it’s the beginning with your teammates and Product Owner. This way you will be able to decide, based on priorities, who can/should participate in remote pair programming and when so that boosts effectiveness rather than become a burden. Another important element is picking the pairs for remote pair programming. Make sure these people like each other (or at least tolerate one another), consider who can learn the most from whom and if they have similar ways of thinking and solving problems.
At the same time, bear in mind that not everyone will be happy about working together. Some of us prefer peace, quiet and coding alone. That’s why pair programming should be optional! Don’t push everyone to attend, since forcing people won’t bring any benefits.
Remote pair programming tools
Knowing the basics, we can move on to tools that facilitate remote pair programming. Every developer (backend or frontend) has a favorite IDE, the one that makes them feel right at home. Some of us are fans of IntelliJ, others prefer Eclipse, and there are also enthusiasts of Visual Studio Code. No matter which group you are in, you’ll definitely find a great plugin for your remote pair programming adventure. Fasten your seatbelts, here we go!
Live Share is a plugin for Visual Studio Code created by Microsoft. It enables you to simultaneously edit and debug with teammates, share your terminal, observe a localhost web app and make calls. To start working with it, you need to download a plugin and register with your Microsoft or GitHub account. After registration you’re ready to start sharing your session with others by inviting them or sharing a link with them (both in edit and read-only mode). By default, they will automatically join your collaboration session and you will be notified, giving you an option to remove a participant from a session if you want.
Participants can edit files (if you allow them to) and see your terminal when it’s shared in a session. They can follow each participant by clicking on the circle icon next to their names. One piece of advice from me – be careful with using ctrl + z! Reverting changes in Live Share could be tricky and by an accident you can remove a huge part of the code crafted by one of your teammates at the same time!
Code With Me
The Code With Me plugin is dedicated to JetBrains IDEs, just like IntelliJ or WebStorm, plugins very popular among Java Developers, are dedicated to it. It allows you to do standard pair-programming and share your IDE with a single participant or create a mob programming session for your team. I noticed one limitation – the maximum number of people in one session who can actively type is 5, so it’s not a perfect solution if your team is bigger than that and all of you want to contribute. But let’s go back to its advantages. Another great feature is the possibility to simultaneously multi edit different files by session attendees – they can work independently if they want and achieve a goal faster. As a leader, you can track changes made by co-workers and commit them or revert them safely. Code With Me has an option to follow participants, similar to Live Share, but you can also get everyone to follow you. It is very useful when you want, for example, to onboard a new co-worker and get him/her familiar with the code, under your supervision.
How to create a pair-programming session? Piece of cake! Set permissions for guests and share a link with them – that’s all! During the session, you can use calls, also with a video, so you don’t need to combine it with any other communication device. I highly encourage you to try the Code With Me plugin, it’s fantastic!
As mentioned before, every developer has a favorite IDE. So, what about a situation when the entire team works from home, prefers different editors, but still wants to code together? Install the CodeTogether plugin! ? This tool gives you the chance to host or join live coding sessions from IntelliJ, Eclipse or VS Code. It’s a perfect option for dispersed teams, who want to spend some time sharing their knowledge and experience during pair programming. With driving/editing privileges controlled by the host, he/she can decide if participants can explore files by themselves, work in groups or code simultaneously in one file. If you feel like you want to work on a code alone for a while, you will be able to create your personal room from the Coding Rooms node in the CodeTogether view, just for you – none of your colleague won’t join you there. CodeTogether is really similar to the Code With Me plugin described earlier, with one significant difference – cross-IDE support.
Personally, I recommend you CodeTogether plugin, mostly because of cross-IDE support and no limit of attendants – feature really important for mob programming. It provides a lot of great functionalities, like a good support for multi-editing code, video calls during a session, sharing terminal and possibility to create several rooms for smaller groups when it’s needed.
Work remotely, not alone
To sum up, the choice of available tools for remote pair programming is extensive and every developer will certainly be able to find something that fits his/her needs. Personally, I encourage you to try them – maybe pair programming will make you more productive and you will gain new skills without leaving your home? I view it as a practical workaround to getting together in an office, which is impossible for me because the majority of my team is living in different European countries. It is also a great occasion to get to know my co-workers better. As they say – nothing connects people more than a common enemy, which in this case could be a hard-to-find bug or a tricky piece of code in need of refactoring?. If you want to join our team check out our job offers, or if you want us to become a part of your team, fill out the contact form below!