Welcome to my technology learning website. The goal of this site is to learn and retain as much information as possible. I consider this blog my knowledge base and hope that you both find and share knowledge here as well. Also for those wondering, Rhyous is pronounced ‘rī-əs. As in the words ‘Rye‘ and ‘us‘ compounded into a two syllable word.
Please take a moment to subscribe, or setup an RSS feed so you never miss a post.
This is a simple check-list to make code reviews more valuable. Simply check these rules.
Download a single page word document: Code Review Cheat Sheet
Does the code follow the 10/100 Rule?
This is a quick check rule that isn’t extremely rigid. See the 10/100 rule of code
Method has less than 10 lines
Is the method that was added or changed 10 lines or less? (There are always exceptions such as Algorithms)
Is the class 100 lines or less?
Note: Model classes should have zero functions closer to 20 lines. Logic classes should be sub-100 lines.
Is the code S.O.L.I.D.
S.O.L.I.D. is an acronym. See this link: https://en.wikipedia.org/wiki/SOLID
Single Responsibility Principal
Does each class have a single responsibility? Does each method have a single responsibility?
Is this the only class that has this responsibility? (No duplicate code or D.R.Y. (Don’t Repeat Yourself)
Can you extend the functionality without modifying this code? Config, Plugins, event registration, etc.
Is there configuration is this code? If so, extract it. Configuration does not belong in code.
Liskov substitution principal
Is inheritance used? If so, does the child type cause issues the parent type wouldn’t cause?
Interface segregation principle
Does the code use interface-based design?
Are the interfaces small?
Are all parts of the interface implementations without throwing a NotImplementedException?
Dependency inversion principle
Does the code reference only interfaces and abstractions?
Note: If new code references concrete classes with complex methods, it is coded wrong.
Is the code Unit Tested
Is the Code 99% covered? Is code not covered marked with the ExcludeFromCodeCoverageAttribute?
Parameter Value Tests for methods with parameters
Are your names typo free?
Do your file names, class names, method names, variable names match existing naming conventions?
Do you have any glaringly obvious Big O problems? n or n2 vs when it could be constant or log n.