# In-Tutorial Code Review - Break your team into sub-groups of 3-4 students and review the code. - Below are some suggested things to look for. Record all the suggestions you have (include line numbers to locate code). ## 1. Big Picture - What abstraction is the public interface presenting? - Are the methods well named? - What is hidden? - What coupling is found between this module and others? - Is code in the correct files? - Are any design heuristics or patterns used? Prefer composition over inheritance. ## 2. Smaller-Scale Improvements - DRY - Any line/function too complex? - Is it over-engineered? - What coupling is found between functions? - Returning null vs Optional? Reference null vs Null Object? - Each method/variable named great? - Conform to coding standard / style? - Threading: Is multithreaded possible? What data is shared between function executions? ## 3. Search for bugs - Does the code do what the developer intended? - Edge cases: empty list? one element? null? 0? -1000000? - Error handling done well? - Is code adequately covered by tests (if any) ## 4. Other - Cohesion, Consistency, Completeness, Clarity - Command-query separation - Constructor makes fully formed objects - Use Static Factory Methods when appropriate - One-name for each idea ## Overall * Does it effectively manage complexity? _Essential_ Complexity: Parts of the problem; cannot remove _Accidental_ Complexity: Part of the solution; can remove! * Comments: Does it need more? Need fewer?