liveBook · Manning

Triple-r pattern

As explained in "Looks Good to Me"

A structured pattern for organizing a code-review comment so that the reviewer remains focused on the code and communicates productively.

The Triple-R pattern organizes a change-request comment around three questions: What should change? Why is it warranted? How will completion be recognized? section 6.1.3

Compose the comment in this order:

  • Request: state the action you want the author to take. section 6.1.3
  • Rationale: explain why the change is warranted, using relevant references or links. section 6.1.3
  • Result: describe a measurable end state, such as a metric, screenshot, or expected code structure. section 6.1.3

Moving a method

Request: move AuthenticateUser() into AuthenticationUtilities. Rationale: related authentication methods already live there, and the team agreement places authentication behavior in that library. Result: calls use the library rather than a standalone declaration. section 6.1.3

needs change: Can we update this endpoint to use version 3 (v3)? The call 
to our getCoordinates() method currently references version 2 (v2), a soon-
to-be-deprecated (link) version, which will cause functionality to break. 
Also, our other endpoints are already using v3; updating this will keep our
code consistent.

Compare a concrete endpoint-update comment that combines the requested action, deprecation rationale, consistency argument, and intended outcome. section 6.1.3

How "Looks Good to Me" covers it

How deep it goes
Defines three components and demonstrates one worked example, while deferring broader comment-composition practices.
Examples
Uses a method move and an endpoint-version update to illustrate complete change requests.
What it assumes
Assumes familiarity with code reviews and code changes, while explaining the comment structure from its three named elements.
What you can do after
Practice/perform writing clearer, more actionable code-review requests that authors can interpret and verify.
How it connects
Connects outcome-focused comments with code-review specificity, rationale, measurable results, and respectful communication.

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.