In the software development field, code review seems to be a very controversial and peaceful topic.
The mainstream opinion is that code review is a good thing. Some companies or organizations even force code Mutual Review as a necessary process.
Review is a good way to capture bugs and problems. Through code review, you can share domain knowledge and improve code quality. Code review provides a good opportunity to monitor, educate, and strengthen the team.
At least theoretically...
Code review is likely to turn into a bad thing when you roll up your sleeves and face the pressure of a real project plan.
Review is an activity that can lead to hatred and split. It can cause people to doubt whether the code is correct, and arouse people to preach for their own coding standards. Code review is a routine activity. Whether the code is executed correctly or not leads to an improvement or elimination of the development efficiency of the team.
For a team, effective code review is a moderate line-it will neither be a silver bullet to solve all problems nor become a poison to harm the team.
After some thoughts and discussions with some colleagues, I think that the factors for successful code reviews are trust and training.
Team members must believe that feedback from code reviews is not an assessment of personal attacks or capabilities. The examiner must believe that the examiner will not hate you for your suggestions for improvement.
Team members must look at code reviews as a platform for continuous constructive feedback, rather than a tool for rating team members or making negative radical comments.
When a team is composed, trust is not inherent in team members.
Training people to correctly carry out a code review can enable them to establish authority during the review process.
Among all my projects, I found that the correct way to learn how to do code review is to let everyone review their code. In this way, you will know how to review code for others! This method provides many real scenarios to explain how to perform code reviews.
How to train new users to correctly provide review comments and tell them what they should pay attention to before providing valuable comments to experienced programmers. Instruct the team leader to give support to reviewers when appropriate and give meaningful review opinions. This will strengthen the trust of the team and ensure that the team members respect each other.
So is code review a good thing or a bad thing?
This depends on the desire of your team and whether you are trying to turn it into a positive measure. Just like for any such development methodology, simply using it will not work-you must ensure that you are using it in the correct way.
Link to the original English article: Code Reviews: Good idea, bad idea?