Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 3
    There seems to be some misinformation in the current answer. Collective ownership does not mean "all eyes on all code all the time." Refactoring has nothing to do with defect detection. Unit tests and inspection serve different purposes and in fact can each uncover different kinds of defects (examples in other answers). Pair programming, while a form of review, is not a true replacement for e.g. Fagan inspection. Your personal experience seems atypical, especially concerning design errors -- what kind of reviews did you do? How did you measure efficiency for the reviews? Commented Sep 25, 2011 at 20:23
  • 1
    Time performing review vs. defects found and their severity. We compared that with the same metrics against unit testing. Issues discovered during code review were almost always code formatting related, and they took longer to perform. The same time spent doing unit tests uncovered real problems and took no longer to prepare and do. Commented Feb 6, 2015 at 12:03
  • "Collective Ownership": In my experience this is often an illusion: reviewers often nitpick at small details and do not see the big picture in code written by others. Then, when it comes to modifying that code, they do not really understand it and they either (1) do not dare to change it, or (2) they extensively rewrite it so that they can understand it. Approach (2) often has two side-effects: (A) they introduce bugs, and (B) the original developer does not understand the code any more. Commented Jun 25, 2017 at 11:42
  • Point B shows that often what happens is not collective ownership but individual ownership shifting from one developer to another all the time. In this way, each team member roughly knows what the code does and how it is organized, but no one really understands it deeply. A true collective code ownership would require much more time and discussion about the code to get a common understanding, but often this time is simply not available. Commented Jun 25, 2017 at 11:44