top | item 20892576

(no title)

royalghost | 6 years ago

When a development team is following XP Principles, mostly two developers are doing Pair Programming with Test Driven Development (TDD) and rotating pairs every week, how much value will it add with code review ? We recently had a discussion where some of us think it is still good to skim through the change request by a second pair while other's think it's just a waste of time.

I am curious to know if code review is encouraged by a second pair in following XP practices ?

discuss

order

CobrastanJorji|6 years ago

The point of reviewing code is to get a second set of eyes on it, partly for perspective and partly to keep you honest. Pair programming is almost strictly better.

The tradeoff is that you've now effectively made the reviewer a full-time participant in the development process, which is much more of a resource drain than a code review role would have been. This may end up being a very wise investment, but smarter people than me have strong opinions on both sides of that one.

UK-Al05|6 years ago

There's been various studies saying that pair programming is not as effective as code review.

It's easy to see why. Code review you can focus on some code for awhile, pair programming you have to move on with the pace.

bruckie|6 years ago

At Google if person 1 and person 2 pair, then one can be the official author, and one can be the reviewer. Depending on the people and the change, they may also ask for review from others as well.

packetslave|6 years ago

Jeff Dean and Sanjay Ghemawat coded like this for years.

hankstenberg|6 years ago

Good point. At our company, we try to always assign two devs to more complex tasks, the actual developer and a "feature buddy". They don't actually PP the entire thing, but they discuss the strategy in pairs before starting to code and clarify question along the way in pairs. When the feature is done, the buddy will already have a very good idea about the feature and already agree with the fundamental decisions that were made along the way.