liveBook · Manning

Code review

As explained in 100 Java Mistakes and How to Avoid Them

Code review is the systematic examination of source code by one or more developers to identify defects and improve quality.

Code review is an organized peer examination of committed changes. A reviewer with different experience or background can catch defects the author overlooked before release, while also improving architecture, readability, performance, knowledge sharing, and mentoring. section 1.1

Use code review as one part of a broader quality strategy:

  • Combine code reviews with static analysis and automated testing because different approaches expose different kinds of bugs. section 1.8
  • Review more than correctness: consider architecture, readability, performance, and opportunities for knowledge sharing. section 1.1
  • Distinguish code review from pair programming: pair programming reviews code while it is written, but demands more discipline. section 1.1
  • Treat review as prevention rather than a complete guarantee; no single quality technique catches every bug. section 1.8

The second look

A developer commits a change that appears correct to its author. A peer with different experience notices a defect before release and also suggests a clearer design or more readable implementation. The same collaborative review performed while the code is being written becomes pair programming. section 1.1

How 100 Java Mistakes and How to Avoid Them covers it

How deep it goes
Defines the review process and its benefits, but defers detailed guidance on making reviews efficient.
Examples
Uses committed changes, differing reviewer perspectives, and collaborative editing while code is written as contrasting examples.
What you can do after
Evaluate committed changes for defects, design, readability, and performance while combining review with other quality techniques.
How it connects
Connects code review with pair programming, static analysis, automated testing, dynamic analysis, and test coverage.

Also explained in

Compare how 10 books explain code review →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 Java Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.