First of all, I think code reviews are a must for every team that wants to have a consistent codebase and good code quality. β
Code review should be a really focused task, and I think those are the top things that need to be watched:
Code structure & common patterns used
Is the code structured correctly and following the same trends and patterns as the rest of the application?
If it breaks from those patterns is it a good reason to do so?
Code quality
Does it follow good namig conventions?
Are FP principles used?
Are unit or integration tests present?
If existing code is modified and it had automated tests to cover it, have the tests been updated to also check the new logic?
Maintainability
If certain parts are badly written, too complex or unreadable, then suggest alternatives.
Write good comments
This is something on you, the reviewer:
- Be empathetic and kind when leaving comments
- Even for horrible mistakes, try to point them out in a nice way
Use automation π
Can you automate more to make some general mistakes occur less often?
- avoid formatting comments by using a code formatter
- avoid some code quality comments by using linters
- use static type checking to avoid pointing out mistyping comments
Most important β discuss more upfront when a teammate has a challenging task so the outcome is more predictable (have a huddle task for complex work).
If you like this article, chances are you will also enjoy what I post on Twitter. π₯
Top comments (0)