Skip to content
GabineteTools for thinking

No. 2044Workflow and delivery

Code Review (software inspection and modern code review)

Michael Fagan (formal inspec… · 1976

Wooden door with two brass latches holding a strip of paper; a red pin marks a hidden tear and awaits a corrected strip.

The table / Model card · No. 2044 · Workflow and delivery

Code Review (software inspection and modern code review)

Another pair of eyes on every change before it ships.

Also known as 5-Level Code Review · Pair-Review Workflow · Weighted 'No Code Review Merge' Limit

The essentials

What it is

What it solves

How do you catch defects and poor design that the author cannot see, and keep a team's knowledge of the codebase shared, before changes reach production?

When to use it

Use it on every change to shared or production code, especially security-sensitive, safety-critical or complex modules, and as a mentoring channel for new team members.

Where it comes from

Michael Fagan published 'Design and code inspections to reduce errors in program development' in the IBM Systems Journal in 1976, describing a formal process with planning, overview, preparation, an inspection meeting, rework and follow-up. Peer review of code existed informally before, so 1976 marks the first formally described process. Lightweight, change-based review spread with version control tools, and Bacchelli and Bird's 2013 study at Microsoft helped define 'modern code review'.

Michael Fagan · 1976

How it works

Authors are blind to their own assumptions. A reviewer reads the change with fresh eyes and a different mental model, so mismatches between intent and code surface. Formal inspection makes this rigorous with roles, checklists and defect logging. Modern review makes it cheap and routine: every change is small, reviewed in a tool, and blocked from merging until approved. Effectiveness drops when reviewers go too fast or changes are too large, so reviews work best on small diffs read at a moderate pace. Beyond defects, the review conversation spreads conventions and design knowledge across the team.

You need

A small, self-contained change with a description, the relevant context or ticket, automated test and static-analysis results, and one or more reviewers with knowledge of the area.

You get

Comments and requested changes, an approve or reject decision, fixed defects, and a record of the discussion.

Case

Illustrative case

Hearthware, a fictional smart-thermostat maker, finds that 30% of firmware pull requests exceed 800 changed lines and wait 3 days for review. It sets a soft limit of 400 lines, adds a checklist for memory and concurrency issues, and asks reviewers to respond within 1 working day. Over two quarters, median review time falls to 6 hours and escaped concurrency defects drop from 7 to 2. Most review comments still concern naming and structure, which the team accepts as a maintainability gain.

A fictional company used to explain the model.

Caution

When to avoid it

  • Do not rely on it as the main way to find functional bugs; tests and static analysis are better for that.
  • Formal inspection is too heavy for throwaway prototypes.
  • Mandatory review on trivial changes can slow flow if turnaround is slow.

Common mistakes

  • Submitting very large changes that reviewers skim.
  • Treating review as gatekeeping or personal critique.
  • Spending review time on style issues a linter could catch.
  • Letting reviews sit for days.
  • Assuming an approval means the code is bug-free.

Known weaknesses

  • Finds fewer functional bugs than teams often expect.
  • Slow turnaround can become a delivery bottleneck.
  • Effectiveness drops sharply on large changes.
  • Can become adversarial without good norms.

How to apply it in 6 steps

How to apply it

Code Review (software inspection and modern code review)

6 steps

Use the arrow keys to move between steps, Home and End for the first and last, and Enter to fold or unfold the booklet.

View all 6 steps
  1. Prepare a small change

    The author keeps the change focused and writes a description of intent and testing.

  2. Run automated checks

    Tests, linters and static analysis run first so humans focus on design and logic.

  3. Assign reviewers

    Pick one or two people who know the area, plus a learner when useful.

  4. Review the change

    Reviewers read for correctness, design, readability and risk, at a pace that allows real understanding.

  5. Discuss and revise

    The author answers comments and updates the change until concerns are resolved.

  6. Approve and merge

    The change is approved, merged and, for inspections, defect data is recorded.

Which decisions it helps with

Decision profile

A phased process to take action on processes and operations.

Keyboard: Tab to the sheet, use the arrows to explore the assessments and their questions, and press Escape to close the note.

IIdentity

Type of tool
Phased process
Decision stage
Plan the work, roles and deadlines
What it applies to
Processes and operations
Discipline
Agile and software development
What it produces
A sequence of phases completed in order

IIIResources required

  • TimeOne session (half a day or a full day)
  • PeopleA small group (2 to 8)
  • DataA few readily available facts
  • ExpertiseAnyone who has read a page of instructions
  • Time horizonDays or weeks
  • ScopeOne team
  • FrequencyA regular practice
The team’s own knowledge is enough

IITen axes

The dot shows which end the model favours. A hollow dot means no clear preference.

  • DirectionExecution
  • Top-downBottom-up
  • PeopleProcesses
  • Generate optionsNarrow down options
  • Step-by-step analysisIntuition and experience
  • A strict sequence of stepsA flexible framework
  • Protect what we haveTake a risk
  • Improve what we haveFundamental change
  • Inside the organisationOutside the organisation
  • Understand firstmixedAct now

IVUseful when

  • We may be fooling ourselves

Applicable traits

  • How it supports actionDecide what comes first
How was this profile calculated?

An automated system reads each model card and answers the same questions for every model. This profile has answers for 77 of 77. No answers are entered by hand.

A very high probability counts as “yes” and a very low one as “no”. Intermediate answers are hidden.

On the axes, mixed means the model favours neither end.

How it works →

Thinking space

Workflow and delivery

They organize and accelerate day-to-day delivery: Kanban, DevOps, development cycles, automation and work standards.

Membership: 25 % · also “Diagnosing processes” (14 %)

View in the atlas of spaces →

Each point is a model. Distance reflects answers to the decision questions. Light points share this model’s space.

Similar models

Verified sources

Use the arrow keys to move between sources.

Original work

  1. Fagan, M. E. (1976). Design and code inspections to reduce errors in program development. IBM Systems Journal, 15(3), 182-211.Founding description of formal software inspection. Crossref record shows title, M. E. Fagan, IBM Systems Journal vol. 15, pp. 182-211, 1976.View source: Design and code inspections to reduce errors in program development (opens in a new tab) ↗

Key development

  1. Bacchelli, A. and Bird, C. (2013). Expectations, outcomes, and challenges of modern code review. 35th International Conference on Software Engineering (ICSE 2013), 712-721.Study at Microsoft showing that developers expect reviews to find defects but that knowledge transfer and awareness are major outcomes. Crossref confirms title, authors, ICSE 2013, pp. 712-721.View source: Expectations, outcomes, and challenges of modern code review (opens in a new tab) ↗
  2. Sadowski, C., Soderberg, E., Church, L., Sipko, M. and Bacchelli, A. (2018). Modern code review: a case study at Google. Proceedings of the 40th International Conference on Software Engineering: Software Engineering in Practice, 181-190.Large-scale description of lightweight review at Google. Crossref record shows main title 'Modern code review', authors Sadowski, Soderberg, Church, Sipko, Bacchelli, ICSE-SEIP 2018, pp. 181-190; the subtitle 'a case study at Google' is as cited on Wikipedia.View source: Modern code review: a case study at Google (opens in a new tab) ↗

Critique

  1. Bosu, A., Greiler, M. and Bird, C. (2015). Characteristics of Useful Code Reviews: An Empirical Study at Microsoft. 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.Analyses which review comments developers find useful, showing that many comments do not lead to changes. Crossref confirms title, three authors, MSR 2015.View source: Characteristics of Useful Code Reviews: An Empirical Study at Microsoft (opens in a new tab) ↗

Wikipedia article (opens in a new tab) ↗