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 they 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 will build this confidence.
  • If there are bugs, record them in a comment.
  • Look for the most significant improvements to code design.
  • Look for significant diversions from coding standards.
  • Test code is as necessary as functional code, so review the test code.
  • If you have a lot of comments to make on this code review, choose the most critical words only.

Tips for writing the code review

  • Remember to praise this good, mainly 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.