扫码阅读
手机扫码阅读
一个典型的代码走查检查单
64 2024-10-04
我们非常重视原创文章,为尊重知识产权并避免潜在的版权问题,我们在此提供文章的摘要供您初步了解。如果您想要查阅更为详尽的内容,访问作者的公众号页面获取完整文章。
查看原文:一个典型的代码走查检查单
文章来源:
麦哲思科技任甲林
扫码关注公众号
Code Review Checklist Summary
The primary goal of code review is to identify logical errors within the program, while programming style issues can be checked using style checking tools. The provided checklist is a valuable aid for code review experts to spot such logical errors.
Checklist Items
- Are the code comments consistent with the code itself, and are they necessary?
- Does the code have loops and/or conditions nested more than 3 levels deep?
- Do variable names accurately represent their function?
- Are all loop boundaries correct?
- Are all condition boundaries correct?
- Is there proper handling for exceptional cases of input parameters?
- Are all exceptions within the program handled?
- Does the code contain any duplications?
- Are there methods exceeding 20 lines of code?
- Are there classes containing more than 7 methods?
- Do methods have more than 3 parameters?
- Are there multiple reasons for modifying a class?
- Does a functional change require modifications in multiple classes?
- Are the constants used in the code appropriate?
- Does a method access multiple attributes from other classes?
- Do certain data items always appear together, yet they are not part of a class?
- Can switch statements be replaced by classes?
- Are there classes with very few responsibilities?
- Are there unused attributes or methods in a class?
- Does the code have method calls in the form of a.b().c() within class methods?
- Does a class method always call another class's method with the same name?
- Does a class consistently access another class's attributes and methods?
- Do two classes perform similar tasks with different method names without sharing a common parent class?
- Is a class composed only of fields and simple get/set methods?
- Does a subclass only use some of the parent class's attributes or methods?
想要了解更多内容?
查看原文:一个典型的代码走查检查单
文章来源:
麦哲思科技任甲林
扫码关注公众号
麦哲思科技(北京)有限公司总经理 敏捷性能合弄模型评估师 认证的Scrum Master 认证的大规模敏捷顾问SPC CMMI高成熟度主任评估师 COSMIC MPC,IAC 成员,中国分部主席
420 篇文章
浏览 74.8K
麦哲思科技任甲林的其他文章
需求变更的5W1H分析
why,需求为什么变化? 甲方的特殊原因: 不知道如何说清楚需求; 没有明确的需求; 没有确认乙方描述的需求; 乙方的特殊原因: 理解错了需求; 没有很好的诱导客户的需求; 共性原因: 业务就是变化; 人与人之间的沟通本来就存在障碍; 特殊原因是可以消除的,共性原因是难以消除的。 who : 谁会提出需求变化? 客户:客户方的
一次CMMI虚假改进、评估的案例
早晨起来收到CMMI研究所发给所有主任评估师的一封邮件,是一个老外主任评估师,在中国的最近的一个评估经历。看到之后,心情极其沉重。这不是第一次看到、听到业内的这种做法,虽然以前,CMMI研究所的各方面人士在非官方的途径对中国与印度的评估有所抱怨,但是这是第一次CMMI研究所在全球范围内给所有的LA通报这么一个案例,这是一个有确切证据的案例。希望所有的中国的软件公司、中国的过程改进咨询公司、所有的评
SCAMPIV1.3b的有趣变化----行动计划复评20问
2014年12月30日CMMI研究所发布了SCAMPI评估方法v1.3b版本,对比以往的版本,该版本发生了一个有趣的变化,即增加一个阶段:行动计划复评阶段(action plan reappraisal,简写:APR)。这就意味着,在做一次评估时,允许被评估的组织在初期可以被评估为不满足或未评级,而在后续的4个月内可以针对影响目标达成的弱项做一次修正的复评。具体的操作方式如何呢?我们通过回答如下的
如何把简单的事情一次做对?
在工作中领导最讨厌的人就是总把简单的事情做错的下属,在绝大多数人不会犯错的地方犯错,在领导眼中会判定为是基本素质问题,是不可原谅的。如果组织要裁员,那优先裁掉的就是哪些总是犯低级错误的人。那如何确保能够把简单的事情一次做对,提升自己的职场竞争力呢,请参考如下的七步工作。
建立组织级过程性能基线的注意事项
过程性能基线的建立方法有箱线图法、控制图法、置信区间法等等,在实际中,还要数据分析者的经验进行分析,以下举例说明在建立组织级过程性能基线时的注意事项:1 注意识别数据分层的现象 数据分层,即样本点存在明显的局部聚集现象,聚集在不同值范围附近的样本点可能是属于不同类型
加入社区微信群
与行业大咖零距离交流学习
软件研发质量管理体系建设
白皮书上线