liveBook · Manning

Code review

As explained in Think Like a CTO

Code review is the systematic examination of source code by developers to identify problems and improve quality before or during integration.

Code review is a regular examination of source code to make it more readable, maintainable, and as error-free as possible before deployment. No contributor’s code is exempt, including a CTO’s. Review works alongside coding standards, which can cover structure, design patterns, logging, and naming—not just formatting. section 9.2

Use a review to ask:

  • Does the code follow the team’s evolving standards, and can another developer understand and maintain it? section 9.2
  • Is adequate source documentation present? Where a decision looks unusual, would a comment or ticket link explain why it exists? section 11.2.6
  • Does a shortcut create technical debt that should be flagged and added to the backlog? section 9.6
  • Could user input or an interaction between features create a security problem? Training and code-quality tools help, but neither removes the need for experienced human review. section 12.7.1

A fix the tool may miss

A short-term fix can be syntactically valid and escape a code-analysis warning while still needing a more complete solution. Flag it during review and put the follow-up in the backlog rather than letting the shortcut disappear into the codebase. section 9.6

Make review routine, not a claim that every defect will be caught. Code-quality tools such as SonarQube can find standard issues; reviewers also need to judge intent, documentation, debt, and risks the tools miss. section 9.2 section 12.7.1

How Think Like a CTO covers it

How deep it goes
Gives review cadence and checks for debt, documentation, and security, but no line-by-line review protocol.
Examples
Uses a temporary fix missed by analysis tools and a SQL-injection scenario to illustrate review concerns.
What it assumes
Assumes an existing coding team and points to secure-coding training rather than teaching programming from zero.
What you can do after
Practice/perform it regularly to flag technical debt, check documentation, and assess risks that tools may miss.
How it connects
Links coding standards, code-quality tools, and secure coding to human review.

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 Think Like a CTO. The section links point to the parts of the book it draws on.