At Codurance, remote work is already part of who we are. The pandemic, as in many other companies, presented challenges and opportunities, which led us to rethink our work method. It was then when remote work made sense and, although we were already using it in our dynamics with clients, it was consolidated as an organizational reality that allows us, among its many benefits, to attract talent beyond geographical boundaries.
For our team it also meant a learning and adaptation process. So, after a good period of time working in this way, with its benefits and challenges, we wanted to offer a circuit in which, through our experience, we shed light on some of the most common practices of Extreme Programming and the challenges of implementing them remotely.
These sessions were led by Javier Chacana, Javier Martínez and Matheus Marabesi, Software Craftspersons at Codurance Spain.Pair Programming is a practice that, as its name suggests, consists of programming by pairs. It is a procedure of constant mutual collaboration that promotes learning and a more agile development by having immediate feedback. The fear or doubts that can be generated about the positive value of this methodology usually revolve around the lack of knowledge about its true benefits. For this reason, we expose some of its advantages.
Positive aspects of pairing:
In Pair Programming, developers share two roles: navigator and driver. They rotate between them, which allows for a more fluid dynamic. The driver is in charge of generating the code while the navigator reviews the work being generated to polish possible errors and make strategic considerations on the design.
Distractions
Working remotely tends to make it easier to lose focus and get distracted for various reasons, whether it's notifications coming through the screen or the inadvertent situations of being at home.
Advice
Be aware of these demands and deviations, know that they can happen and take preventive actions such as muting notifications during the session, closing unnecessary tabs and being in a quiet place. Communication, as in many other occasions, is the key. There are days when you are more concentrated and others when it is more difficult, that's why it is a two-way relationship, you have to express it and look for that support in your partner.
Confusion
In face-to-face the dynamic of the change of roles between the driver and the navigator is clearer and more visual since they are seated side by side and work with a single keyboard. In remote, this presents a new challenge since each one has his own keyboard. To overcome this, one of the fundamental tips is to establish rotation times.
Strategies
For remote pairing, it is important to choose a set up and communication platforms that suit the tastes and comfort of the people involved. Also, having the necessary equipment, such as a good microphone, helps to eliminate the extra effort of trying to understand through the screen. Because of the cognitive load, it is sometimes advisable to remove the camera to relieve the pressure of the mirror effect.
We recommend not looking for a very strict structure for pairing. It should have a form, yes, and there should be purpose and good communication, but there should also be room for individuality to find the best way to adapt it to personal tastes.
The remote adds a point of difficulty for various reasons, such as screen fatigue syndrome, lack of physical closeness, etc. Therefore, it is essential to generate agreements from the beginning so that there is a comfortable base from which to start and compensate for these disadvantages.
Test Driven Development is a software development practice that consists of stating a hypothesis and then corroborating that hypothesis with the code we are writing, which is the minimum possible.
If you practice TDD alone, you are only going to have feedback from your tests, so you don't know if what you are generating looks good or if you are just fulfilling your hypothesis. You need feedback from someone else to get the most out of it. Also, with Pair Programming you can break the impostor syndrome and learn more from each other.
Pair Programming styles or scenarios that may occur depending on the knowledge of the driver and navigator:
In remote, one of the biggest challenges is distraction, we are more prepared to work physically, but we must try to be engaged. There is an important cognitive load and that is why rotation is key, because having control of the keyboard helps to maintain focus. The idea is not that the structure is perfect, but to support each other to maintain concentration.
Establish a rotation policy in advance
Establish the method by which control of the code will be exercised.
Coding standards are general guidelines or agreements within the team that facilitate the task of development and unified code control. This list of rules, also known as code conventions, allows the resulting code to look uniform no matter who wrote it.
Among its benefits, unifying code helps remove the cognitive burden of reading code. If there is a unified base, any developer reading that code will feel more familiar and will be able to work more freely. We believe that, all the more so in remote environments, it is necessary to maintain code standards.
Reasons to implement Coding standards:
Today we have some tools that allow us to formalise and force the adoption of these standards.
Collective Code Ownership: Does everyone do everything?
Ownership can be related to QA, not as a stage but as something holistic and part of that responsibility itself. All these practices help to integrate quality from the beginning.
Remote Pull Request?
At Codurance we prefer Trunk Base Development over Pull Request, although in highly regulated environments or teams that live in very different time zones, Pull Request allows an important level of asynchrony. In this aspect a benefit of remote is the possibility of asynchrony.
Refactoring and technical debt
Refactoring is one of the original core practices of XP and consists of improving the internal structure of a program's source code while preserving its external behavior. Refactoring is something that should happen constantly, it is not rewriting code or fixing bugs.
If you are refactoring it means that you are somehow paying technical debt. Technical debt can be, for example, due to lack of knowledge by not knowing how to solve a problem, or at the design level by trying to improve your time to market. There is also code debt, acquired by bad habits. This debt can be generated consciously or unconsciously and is "paid" by refactoring.
To deal with it, follow up to identify it and constantly refactor. Remotely, it can help to have sessions where this debt is exposed and determine quality gates (actions, code conventions and tests) that help to pay it off.
If you want to keep up to date with everything we do: events, podcasts, blogposts, success stories, workshops, katas, etc. Subscribe to our newsletter and we will send you content to inspire you. Also, we invite you to check our events page where we upload all our sessions and workshops.