DEV Community

Cover image for Things to look at when doing code reviews
Alexandru-Dan Pop
Alexandru-Dan Pop

Posted on • Edited on

4 1

Things to look at when doing code reviews

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. 🔥

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay