liveBook · Manning

Code suggestion

As explained in "Looks Good to Me"

A proposed modification to source code generated or presented to improve its implementation.

A code suggestion is an AI-proposed modification to source code, usually offered during pull-request review to address an issue or improve implementation. It can give an author a head start on reviewer feedback or help a reviewer express a change that is difficult to articulate. section 13.3

Use code suggestions as an assistive review step:

  • Comment on selected lines with a requested refactoring, then inspect and accept the generated change. section 13.3
  • Run an improvement command to propose maintainability improvements or overlooked best practices. section 13.3
  • Use extended analysis for larger pull requests so suggestions remain proportionate to segmented changes. section 13.3
  • Let humans validate every suggestion and make the final decision, because AI can miss context and nuance. section 13.6

From review comment to change

A reviewer selects code and describes the desired refactoring with What The Diff’s /wtd command. The tool proposes a pull-request change that the author can inspect and accept with one click. The author may instead use Qodo’s /improve command to perform a broader first review. section 13.3

Figure 13.3 What The Diff generated suggestion to register selected code as a singleton
figure

Inspect the generated suggestion to register selected code as a singleton. section 13.3

Figure 13.4 Output of Qodo /improve command with the --extended flag
figure

Inspect extended improvement output for a larger pull request. section 13.3

How "Looks Good to Me" covers it

How deep it goes
Describes inline and extended suggestion workflows, but stops short of explaining implementation internals or model training.
Examples
Uses What The Diff’s /wtd command, Qodo’s /improve and --extended options, and singleton-registration refactoring.
What it assumes
Assumes familiarity with source code and pull-request review while emphasizing human validation of AI output.
What you can do after
Apply it via What The Diff or Qodo, then inspect, validate, and selectively integrate proposed pull-request changes.
How it connects
Connects code review, pull requests, inline code refactoring, maintainability, and human judgment.

Also explained in

Compare how 2 books explain code suggestion →

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.