Facts and fallacies - Fact 37

Rigorous inspections can remove up to 90 percent of errors from a software product before the first test case is run

Daniel Falster
Post-doctoral research fellow, Macquarie University


What is code review?

  1. Inspection of code by a group

    Presnetation of & intensive review of your code.

  2. A 'breakthrough tool'

    according to Glass, 2003

  3. Catches between 30-90% of defects

    Depeneding on:

    • number and type of peer reviews,
    • size and complexity of the system,
    • frequency of defects better caught by execution. (Boehm & Basili 2001)

Why does it work?

  1. Two brains better than one.

    People think in different ways, make different assumptions, notice different things.

  2. Tests programmers logic

    Can someone else follow your logic?

  3. Encourgaes you to solve problems yourself.

    Explaining something to someone else forces you to focus on details.

Why so unpopular?

  1. It's cheap, so not promoted

    Companies hype tools they can sell.

  2. It's hard, so eagerly avoided

    Reviewing code is strenuous.

  3. Backend part of software development often ignored

    Or taken for granted.

  4. Could lead to bad morale

    Need to encourage positive, non-competitive atmosphere.


  1. Do it early and often

    Cheaper to fix problems when caught early.

  2. Combine with other error detection tools

    Code review, analysis tools, and testing catch different classes of defects at different points in the development cycle. (Boehm & Basili 2001)