Codereivew is often used by development teams. It is a means to improve code quality and coding standards. Summarize some ideas and opinions in the review process of the actual work organization.
Functions of codereview:
1. Improve team coding standards and cultivate a good coding style
The purpose is to improve the team's coding standards and unify the coding style. Through codereivew each time, we can find some details of team members in actual development, such as bad coding habits and incorrect calling methods. By discovering and solving problems multiple times, everyone has developed a good coding habit. Review content generally includes:
1) Handling of exceptions and logs;
2) definition and use of constants;
3) string processing, bigdecimal. Zero, etc;
4) code encapsulation to improve reusability;
5) code comments;
6) Javascript file extraction;
2. Check the business logic
Reivew the functional logic implemented by the project, and check whether there are blind spots or errors in the business logic based on the divergent thinking of everyone. It is usually time-consuming for members who need to participate in the review to analyze it in depth.
3. Sharing and training
The work schedule of each project is relatively compact, so each team member does not have much time to understand or be familiar with the function implementation of other members after completing their own development tasks. However, for agile development, developers of each function module are not fixed. Based on the project requirements, it is very likely that non-original developers will complete value-added functions or restructuring, therefore, codereivew is a good training and sharing opportunity, especially for the implementation of complicated functions. This allows team members to understand or familiarize themselves with basic design ideas and related class definitions, so that they can take over the work in the future, you can get started faster or find the most appropriate person to understand the deeper logic.
Reivew method:
1. collective review;
Project members participate in codereive together, which is costly. Generally, a project is organized once. It is suitable for sharing development experience and introducing the implementation of new functions, which helps other members understand and familiarize themselves with the design ideas and code structure of the implementers. It is more calm when subsequent projects take over these new functions.
2. tm organizes multiple reviews with rich development experience;
3. Grouping and cross-review;
With good flexibility, relevant personnel can be consulted to review the implemented code at any time based on the actual situation, so as to promptly discover and correct problems in the process. It is suitable for group and group development. It is a unit of 2-3 persons. It is responsible for analyzing, designing, and coding specific functional modules. Each member has a logical functional logic, it has a good effect on the business logic reivew.
In actual work, the appropriate review method should be selected based on the actual situation and should not be confined to some form. The review process should have a clear purpose and be targeted, instead of staying on the surface, to avoid becoming a burden and a form of stream. In addition, a list of issues should be prepared for each review result for analysis and summarization to avoid repeated issues. At the same time, relevant personnel should be arranged to follow up and solve the problem. In short, through codereivew, we try our best to discover some actual problems in the code before submitting the test and grow from the project experience.