当前位置:网站首页>Code review concerns

Code review concerns

2022-07-06 01:19:00 hursing

Review Can be divided into 3 A level , The higher level will contain the lower level content .

One 、 primary , Specification level

Not familiar with relevant code , Can only review Compliance with specifications , Based on readability . Specifications as per 【 Language > frame > system platform > project > company > Same as the context 】 To comply with . concerns :

  1. Code specification , name :< Variable | Constant | function | class | file | Catalog > Named < Case write | abbreviation | Minus sign or underline > etc.
  2. Code specification , Format : Line break 、 Blank line 、 Space 、tab Or the number of spaces 、include/import Sort, etc
  3. Code specification , Content : notes 、 Function body line limit 、 exception handling 、 No zombie code 、 There is no magic number 、 Whether to use Lamda Expression etc.
  4. Code specification , Location : Catalog 、 Package or namespace hierarchy
  5. Use standard , Internal agreement : whether 【 Unified use or can't use 】 Specific functions 、 Interface 、 library . For example, logs are printed through encapsulated classes
  6. Submit specifications :commit log Compliance with specifications ; Are there different tasks ( Demand or bugfix) Submit separately , Whether to merge and submit the same task
  7. Branch specification : Whether to submit in the right branch , For example, version . There are additional requirements , For example, do not submit and repair after the test bug Irrelevant code , Go to the next version or temporary branch to submit .
  8. review Process specification : Whether to give it to the right person review、 Copy in place 、 Modify according to opinions
  9. design code : Follow basic design principles , The responsibilities of each category are simple and clear , decoupling .
  10. Document specifications : Is it necessary to write documents if the complexity is high , Whether the implementation is consistent with the document .

Two 、 intermediate , Performance architecture level

Familiar with relevant code but not familiar with requirements , More attention can be paid to technical design , Value performance 、 Extensibility 、 Maintainability 、 Security 、 Stability, etc . concerns :

  1. Cross module / application / End to end interaction , Is the design reasonable , Whether coupling is introduced
  2. Application of design principles and design patterns
  3. Asynchrony and atomicity :Timer、 Cross thread 、 Cross process 、 lock
  4. performance :IO Duration , Whether background thread execution is required , Whether there are redundant operations ,lazy load,SQL Optimize 、 Algorithm complexity, etc .
  5. journal 、 The burial point is reasonable , The cause of the abnormal condition can be found in the log , Nor abuse .
  6. Safety considerations : encryption 、 Inspection, etc
  7. Major anomalies are UI Tips , It is convenient for users to help locate problems .( This scenario cannot be proposed by products )
  8. Extensibility : Whether it is flexible enough to cope with changes
  9. Whether wild pointers or memory resident objects will be generated

3、 ... and 、 senior , Demand level

Familiar with code and requirements , Will pay attention to more details , Generally, pair programming can achieve this level . concerns :

  1. UI: copy 、 size 、 Color 、 shadow 、 typeface 、 Alignment mode 、 Front and back levels 、 Animation 、 picture 、 voice 、 Video etc. , It may be different in different states
  2. Function and process logic : Entrance and exit 、 State and condition 、 The rules ( type 、 precision 、 Value range 、 The default value is 、 Display format 、 Calculation processing method, etc )、 Abnormal situation ( Know the probability and the source cause ).
  3. Bugfix, Can it really be solved bug.
原网站

版权声明
本文为[hursing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060115534419.html