Code Review

practice · computer science · organizing-schema

Peer review of source changes before merge, both for quality and shared understanding.

Code Review is the practice of one or more programmers other than the author examining proposed source-code changes before they are merged into a shared codebase. The practice has deep roots — Michael Fagan's formal inspection methodology at IBM in the 1970s ('Fagan inspection') established structured code review as a documented quality practice — and has been substantially transformed by the modern pull-request workflow popularized by GitHub from 2008 onward, which made asynchronous, threaded code review accessible to most software teams. Modern code review serves multiple purposes: defect detection (finding bugs before merge), knowledge sharing (multiple people understand each change), mentorship and learning, design feedback, codebase consistency, and the social and psychological function of shared accountability for code quality. Empirical research on code review effectiveness has accumulated substantially — Smartbear, Microsoft Research, and Google studies broadly support its value while showing that effectiveness depends substantially on review practices (size of changes, reviewer engagement, time pressure). Microsoft's 2013 'Expectations, Outcomes, and Challenges of Modern Code Review' (Bacchelli & Bird) provides foundational empirical work on how code review actually functions in practice.

Originators

Michael Fagan (formal inspection methodology); modern pull-request workflow popularized by GitHub from 2008 high

Year / Decade

1976 (Fagan inspection); 2008 onward (modern pull-request workflow via GitHub) high

Primary sources

Fagan, M.E. (1976). 'Design and Code Inspections to Reduce Errors in Program Development', IBM Systems Journal, Bacchelli, A. & Bird, C. (2013). 'Expectations, Outcomes, and Challenges of Modern Code Review', ICSE 2013, Cohen, J. (2006). Best Kept Secrets of Peer Code Review (Smart Bear) high

Core components

Primary use case

Standard software development practice across most professional engineering organizations; foundation for code quality and shared understanding; basis for many engineering culture and onboarding practices; reference in software engineering research and education; complement to TDD, CI, and other engineering practices; integration with continuous-integration pipelines and merge-protection rules.

Common criticisms

Lineage

Siblings
Pair Programming, Mob Programming