Code Review Checklist - SJC-2015/Tasks GitHub Wiki
Code Review Checklist
Functionality
Functionality is implemented in a simple, maintainable, and reusable way (OOP, SOLID, Low Coupling/High Cohesion, KISS, DRY).
Clean Code
Use of descriptive and meaningful variable, method and class names as opposed to relying too much on comments. Pick one word per concept. Use Solution/Problem Domain Names.
Follow generally accepted code naming conventions and best practices.
Class and functions should be small and focus on doing one thing. No code duplications.
Methods should not take too many input parameters (up to 3 is fine, 4 is exceptional).
Declare the variables with the smallest possible scope. Minimize the scope of local variables.
Don’t preserve or create variables that you don’t use again.
One return per method body.
Omit needless and commented out code - there is a CVS. No System.out.println statements either.
Compare objects with equals. Make proper use of equals() and hashCode() methods.
Place literals First in comparisons
Avoid parameters reassigning.
Use thread-safe StringBuffer for string appends. Concatenation is allowed in trivial cases.
Fundamentals
Minimize the accessibility of the packages, classes and its members like methods and variables.
Code to interface as opposed to implementation.
Write fail-fast code by validating the input parameters.
Return an empty collection or throw an exception as opposed to returning a null. Be aware of the implicit autoboxing and unboxing cases.