The Artima Developer Community
Sponsored Link

Agile Buzz Forum
On Pair Programming vs Code Reviews vs Unit Testing

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Keith Ray

Posts: 658
Nickname: keithray
Registered: May, 2003

Keith Ray is multi-platform software developer and Team Leader
On Pair Programming vs Code Reviews vs Unit Testing Posted: Jul 6, 2006 8:27 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Keith Ray.
Original Post: On Pair Programming vs Code Reviews vs Unit Testing
Feed Title: MemoRanda
Feed URL: http://homepage.mac.com/1/homepage404ErrorPage.html
Feed Description: Keith Ray's notes to be remembered on agile software development, project management, oo programming, and other topics.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Keith Ray
Latest Posts From MemoRanda

Advertisement

Brian Slesinsky:

The problem with traditional code reviews is that they come too late. The best time to get feedback is as soon as you make a mistake, not two hours later (or four hours, or the next day). [...] backtracking is expensive.

Code review while pairing causes no interrupts because the reviewer is already devoted to the task. You get much more detailed review for the same reason. Nobody feels bad about fixing nitpicky stylistic issues right away [...]. Teaching and learning are more efficient; [...]

On a project I was on (medical software), where we did formal code reviews, we reviewed both the unit tests and the code. Without the reviews, the unit tests would have been mostly ineffective because the programmers just didn't think about what could go wrong with the code, and write the tests for that. (We ended up requiring a LOT of post-review changes to improve the unit tests.)

I can imagine that many projects with unit tests (written after the code, rather than test-first) but with no code review nor pair programming have poor test coverage. Adding code reviews to such a project would likely turn up many bugs that the unit tests didn't catch. This doesn't mean that unit tests per se are not effective, it just means that many programmers need to improve their unit-testing skills. (And reviews or pair-programming are two ways to improve those skills.)

Test-Driven Development (TDD) forces developers to develop their unit-testing skills, and combining TDD with pair programming or reviews will make the unit tests even more effective, as the team members offer feedback and ideas to each other.

Pair programming (PP) while doing test-driven development is the most effective combination of collaborative design, reviews, and unit testing that I've experienced. One variant of TDD+PP is "ping-pong programming" described by Dave Hoover here.

Read: On Pair Programming vs Code Reviews vs Unit Testing

Topic: New Dev Build Posted Previous Topic   Next Topic Topic: Paid Splogging

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use