Attitude determines everything:
Code Review, as an important part of software development, is also a link with a high degree of interaction between people. The attitude of participants on Code Review will greatly affect the effect of Code Review. Programmers are a group of people who are not good at communicating with others. In this way, there may be a big gap in the Process of Code Review because of the degree of understanding and attitude of the incident:
For the code interpreterSome experienced programmers often make such a mistake due to lack of understanding about the purpose of the Code Review and so on, and think that their Code will not be faulty, this Code Review is intended to inspire others. In this case, the entire Code Review process basically discards the Code and only talks about its implementation ideas and methods. This completely becomes a knowledge lecture, however, you need to know that the overall design is still very different from the specific implementation. If your macro thinking is correct, it does not mean that your code is okay. For some young people who have just arrived, they will go to another extreme. The Code Review is just like letting them go to the criminal court. The Code Review is used to receive the trial. It relies entirely on its own Code and does not tell all the things you have learned in this process, this is not conducive to the mutual learning and improvement of the entire team.
Reviewer attitude: Their attitude towards Code Review largely determines the effect of Code Review. The following situations are common:
Indifference:The main reason for this attitude is that the Code is not self-written, and you do not have to take any responsibility. You cannot understand the actual meaning of code lookup. I want to confuse the past and end the number of students.
Code that despise others:This kind of mentality is common in members with high technical skills in the team. When others explain the code, they always feel that this function is easy to implement and they know that they don't have to listen to others. Such people lack a sense of responsibility for the team and respect for the results of the team members.
Critics: These people do not know exactly what the purpose of Code Review is. They always think that Code lookup is to find someone else's mistake, so it is difficult for others. This easily ignores the advantages of others' code design. As a programmer, everyone has their own responsibility. In this way, Code Review often appears in the Code Review, which is the misunderstanding of finding others' errors.
Code Review format:
Code Review is a common means of Code quality and team technical exchange. It can be found in the following forms:
Peer Review:This form is a simplified version abstracted from Pair programming. The Code query is mainly performed by two people. One is the code editor and the other is the code viewer. First, the code editor will give a brief explanation of the Code to the Code reviewer, and then the code viewer will propose the code to be improved. Then the author modifies the code.
Peers Review:In this form, an evolutionary version of Peer Review increases the number of code viewers and introduces more eyes to more effectively discover problems in the code, at the same time, it allows more people to understand the solution of a function and expands the scope of discussion on the solution of this function.
Multiple-to-one Review of roles:Different from Peers Review, Peers is divided into the following roles: Author, moderator, Recorder, and Other reviewers. Author prepares the materials required for Code Review and briefly explains the materials. moderator also checks whether the materials required for Code Review are valid, at the same time, it determines the overall trend of code lookup. For example, it cannot bring the meeting into a discussion without any purpose. At the same time, it is responsible for checking whether the modification of the Code lookup result is in place after code lookup. Recorder records issues found during code walk
The above three forms, the first two of which are not subdivided by the viewer role, are easy to flow in the form of Code Review, thus greatly reducing the effect of Code Review, however, the above forms are also advantageous, and both of them are more conducive to development and communication. The third form is the best form of an individual, which will be described in detail in the next article.