Skip to content

Instantly share code, notes, and snippets.

@aonurdemir
Created August 30, 2018 09:28
Show Gist options
  • Save aonurdemir/b16e3f4461d0c020c60563d88c5f734c to your computer and use it in GitHub Desktop.
Save aonurdemir/b16e3f4461d0c020c60563d88c5f734c to your computer and use it in GitHub Desktop.
Design and Code Review Checklist
Review Unit Tests
Is the code in the right place?
Does the name space make sense? http://blogs.msdn.com/brada/articles/361363.aspx
Is the class / procedure / variable scope correct.
Are the Classes, methods, and variables named correctly? http://blogs.msdn.com/brada/articles/361363.aspx
Are the methods, and variables typed correctly?
Look at the code.
Review for OCP (open closed principle - Open for extension closed for modification)
Review for DRY Principle (Don't Repeat Yourself - abstract common things and put in single place).
Review for SRP (Single Responsibility Principle - every object has a single responsibility. All the object's services should be focused on that responsibility).
Review for LSP (Liskov Substitution Principle Subtypes must be substitutable for their base types).
Consider delegation over inheritance. If you don't need to change base class behavior, consider delegating (handing over responsibility of a task) rather than inheritance.
Consider Composition over inheritance. Similar to delegation except the owner class uses a set of behaviors and chooses which one to use at runtime. When the delegating class is destroyed, so are all the child classes.
Aggregation. Similar to composition except when the delegating class is destroyed, the child classes are not.
Consider Polymorphism. Make a group of heterogeneous classes look homogeneous
Consider generics.
Testability considerations?
YAGNI (You aint gonna need it) When in doubt, leave it out!
Does object wake up in a known good state (constructor)
Consider Security.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment