6 Good practices for code review

The code review process is often carried out in software projects that have a minimum quality structure. This procedure consists of, after a developer finishes a task and generates a pull request (PR), another developer will analyze and indicate improv…


This content originally appeared on DEV Community and was authored by Engenheira Coelho 🐇

The code review process is often carried out in software projects that have a minimum quality structure. This procedure consists of, after a developer finishes a task and generates a pull request (PR), another developer will analyze and indicate improvements to this code.

Thus, developers work on improving the code over time, increasing the level of code quality and avoiding possible bugs. Furthermore, contributing to the improvement of technical skills and leveling time.

6 Best Practices to Run Without Code Review

  1. Use emoticons for demonstration only, for example 👍🏽, ✅, 🚀, 😊.

  2. Don't refactor someone else's PR without them knowing. If many modifications are allowed, make comments. Refactoring without informing takes away the developer's learning opportunity.

  3. Prefer to explain your suggestions with small pieces of code or links that direct the developer.

  4. Whenever possible, respond to comments in PR. Enabling the setting to send new comment alerts to your email can be a great practice.

  5. Prefer to use suggestive rather than imperative language. Another good option is to use questions, for example:

Example 1

❌ “It got bad”
✔️” It’s a great practice to use more descriptive names.
Suggestion: isFlowStateFinished”.

Example 2
❌ “None of this was good”
✔️ “It’s more interesting to use the MVC pattern. Can you
notice the associated improvements? We can talk better
about 😄”.

Example 3
❌ “This one is performing poorly”
✔️ “Using find() could generate better performance in this piece
of code”.

  1. In larger or more advanced PRs, congratulate, or send a positive message, on approval of the PR. Working with development is usually not easy, encouragement from colleagues is a very positive practice. Although it may seem simple, this practice helps maintain culture and climate.

Did you like the tips? Comment here if you use other interesting practices in code review 😄


This content originally appeared on DEV Community and was authored by Engenheira Coelho 🐇


Print Share Comment Cite Upload Translate Updates
APA

Engenheira Coelho 🐇 | Sciencx (2024-07-15T14:48:44+00:00) 6 Good practices for code review. Retrieved from https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/

MLA
" » 6 Good practices for code review." Engenheira Coelho 🐇 | Sciencx - Monday July 15, 2024, https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/
HARVARD
Engenheira Coelho 🐇 | Sciencx Monday July 15, 2024 » 6 Good practices for code review., viewed ,<https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/>
VANCOUVER
Engenheira Coelho 🐇 | Sciencx - » 6 Good practices for code review. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/
CHICAGO
" » 6 Good practices for code review." Engenheira Coelho 🐇 | Sciencx - Accessed . https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/
IEEE
" » 6 Good practices for code review." Engenheira Coelho 🐇 | Sciencx [Online]. Available: https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/. [Accessed: ]
rf:citation
» 6 Good practices for code review | Engenheira Coelho 🐇 | Sciencx | https://www.scien.cx/2024/07/15/6-good-practices-for-code-review/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.