Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Pairing isn't for everyone…

Pivotal Labs
Sunday, January 2, 2011

…but it’s definitely for me.

Will Sargent posted an excellent writeup of the issues he encountered pair programming. I’d like to respond to some of his points. His experience is his, and is inherently valid. I’d like to offer some thoughts, though, as a counterexample.

In general, I love pairing, and never want to give it up. I pair full time and that’s the way I like it. I end up soloing a couple of days each month, and I miss having a pair to help me keep the flow going.

I do have some issues with the full-time pairing lifestyle, chiefly that it’s harder to take breaks, both to refresh yourself and to attend to administrivia, such as email. It’s easy to just write code all day and let other responsibilities slip. But when I’m writing code, I wouldn’t do it any other way.

Keeping flow

I found that in order to pair, I had to act as if I was in a continuous meeting. I had to not just listen to my pair, but appear to be listening; I had to nod in the right places, repeat back what my pair said in active listening fashion. I had to pick the right moment to interject. I tried to model my partner’s mental state in my head so I could see his viewpoint better.

This has not been my experience at all. There are moments when I feel the need to practice active listening, but those moments are not the same moments as when we’re writing code. They’re thinking moments, when we discuss what we’re doing.

They also don’t feel awkward or stressful to me. Partly, I think that this sort of interaction is something I’m good at and which appeals to me. Partly, though, I suspect it’s the type of people I work with. Pivotal only hires people who are great at making close personal connections with each other. That’s why we pair with people for a day during the interview process: we mostly want to see how quickly they can become comfortable with their pair. I feel at home working with every Pivot in the office (as far as I’ve experienced). It doesn’t feel like a meeting with a client, it feels like hanging out with a friend. But then, working with clients at Pivotal usually feels the same way.

Will says that pairing failed for him because he’s an introvert. I’m an introvert, and I love pairing. Introverts take comfort and restoration in being alone or with close friends, while extroverts are more energized by meeting new people and being in larger groups. If I were pairing with the same disconnected energy that Will encountered here, I’d collapse by the end of the day too. The way we fit together at Pivotal, though, I’m energized by pairing with my colleagues.

Writing good code

And if I was writing code, I found something very interesting: I don’t think in English when I write code. I think in code first, and I can translate written code to English.

I’ve found it extremely useful as a design tool to learn to think in English—that is, in the domain—rather than in code. This is what I love about Cucumber. You clarify what you mean in English, and then you translate it into code. In my experience, the design of the code and the user experience improves from developing that strong domain language.

Process

The large part of pair programming was doing things in “The Simplest Possible Way That Could Work.” In practice, this meant doing it the way that it had been done previously, with the least possible amount of change.

When I got to the point where I understood some of the framework, I saw that there were some bugs inherent in the existing design which would make the system act unpredictably in production. In other situations, the design could improved by eliminating some classes and moving some other classes to have a single responsibility.

To me, this was “refactor mercilessly” and “once and only once.” But to my partner, this was a violation of “do the simplest thing that could possibly work.”

This is just a shame; no wonder Will hated his time doing this. First of all, to be clear, the principle of “Do The Simplest Thing That Could Possibly Work” is not part of pair programming, it’s another tenet of XP and other agile practices. It also doesn’t mean what Will’s pair told him it means.

As I’ve always practiced it, DTSTTCPW means two things, because “simplest” has two meanings. First, it means to write a test and then make it pass by expending the least effort possible; this is what Will is talking about here: write the special cases and use poor design to get it done quickly. Then it means to refactor your design to give it the least complexity possible. This cycle is known as “Red, Green, Refactor“.

DTSTTCPW is not a tool to improve your velocity of development. It is a tool to improve your quality of development.

It also went against the daily switching of partners. Whatever you start when you pair has to be finished, and checked in, by the end of the day. If you’re only looking at getting the story done by the end of the day, you’re not interested in hypothetical bugs or refactoring — you don’t have time for them and they’re not budgeted for.

This, to me, is a stupid rule. If it takes you two or three days to do the story right, take the time. It’s not worth sacrificing code quality to improve…actually I’m not sure what they’re trying to improve here.

Spikes only happen at the beginning of an iteration, and this iteration was budgeted at 8 weeks

Two more strange rules. At Pivotal, we work almost exclusively in 1 week iterations. I can’t imagine doing more that 2 weeks. And only spiking at the beginning of an iteration? I’ve never heard of that.

Furthermore, I can’t fathom the motivation behind the rule that you have to deliver your code by the end of the day if you’re not going to give it to the customer for another two months.

There is no ownership in pair programming. You’re working on a different piece every day, with a different partner. Everyone owns all the code equally. No-one really has responsibility for a single piece of it. Pair programming views this as a strength.

True, I view it as a strength myself. I enjoy not having single responsibility for any piece of code. I like knowing that any of my teammates can cover for me at any time, and that I can do the same in return. There is also joy for me in a Buddhist-like non-attachment to the code. I am not my code, and I don’t take changes to code I wrote (or co-wrote) personally. That means I don’t defend stupid choices for the sake of my ego.

Conclusion

There’s really one rule that comes out of all of this:

Hire great people who work well together.

That’s really the secret to any endeavor. Get a group of the best who work well in a particular way. That might be pairing, it might be daily code review, heck, it might be Waterfall. Polarize the team. Make sure you’re all pointing in the same direction—whatever that direction is. Everything else is dogma.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

3 Comments

  1. Alex Chaffee says:

    I shared this on Google Reader and my brother pointed out:

    > “it’s another tenant of XP”
    >
    > A pair would have caught this misapropism… like nuts and gum, everything is better pared.

    January 4, 2011 at 6:24 am

  2. Peter Jaros says:

    Hah, very true. I have removed the offending *malapropism*. :)

    January 4, 2011 at 11:38 am

  3. Joe Moore says:

    Awesome response to Will’s firestorm-inducing post.

    One aspect of Pivotal’s XP process and of XP in general that has been coming up often in conversations lately, and I feel it needs to be addressed: shared ownership vs. individual ownership.

    Like Peter, I feel that pairing and the implicit shared ownership pairing promotes is a huge strength.

    That said, consultants in general are a step removed from the products we are developing. Regardless of how much we care about our clients and how badly we want them to succeed, the product is not *ours.* We don’t have as much skin in the game: we didn’t quit our stable job to join this company, we don’t have boatloads of stock options, and we don’t have aspirations to change the world with this product. It’s not our baby.

    Based on recent conversations with former consultants who are now developers at product companies, I think agile/XP/pair programming believers should acknowledge that feeling product ownership is important. We should explore how our process can support the positive aspects of _product ownership_ without reenforcing the negative aspects of _code ownership_. Positives include passionate interest, deep knowledge, a sense of pride. Negatives include inflexibility, knowledge silos, and drift from product vision.

    One super-agile company has addressed the ownership conundrum by estimating courser-grained feature stories. They still pair program almost 100%, but the developers have more of a hand in design decisions than consultants might; after all, it’s their product, too. Since they have more influence over the product’s design, developers have a deeper feeling of ownership than they might if they had simply implemented mockups from the designer.

    I don’t know how much design influence developers have at [Grockit](http://grockit.com/ “Grockit Test Prep – SAT, ACT, GMAT, GRE, and LSAT”) (where Will worked) and it likely would still not satisfy the alone-in-a-corner-with-their-headphones-on types, but giving product developers more design influence can satisfy the need for ownership while still supporting pair programming.

    January 5, 2011 at 7:42 am

Add New Comment Cancel reply

Your email address will not be published.

Pivotal Labs

Pivotal Labs

Recent Posts

  • Does the set of all sets contain itself?
  • Standup 3/8/2012
  • Standup 3/7/2012
Subscribe to Pivotal's Feed

Author Topics

riddles (1)
agile (167)
capistrano (2)
rails (26)
movember (1)
git (10)
railsdoc (1)
object-design (1)
bdd (3)
cucumber (3)
linkedin (1)
oauth (1)
ruby (17)
tdd (2)
lvh.me (1)
rails 3.1.1 (1)
selenium (6)
homebrew (1)
mysql (5)
rvm (1)
sproutcore (1)
paperclip (2)
pry (1)
amazon (1)
heroku (1)
rails3 (2)
jasmine (3)
design (3)
process (12)
productivity (8)
learning (1)
olin (1)
migrations (2)
mongodb (2)
devise (2)
javascript (13)
rubymine (4)
ipad (1)
whurl (1)
head.js (1)
pairing (2)
tools (4)
pair programming (1)
rspec (10)
rspec2 (1)
ruby19 (1)
incubation (3)
startup (5)
api (1)
presenter (1)
vanna (1)
pivotal tracker (5)
capybara (1)
fakeweb (1)
webmock (1)
intern (1)
ruby on rails (25)
meetup (1)
textmate (1)
testing (20)
solr (4)
nyc-standup (11)
community (1)
opensource (3)
activerecord (4)
chrome (1)
mp4 (1)
activeresource (1)
flash (3)
neo4j (1)
nginx (1)
rsoc (1)
meta programming (1)
agile standup (7)
government (3)
webos (4)
xss (1)
jquery (1)
bundler (2)
ci (3)
gems (5)
postgresql (1)
geminstaller (1)
gemcutter (1)
cloud (2)
rack (2)
refraction (1)
gem (5)
refactoring (1)
validations (1)
webrat (1)
engine-yard (1)
firefox (2)
jsunit (1)
mongrel (2)
thin (1)
unicorn (1)
facebook (1)
rubygems (5)
jruby (1)
actioncontroller (1)
rails 2.3 (1)
palmpre (1)
autotest (1)
mac (2)
hosting (1)
goruco (11)
database (3)
railsconf (11)
gogaruco (4)
deployment (4)
github (1)
ie (1)
ajax (1)
intellij (1)
json (1)
asset packaging (1)
polonium (1)
character encoding (1)
utf-8 (1)
test (3)
civics (1)
hpricot (1)
rake (3)
sms (1)
unicode (1)
iphone (1)
java (1)
safari (1)
memory leaks (1)
rr (3)
editor (1)
css (1)
nyc (3)
performance (5)
fun (5)
enterprise rails (1)
health (1)
new and cool (1)
general (2)
treetop (1)
errors (1)
stack (1)
trace (1)
cache (1)
cookies (1)
freesoftware (1)
conferences (1)
development (1)
driven (1)
proxy (1)
caching (1)
peertopatent (1)
languages (1)
rest (2)
rubyforge (1)
sake (1)
file (1)
upload (1)
constants (1)
osx (1)
terminal (1)
pairprogramming (2)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >