Benefits Pair Programming

My experience and what I learn

Pair programming is an agile software development methodology in which two developers work together on the same workstation.

I've been lucky enough to use it a lot over the last few months, and I've seen some important benefits for me

Two people on the same task are better

Working together on the same task might seem like a waste of time, but when we are faced with very complex tasks, knowledge sharing becomes a crucial point.

By sharing knowledge I don't mean only the technical one but also the commercial and non-commercial logic behind our application, no matter the level you are (junior or senior) your knowledge can become an important thing where to start to develop the solution.

A company doesn't exist a real backup of who resolves a task and when other people try to fix something or develop new features, they don't have the correct knowledge to do it. When you are two people on the same task, the first benefit it's come, if one of the two developers isn't there when a bug occurs, having worked together and banging our heads on the problem, allows us to quickly remember why certain choices were made.

Always fresh mind

Working alone, you find yourself being too focused and consuming a lot of energy, and consequently, we reach a major point of stress and some oversights can happen when bugs, unclear code, cases are not taken into consideration etc.

Being two allows you to think of a solution before starting to develop and plan the work optimally, in this way the workflow is much more fluid, and the times in which you have to stop to rethink will be much less, also changing roles, from developer to reviewer and vice versa, it allows us to recharge our batteries and refresh our mind and increase our focus.

The adjustment period from solo programming to collaborative programming was like eating a hot pepper. The first time you try it, you may not like it because you are not used to it. However the more you eat it, the more you like it.

Anonymous Developer

How to do it

How to get organized is a very subjective thing, and I want to share some of my choices with you.

  1. You need to know the person, you are working with and understand them.

    It isn't an easy thing, but the more you work in pairs, the more you begin to understand it.

    Focus a lot on how he works from when he starts his role until he finishes it, and try to understand when he's the time and it's time for a break or it's time to say something to distract him at that moment to get his energy back.

  2. Plan things to do by creating a to-do list.

    Beyond the classic analyzes that are done, always ask questions about his ideas, in this way, you can understand better his way of thinking, and logic and find a possible error in his solutions.

    Don't be shy or fear about your questions, without it you don't grow and this could lead to having to rethink the solution during the phase of coding. Also you don't have to be a yes or no man, it's simple problem-solving and sharing ideas/knowledge.

  3. Start working, and choose the role that suits you best.

    If you develop, try to communicate as much as possible about what you are doing, and ask for advice as well. Talking helps you feel more comfortable when you work with people who see what you do, and improve your communication.

    Also, you are the reviewer, ask your workmate simple questions about what he is doing and if there's one thing you don't know, try to understand it better.

  4. When finish a goal on your to-do list, do a review together and discuss whether the path taken is correct

Improvements on myself

The first thing that improves is the human aspect, communication & empathy, we spend hours with our colleagues, without knowing them. Working closely together allows us to get to know them better and create a strong legal team.

Our focus improves, by changing the roles, it allows us to recover and save energy, to then use it for other things outside of work.

Receiving immediate feedback is a very important thing as we eliminate the doubts and mistakes we have always committed or are about to commit, in this way, we avoid waiting times to find out if what we have done is right or not.

Lastly, an improvement in time management, organizing one's day, over time begins to be simple and not stimulating, but having another person that depends on us becomes a very important thing for ourselves because we become less selfish and help other people to give the best is a very satisfying thing.

Conclusions

Learning to work as a couple isn't an easy thing, it requires a lot of understanding and patience toward the person next to you.

After passing this small step, the personal growth curve increases too much, you learn to communicate, collaborate and better understand people.

Also, your future tasks (whether you are alone or not) will be much easier to understand and solve, as you have shared the knowledge of the team.