How To Create Your Own Code Review Checklist?

Sachin
3 min readJun 15, 2018

My job as a tech lead for software applications involve a lot of code reviews and mentoring of junior java developers. I truly believe that code review is an important step in software development to ensure high quality results.

I have learned from my past experience about code review in Java and have come up with my own basic checklist for it for everyday use. Mostly I do not refer to it since I remember it, however it has been really helpful for my team members.

I also wrote about how to create your own programming review checklist here.

My software experience mostly revolves around Java and related technologies therefore my experiences may be biased. At the same time many of these things can be helpful in general software development.

Step 0: Use The Right Tools

Picking the right tools that simplify code review process is absolutely essential to make the reviews effective. I have seen many good code review comments are lost and not addressed due to lack of a good tool.

My favorite place to review code (so far) is Github. It has all the right features to have collaborative conversation. However, now after recent Microsoft acquisition I am just hoping this would survive.

In case you do not have Github or a Pull Request model for development, you may want to try out some code review tools that can integrate with any other version control system.

Step 1: Setup Code Commit Guidelines

Some basic rules need to be setup before people start committing code to the version control system. These rules need to be clearly communicated to each team member. Some key things I recommend would be

  1. Code Compiles.
  2. Code is documented well.
  3. Code has unit tests.

Step 2 : Automate Simple Repeated Tasks

Many tools can identify common coding issues and using them as part of review process can simplify the in-person code review.

My recommendation for Java is Find Bugs. It can integrate with various tools and give easy to read reports. Almost all high priority issues reported by Findbugs may be considered must fix. e.g. NullPointers are easily caught by it.

I am sure there are similar tools in each language that can do static analysis and find out common issues.

You can set threshold in the outputs of these tools that must pass before a manual code review can begin.

Step 3 : Manual Reviews

Manual reviews can be more like a pair programming session. Sit with the original developer and discuss the logic. Some key things I consider during reviews are

  1. What the key requirement?
  2. Are there any libraries used? Which ones and why?
  3. Are there any algorithms? Re-invented or reused?
  4. Can the code be simplified? Refactoring opportunities.
  5. What is the quality of Unit tests? Just having asserts is not enough.

More Ideas?

Please share your thoughts and ideas, I am always looking for more opportunities for improvement.

--

--

Sachin

Just read Don’t make me think http://amzn.to/2cCmPbG its must read for developers. Visit my blog https://www.fromdev.com/