扫码阅读
手机扫码阅读
一个典型的代码走查检查单
220 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 成员,中国分部主席
425 篇文章
浏览 148.6K
麦哲思科技任甲林的其他文章
僧?道?水生!水稻!
水生
2007年的夏天我去厦门售前,早晨到酒店的餐厅吃饭,刚进餐厅,见一老一少两个穿黄色僧袍的和尚坐在里面吃饭,老和尚慈眉善目,看到我,像我微笑致意,我也点头还礼,我一直认为自己是很有佛缘的人,所以心里想,大概老和尚看我面善,所以和我打招呼吧,自我感觉甚好。在自助取餐的过程中,老和尚频频向我致意。
早餐吃完,经过两位的位置时,老和尚招手叫住了我,说要聊聊,我没有拒绝。坐下后,老和尚说是到福建什么一个出名的名寺开什么法会,看我有缘,和我聊聊,还送我一个开光的佛像,给了我名片,
需求评审的案例分析
案例一:客户需求文档评审 参与人员:1位主持人,1位作者,1位记录员,4位专家,1位咨询顾问旁观 开始时间:15:40 结束时间:17:15 会议工时 :6.3人时 会前准备累计工时:9人时 总工时:15.3人时 会议前发现的问题:25个 会中发现的问题:2个 合计问题:27个 会前评审效率:2.8个/人时 会中评审效率:0.3个/人时 评审文档的规模:13页 缺陷
莫要混淆控制限与规格限
有的软件企业实施SPC时,在画控制用控制图时不但在同一张控制图上画了上下的1sigma、2sigma、3sigma线,还画了规格线,其实是画蛇添足,因为规格限如果在上下3sigma内,就失去了控制用控制图的意义。控制限是指通过对历史数据采用控制图(如XbarS图、XMR图)分析得到的,其值与均值偏离上下3sigma,规格限是由客户或者公司指定的,是对过程的能力要求,一般要比控制限宽,否则无
过程改进的关注点之测试过程
总结了一下在咨询过程中看到的测试过程的常见问题,梳理出来进行测试过程改进的关注点
如何保证测试的完备性?
经验法则如下:1 测试人员参与需求评审,需求人员参与测试用例的评审不懂需求,不了解需求的测试人员是不可能设计出完备的测试用例的。测试人员参与需求评审一是可以评审需求的可测试性,二是了解需求。 需求人员评审测试用例可以检验用例的完备性,判断测试人员是否理解了需求。2 系统测试用例覆盖每一个场景场景是在需求中描述的用户使用系统的一条操作路径。覆盖每个场景是系统测试用例设计的基本要求。3 集成测试用例
加入社区微信群
与行业大咖零距离交流学习
SAFe6.0与CMMI3.0映射
白皮书上线
白皮书上线