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
Use emoticons for demonstration only, for example 👍🏽, ✅, 🚀, 😊.
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.
Prefer to explain your suggestions with small pieces of code or links that direct the developer.
Whenever possible, respond to comments in PR. Enabling the setting to send new comment alerts to your email can be a great practice.
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”.
- 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 🐇
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.