agile labs pair_programming

Pairing like a Pivot

Pairing is an amazing activity if you and your pair can do it right, it is one of the things we value most here at Pivotal Labs. It is also one of my favorite aspects of extreme programming since it’s the thing that makes me learn, teach and grow everyday as an engineer.

Being good at it helps you and your pair enjoy the workday, keep motivated and therefore, productive.

During the last months I have learned a lot about pair programming and I am trying to perfect this everyday. I have noticed a couple things that I think can help a person be a better pair.

 

Talking over thinking

When we are working alone we talk to ourselves internally while we think. That thinking ideally should come out of your mouth so you can “think” as a pair. When you spend minutes thinking on your own and then start trying to explain or implement it your pair is very much likely not going to understand your whole thought process.

This seems pretty obvious at first but it is very hard to put into action. If you come from a non-pairing environment you may not be used to put your raw ideas out early in your thought process.

Listen (for real)

Some people have a very active mind and this can be distracting when you’re listening to someone else’s thought process, one simple sentence might trigger your mind into processing your own solution and all of a sudden you’re not listening anymore.

Not everyone is capable of simultaneously think and listen at the same time, this may seem ridiculous if you are. But it is very likely that you lose at least some percentage of your listening capability if you are thinking too much. Finding that balance is essential.

This is a problem that I have myself, often times I will ask for my pair to repeat the whole thing because I accidentally stopped paying attention. It is okay to ask your pair to repeat, but ideally you should be listening and paying attention all the time.

Be friendly

Constructing a friendly environment is essential for an efficient pairing session. No one likes to spend ours working with someone they don’t like. I am not saying you have to be best friends with everyone you pair with, but be nice to people and they will be nice to you.

A work day in a friendly environment is going to go by faster, and you will get the same amount of work done, probably even more.

It is ok to ask your pair about their day, weekend, family, sports whatever. It is good to bind to some extent. This will only help make your pairing sessions more enjoyable and productive. Again, find the balance, don’t spent half the day talking about baseball, you won’t get anything done if you do that.

Take breaks

Taking breaks helps keep your mind sane and helps you figure out things you wouldn’t if you just stood there trying. Taking breaks with your pair also helps building that healthy relationship that leads to a more enjoyable environment that I talked about.

A lot of us Pivots like to play a quick ping-pong game once in a while, that is a very good break activity, and I recently learned that it helps keep your heart healthy. If you don’t like ping-ping or don’t have a table available you can figure other short activities too. A good out of the box conversation is also pretty efficient.

Be gentle (don’t be a jerk)

Sometimes you will be in a situation where you are the most knowledgeable person of the pair. Take advantage of these situations to help you pair grow, and you will grow even more.

Do not act as you are superior, do not pressure your pair to get things done, each one has his own speed and learning process, help by giving tips and directing the person to the solution. Do not take over rudely, if you feel like you have to take over do it so in a way that it feels natural to both of you.

Motivate. Being the weak link can be very depressing for some people, you cannot let this happen, help when there are problems, high-five on success. Compliment your pair every time you feel like they deserve.

Be curious, be confused, not passive

Sometimes you will be in a situation where you don’t know the technology, or you’re not confortable with the process yet. In other words, sometimes you will feel like you’re the weak link.

Ask questions, ask all the questions, it is ok to have questions. It is not ok to stand quiet doing nothing while you don’t understand a thing your pair is doing.

Pair programming is this magical thing where you can achieve great things even if you don’t know a technology or a process. Take advantage of that. If you’re pairing with someone with vast experience in something, extract everything you can from that person. Soon enough you will be that person for someone else.

Absolutely do not become passive, you’re not pairing if you’re just watching someone code. Sometimes that happen, and it is ok if you realize that you could have asked more questions and learned more about it so you won’t let it happen next time.

Try to drive even when you are not sure. You pair is likely to correct you when you make mistakes and you will learn faster by actually doing it.

Understand

Not everyday is a perfect day for everyone. You have to understand when your pair is not on their best shape, don’t let that make your day boring or hard, keep motivated and focused so maybe you can make your pair’s day a better one.

People make mistakes and you have to forgive, it will happen to everyone. You will undoubtedly move your pair to the wrong direction one day and you’ll hit a big solid wall. Don’t blame your pair if they come up with an idea that happen to be not as good as they thought at first.

Driving/navigating

Driving and navigating are two very different activities that you perform while pairing. A good balance between driving and navigating is something that you should look for.

Just as a quick refresher: driver is the person controlling the keyboard and navigator is the person that, well, is not.

If you drive for too long you might put your pair to sleep, specially if you dont follow rule #1: Talk, don’t think. Driving is very good when you’re learning something, your mind will remember things that you did better than things that you watched or thought about.

If you’re navigating for too long you might feel like you’re losing ownership of whatever is being done. Somedays that I spent driving too long my navigators would say that “I” did something when really “we” did. You will also, in general, memorize a little bit less when you don’t drive. This is not true for every single person, but it is a fairly accurate estimate.

 

I did not mention Test Driven Development, which is something that helps pairs to understand each other, TDD is a whole topic on its own. I did not mention driving/navigating balance techniques, which I also think is it’s own topic. I did not mention remote pairing techniques.

 

In conclusion, pairing is magical, you will achieve things you are not capable to do on your own. You will be way more recognized for the good things you do. You will learn to recognize other’s accomplishments. But more important, you will learn.

Personally, I have a hard time working alone after I learned the benefits of pairing, it is just not as fun.

And thank you if you read this far, I’m sorry for the very long post, I hope you enjoyed reading it.