The content and method of code review

First, the role of code review:

1. Find bugs.

Logical bugs are the easiest to find at the code level. Some lack of understanding of requirements, hand mistakes, etc. are also easy to find.

2. Check the design consistency.

Each software will form its own implementation mode, such as functional organization, data representation, and common code of software. Programmers who newly join the project are likely to write functions in their own way because they are not familiar with the design conventions of the original software, resulting in inconsistent software design.

This is fatal to OO programs without MVC framework, and will eventually lead to the realization of various functions of the software, which are criss-crossed and varied, and cannot be understood and managed.

3. Check general code specifications and naming specifications

4. Quickly improve developers' abilities and help developers develop good development habits

2. Code review methods:

SVN comparison, incremental review.
Focus on review of novice code and complex logic code.

Three, code review traps

1. Novice review

novice The essence of grasping the code is to grasp the requirements and programming. This is not a job for a novice. Such re-examinations can lead to endless squabbles.

2. Veteran review

novice Veteran represents rich experience and strong development ability, but often cannot see through the code. At the same time, without authority, there is no authority, and the problems seen are difficult to correct.

3. Architect review

Architect is responsible for software architecture design, has sufficient grasp of code, and has certain authority and command ability to programmers.

What really works is architect-level code review.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326307194&siteId=291194637