This document discusses anti-patterns of pair programming, including: clumsy communication with little interaction or feedback; debating instead of collaborating by arguing for long periods; being distracted by technology like phones; lacking empathy by being impatient with a pair's knowledge; lacking teamwork by thinking of code as individual work; being self-focused on one's own ideas; and being overly timid by not contributing. It provides strategies for improving pair programming by having active conversations, sharing control, taking breaks together, observing each other's behaviors, and reflecting on how one can improve.
2. Definition
Paraphrase from Extreme Programming Explained:
Pair programming is a dialog between two
people trying to simultaneously program,
analyze, and design software and understand
how to do so better. It is a conversation at many
levels assisted by and focused on one
computer.
It is NOT:
Two people taking turns programming
3. Benefits reminder
One study showed that pairs are only 15% slower than
working solo while reducing bugs by 15 - 50%
Live code review
Names, Coding Conventions, Patterns, Architecture
Shared learning of technology, tools, and domain
Avoiding silos of knowledge
Holding each other accountable to craftsmanship
Focus - less checking out and succumbing to distraction
4. Clumsy Communication
Little interaction
No feedback, questions
Long periods of silence
Breaking apart to solve problem alone
Taking breaks out of sync
Barking or whining
https://www.flickr.com/photos/robbyrussell/2674833047
5. Debating not Collaborating
Analysis paralysis - Basically arguing (usually
politely) for an extended period of time in which
there is a clear difference of opinion
Contributing factors:
Lack of respect for pair (or pair’s ability)
Strong opinions/Over-confidence in own ability
Enjoy solving hard problems alone
Misconception that decision is permanent
6. Distracted by technology
Phone - text, emails, Facebook, Twitter
Laptop - Keeping your own laptop open while pairing
Android/Apple watch - hard to resist looking at it when
it taps you
Instant messaging
http://www.thedustertoday.com/2014/04/technology-today/
7. Lack of Empathy
Lack of patience with pair’s technical knowledge
Failure to allow person to have a bad day
Unwillingness to give pair
time to catch up
8. Lack of teamwork
Thinking of a section of code or even an entire application
as “yours”
Tendency not to use words “we” or “our” but instead say
“I” or “my”
Finding opportunities to work on problems alone while:
Pair takes break
Pair is at lunch
Working alone over the weekend
Staying late/coming in early
9. Self focused
My idea wins no matter what
Won’t give up space/monitor/keyboard
Monitor is not in good position for pair
Drink, phone, etc invading pair’s space
Working close to center of station while pair is
smashed against one side of desk
Always want to work on
YOUR computer, not pair’s
Use different tools, setup,
etc. than rest of team
10. Overly timid
Overly compliant - go along to get along
Keeping silent to avoid confrontation or even healthy
debate
Feeling inferior to other’s technical ability
Going into “Listen” or “Wait and See” mode while
more vocal pair leads
http://post.career.vi/2012/02/tips-for-timid-employees-2/
11. Everyone can add value
“It may be that you are not yourself
luminous, but that you are a
conductor of light. Some people
without possessing genius have a
remarkable power of stimulating it.”
― Sir Arthur Conan Doyle
12. Good Pairing
Active conversation while coding
Both are driving, switch control unceremoniously
Few lengthy debates, quickly pick one idea and
code it to learn
Breaks are synchronized and relatively short
Feeling of steady productivity, day goes fast
End of day you feel weary from focused, hard work
http://wangyan.info/blog/page/2/
13. Discussion
We all do some of these things some of the time.
What is a safe, respectful way to communicate to
someone that he or she is engaging in a pairing
anti-pattern?
14. Strategies to improve
If you notice you are engaging in an anti-pattern, apologize
and correct it.
If someone apologizes, accept it graciously and remember
that we all have bad days
Ask questions:
Is it OK to work on my computer?
How are things for you today?
Do you have lunch plans? I’m working until 4:30, when
are you going home?
15. Strategies to improve
Be observant:
If your pair is checking their phone, ask if everything is OK or if
he or she needs to take a few minutes.
If your pair seems reluctant to take control, deliberately give up
the keyboard/mouse
Try to slow down if your pair seems confused. Step away from
computer and talk for two minutes, don’t leave anyone behind
If your pair takes a break, take one at the same time.
Pair rotation - Basically flight. Get away from the situation.
Be sure to reflect on how YOU could have improved, don’t
focus on the other person’s behavior