Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Pair programming - first impressions
12 Posts
Pair programming - first impressions

Hi,

After three weeks of pair programming with a jr Rails dev I wanted to share some impressions.

First: it's true that working this way is more fun. More laughter and chatter - but it doesn't disrupt the work at all or break "the flow" as we do it in between tasks/user stories. Previously when one of us had something funny to say, the other one was immersed in a task.

Also, it seems there's no better way to train somebody in workflow-related concepts like BDD or advanced Git usage. I really couldn't give my co-worker enough feedback while doing a code-review.

What else... it seems I'm under less stress. I don't have to juggle between doing my task and code reviews. At the same time I noticed I'm working harder - the co-worker just keeps me focused.

I also found it's better for my back, wrists and sight. Less typing, more drawing on the whiteboard (I mean a real physical one standing in the workshop).

I noticed that I tend to get better ideas when I pause and get up from the keyboard. And before I start to implement a new great idea, I must explain it - which makes sure I though it through. I mean something along lines of: "if you can't explain it in simple words - you don't understand it" (BTW who said that? Einstein like simplicity - was it him?).

Now as for the productivity bottom line - I'm not yet sure. But I think we're producing only slightly less code/features, but the quality is significantly better. If so - there's a net productivity increase. More fun and more productivity - yay!

Cheers, Wojciech

wow..great. I am really impressed by your positive thinking..

Wojciesh ... I wish i was paired with you.

Pairing really is one of the best ways to learn. Glad to hear its working well for you and your team. We are big advocates of pairing all the time at Hashrocket.

I remember my first pair-programming session being very similar to nude modelling. Much less nudity, but all the fear of exposure to others. Developers always seem to start any code sharing with the phrase, "Please don't judge this too harshly..." or "I was under a deadline...", and so on. It takes guts to let someone watch you code in real time, including any stupid mistakes you make along the way.

By the end it really was more fun. And productive. If it was feasible with my current contract, I'd love to pair because you learn so much, and it's a natural cure for my ADD :)

During my Pragmatic Studios rails training years ago, Dave Thomas said "I've never pair programmed and NOT learned something new". I absolutely agree.

Jaime - comparison to nude modeling was spot on!

Adam, Hashrocket is one of groups that inspired me to try pair-programming. You and Pivotal Labs seem well established companies that say pairing as a core practice has worked great for them.

BTW I've seen a nice argument for pair programming in a presentation by "Ian McFarland":http://twitter.com/imf from Pivotal:

bq. And stop whining! You do it already when you get stuck on something.

(slides at: http://bit.ly/8tisa2)

I found out though Pair Programming doesn't always impose self-discipline. I needed to learn when to shut up and let the driver drive when I navigate. Wasn't easy - perhaps it's that feminine side of me (-: Do you guys know good tutorials or books? Googling for "navigator tips" yields interesting results - but not very helpful in this particular case.

It's great to see this much positive response. I have also done pair programming with my senior but i afraid of suggesting something because he was too senior and experienced then me. but I really loved pair programming and learnt a lot. and yeah am pretty sure that scope of learning is very vast in pair programming.

I cut my teeth on paired programming at Pivotal Labs, and love it for many of the reasons already cited. When pairing, the day seems to go by very quickly and a lot gets accomplished. I also notice that I don't get distracted and check email or surf the web nearly as frequently.

There are a couple of caveats, though. One I've noticed is that if someone with a strong, outgoing personality is paired up with a shy programmer, sometimes the strong one can dominate the situation and wind up bearing most of the effort. A good way to avoid this is to find a natural switching pattern. One example is for one programmer to write a test, and the other programmer making it pass, and then vice-versa.

I also agree pair programming is fun. But I have read it in several places that's the 2 people working in pair should be of same competency. Otherwise the mentoring can become spoon feeding. Infact XP(Extreme Programming) also suggest that level of programmer doing pair programming should be almost equal. What do you think?

bq. if you can’t explain it in simple words – you don’t understand it

Both Einstein and Feynman have been attributed with similar phrasing. Feynman used to say, "If you can't explain something to a first year student, then you haven't really understood it" and Einstein said "You do not really understand something unless you can explain it to your grandmother"

12 Posts
Login to add your message