liveBook · Manning

Objective code review comment

As explained in "Looks Good to Me"

A code review comment supported by verifiable facts, requirements, conventions, use cases, or demonstrated effects.

An objective code review comment supports its suggestion with verifiable facts, requirements, conventions, use cases, or demonstrated effects. Alternative implementations are welcome when the reviewer can explain why they are better; unsupported personal preference is usually better left out. section 6.1.1 section 6.4

Before suggesting a change, use the 5P process:

  • Pause: stop before writing the suggestion. section 6.1.1
  • Ponder: identify what prompted the suggestion, whether it is necessary now, and whether objective facts justify it. section 6.1.1
  • Pass when the suggestion is not valid; Propose when evidence supports a change; Postpone when the idea may matter but falls outside the current scope. section 6.1.1 section 6.4

Turn preference into evidence

Instead of writing, “Use my implementation,” explain the measurable advantage: “Could we use this implementation because it is faster? Here are comparison metrics.” Alternatively, cite the applicable language convention or team standard. A use case can also establish why the proposed behavior matters. section 6.1.1

Figure 6.4 The 5P process for suggesting a change during a code review
figure

Use the 5P process as a compact decision aid before posting a suggested change. section 6.1.1

How "Looks Good to Me" covers it

How deep it goes
Defines factual support and gives a pause-reflect-decide procedure, while stopping short of prescribing a particular implementation.
Examples
Uses comparison metrics, coding-convention links, team standards, and a use case to justify suggested changes.
What it assumes
Assumes familiarity with code review and access to relevant coding conventions, team standards, or use-case evidence.
What you can do after
Apply it by pausing, examining the rationale, and passing, proposing, or postponing each suggested change.
How it connects
Connects code review comments with coding conventions, team standards, use cases, maintainability, and review creep.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of "Looks Good to Me". The section links point to the parts of the book it draws on.