Code Review Tips for Engineers working in teams

Tips for requesting a code review, reviewing code and writing a code review when part of an agile cross functional team.

Code Review Tips

Tips for requesting a code review

  • Keep the review small, and related to one bug fix or one piece of functionality.
  • Provide an overview of any technical design decisions.
  • Provide a link to the ticket for reference to the requirements, visual designs, and documentation.
  • Re-read the requirements and ensure that all requirements are met before submitting them for review.
  • Be sure new and existing tests pass - unit testing, automation and manual testing.
  • Run linting checks and fix errors and warnings if they are not automated.
  • Assign your pull request to a reviewer, or tell your team.
  • Update your ticket status if needed.
  • Be prepared to talk about the work.

Tips for reviewing code

  • It is not QA, but depending on the changes, check out the branch, build the project, run the tests, and use the feature. Hopefully, some of this is automated.
  • Check requirements and designs, and review the front end, does the front end code render? Again, hopefully, automated tests build this confidence.
  • If there are bugs, record them in a comment.
  • Look for the most important improvements to code design.
  • Look for major diversions from coding standards.
  • Test code is as important as functional code, so review the test code.
  • If you have a lot of comments to make on this code review, choose the most important comments only.

Tips for writing the code review

  • Remember to praise good this, particularly if the engineer is junior.
  • Be polite, and use manners.
  • Refer directly to coding guidelines docs for code style/standards.
  • Refer to the code, not the author.
  • Treat people with respect.
  • Remember there is more than one approach to a solution.
  • Remember there is collective ownership of code in a team.