Welcome to the Code Review Practice Playground! This repository is designed to help developers improve their code review skills by analyzing, reviewing, and suggesting improvements on intentionally imperfect or evolving code.
Whether you're new to code reviews or looking to sharpen your eye for clean, efficient code, you're in the right place.
- Example PRs with realistic code changes
- Intentional bugs, anti-patterns, and areas for improvement
- Opportunities to give feedback, suggest alternatives, and practice review etiquette
- Different languages and tech stacks (Java, Python and TypeScript)
- Review checklists and best practices for reference
When writing code we want to achieve a high level of readability, to help us maintain a high level of maintainability. To do that, when we review code (our own, or other's), aside from checking its correctness, we need to be mindul of the following:
- Language features - is the code using the right (most effiecient / readable / recent) language features?
- Naming - do the names reveal intent?
- Immutability - is the code immutable?
- Testability (and coverage) - is the technical design easy to test, and easy to achieve high coverage with?
- Code duplications - do we have uneeded code duplications?
- Single responsibility - do the functions/classes/scripts/modules/etc. do just "one" thing?
- Helpful types - do we leverage the right types to make our code reabale and safe?
- Design patterns - if the tech design warrants it, did we use the right design pattern for the task?
- ...
- "Clean Code: A Handbook of Agile Software Craftsmanship" this book will be relevant probably forever. It's pragmatic and easy to work through.