DEV Community

Discussion on: Better Code Review Practices

Collapse
 
gsandec profile image
Gustavo Silva

This is a great piece of content. Thank you for your work here! I like the way you talked about the developer and the reviewer's perspective.

I decided to share a popular article on behalf of Codacy that is related to Pull Requests reviews. Feel free to read it here. Hope it adds value to this discussion.

Some tips from the content:

  • When you don’t understand what a part of the new code does, what do you do? You ask the author. And then he or she explains this part and then the rest. Now you’re reviewing the code with the author. You will inherit the author’s biases.
  • Your comments should be directed at the code, never the author.
  • Do the changes fit the application flow? Do they change the way something interacts with something else? Can something break? When you were learning to program, you created mental models matching what code does. So, as a developer, you kind of can compile and run code in your head. You are able to reason about a flow. You can apply this mighty skill to code reviews. Run the code in your head and wonder if it goes wrong. It could be the changed code or other parts of the application.