编码检查单模板_第1页
编码检查单模板_第2页
编码检查单模板_第3页
编码检查单模板_第4页
编码检查单模板_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、编码检查单code checklist编码前你是否理解了所要构造化的设计?do you un dersta nd the desig n you are about to con struct?提供的设计是否达到能指导编码的详细程度?does the design provide an appropriate level of detail for coding to beg in?设计是否是易懂的、可实行的?是否构造化之前需要重新设计?is the design to be implemented straightforward and feasible, or should it be r

2、evisited before attempt ing to con struct it? ?你是否能理解极好实现设计的语言和技术?do you un dersta nd the lan guage and tech no logy well eno ugh to impleme nt the desig n?总体编码是否尽可能按照问题域而不是计算机科学和程序语言结构?is the code written in terms of the problem domain as much as possible rather tha n in terms of computer-scie nee

3、or program min g-la nguage structures?代码是否反映出上层设计和需求?is the code traceable to upstream desig n and requireme nts artifacts?代码是否有对应的测试用例或单元测试?does the code have docume nted test cases an d/or un it tests as defi ned by the project?代码是否符合已制定的编码标准(vc+编码标准)?代码是否符合已制定的编码风格? the code adhere to designated

4、coding styles and / or templates? 所有代码是否没有了编译警告?does the code compile with no warnings from the compiler?可理解性代码是否能顺畅阅读?does the code read from top to bottom?实现细节是否尽可能地掩藏?are impleme ntati on details hidde n as much as possible?代码是否做到了易懂而又不玦乏灵活性(技巧)?is the code straightforward and does it avoid cleve

5、r ness? 技巧性过强的代码是否已重写而不是增加注释? has tricky code bee n rewritte n rather tha n comme nted? 你是否能彻底地理解我们的代码?do you thoroughly un dersta nd our code?代码是否是容易理解的?do you thoroughly un dersta nd our code?性能技术上和执行环境的资源约束的影响是否在性能需求的范围内?are the affects of resource con stra ints on the tech no logy and operati on

6、al en vir onment un derstood and with in the bou nds of the performa nee requireme nts? 技术上和执行环境上的系统载入的影响是否在性能需求的范围内?are the affects of system load on the tech no logy and operati onal en viro nment un derstood and with in the bou nds of the performa nee requireme nts?预期的效率和高优化优先的代码是否清晰出现在系统的各个部分?is

7、 the expected priority of efficient or highly optimized code clear for various areas of the system?has profiling support been planned for areas of the code at risk for performa nee issues?断言和跟踪断言是否是用于检测假设?are assert ions used to docume nt assumpti ons?断言是否帮助调试?are asserti ons used to aid debuggi ng?

8、断言不能用于处理应该在代码中处理的错误。asserti ons are not being used to han die errors that should be han died in the code?are trac ing stateme nts used to docume nt eve nts and aid debuggi ng?跟踪语句是否用于证明和帮助调试?错误处理正常路径流程和错误流程是否能容易区分?is it easy to differentiate between nominal path processing and error process ing?错误条件

9、处理是否正确反映于需求和设计?(错误的检测和处理的丰富程度和系统的需求一致,不会过少 也不会过多。)are error conditions handled appropriately as per the requirements and desig n?(i.e. the level of robust ness in detect ing and resp onding to errors matches the needs of the system: not too little and not too much.) 错误条件是否能恢复到正常的假设上?when attempting

10、recovery from error conditions, are assumptions reas on able?代码更改对更改的代码的复查是否像复查最初开发的代码一样彻底?has the change been reviewed as thoroughly as initial development would be?更改是否提高了程序的内部质量,而不是降低?does the change enhance the program s internal quality rather than degrad ing it?如果可能,你是否通过将函数拆成短小的函数来提高系统的模 块性?h

11、ave you improved the system s modularity by breaking routines into smaller rout in es, whe n possible?你是否提高了程序风格-变量命名、函数命名、格式化、注释have you improved the programming style-variable names, routine n ames, formatt ing, comme nts, and so on?这次更改是否能让下次更改更容易?does this cha nge make the n ext cha nge easier?如

12、果更改会导致你寻找共享代码的方法,你是考虑将共享代码放在更高的层次还是更 低层次?if changes cause you to look for ways to share code, have you considered putting the shared code at a higher level as well as con sidered putt ing it at a lower level ?is the cha nge part of a systematic cha nge strategy?更改系统的一部分是否导致更改策略?布局程序布局是否能显现出其的逻辑结构?do

13、es the program s layout show its logical structure?格式化是否根本上阐述了代码的逻辑结构?is formatting done primarily to illuminate the logical structure of the code?格式化方案是否始终如一?is the formatt ing scheme used con siste ntly?相关的语句是否合成一组?are related stateme nts grouped together?是否使用空行分隔代码单元,如函数、控制流程、密切相关的代码块等等?are blank

14、 lines used to separate code elements including functions, con trol seque nces, related blocks of code etc?代码的格式化结果是否提高了代码的维护性?does the formatt ing scheme result in code that s easy to maintain?代码的格式化方案是否提高了代码的易读性?does the formatt ing scheme improve code readability?是否将相关独立的代码组提取出来形成一个新函数?have relat

15、ively independent groups of statements been moved into their own rout in es?尽可能靠拢的变量定义的语句是否有一样的生存期和将一个变量 定义赋予另个。are references to variables as close together as possible, both in total live time and from each refere nee to a variable to the n ext?独立语句连续的几行语句是否明显不整齐的?are con ti nuati on lines inden t

16、ed sen sibly?相关的语句是否排列成组?are groups of related stateme nts alig ned? 不相关的语句是否没有排列成组? are groups of un related stateme nts un alig ned? 是否一行一条语句? does each line contain one stateme nt?变量声明是否排列成行?are data declarati ons alig ned?是否一行一条变量声明语句?is there one data declarati on per line?是否每条语句都没有副作用?is each

17、stateme nt writte n without side effects?自我注释的代码self-documenting code子程序routines每个函数的名字是否确切描述其的功能?does each routine s na, e describe exactly what it does? 每个函数是否只执行一条定义良好的任务? does each rout ine perform one well-defi ned task?每个子程序的接口是否现而易见和清楚的?is each routine s intdrface obvious and clear?数据命名data n

18、ames数据类型的命名是足够详尽使得能帮助注解数据声明?它们是否都是 明确为该目的?are n ames of data types descriptive eno ugh to help docume nt data declarati ons?are they used specifically for that purpose?所有变量是否命名良好?are variables named well ?所有变量是否只用于它们被指定的目的?are variables used only for the purpose for which they re na是否使用命名良好的枚举类型替代临时

19、标记或布尔变量?are well-n amed en umerated types used in stead of makeshift flags or boolea n variables?med是否指定常量替代“魔力”数字或字符串?are n amed con sta nts used in stead of magic n umbers or magic stri ngs?数据组织data organization额外的变量是否清楚的,当其是必要的?are extra variables used for clarity whe n n eeded ?变量的定义是否靠拢在一块?are

20、references to variables close together ?数据结构是否简单从而将复杂性降到最低?are data structures simple so that they minimize complexity?复杂的数据是否通过抽象的操作子程序(抽象的数据类型)进行操作?is complicated data accessed through abstract access routi nes (abstract data types)?控制control相关语句是否组成一块?are related statements grouped together ?相关独立

21、的语句块是否合成一个子程序(函数)?have relatively in depe ndent groups of stateme nts bee n packaged into their own rout in es?正常流程语句是否在if里而不是else里?does the no rmal case follow the if rather tha n the else?控制流程是否简单从而将复杂性降到最低?are control structures simple so that they minimize complexity?每个循环体是否执行一个并唯一个函数,就像一个定义良好的子

22、函数?does each loop perform one and only one function,like awell-defined routine?嵌套是否最浅?is n esti ng mini mized?通过使用额外的布尔变量、布尔函数和决议列表,是否使得布尔 表达式简 单化?have boolean expressions been simplified by using additional boolean variables, boolean functions, and decision tables ?依赖性dependencies是否有代码在语句中造成现而易见的依赖

23、?does the code make dependencies among statements obvious ?函数的参数和命名是否造成了现而易见的依赖?do the name and parameters of routines make dependencies obvious ?是否必须使用注释来描述任何依赖,否则其是不清楚的?do comments describe any dependencies that would otherwise be un clear ?良好的注释技术good commenting technique注释否取新、清xe、正确?are comme nt

24、s up to date, clear, and correct?能否做到只要看到代码就立即理解其意思?can some one pick up the code and immediately start un dersta nding it?源代码列表是否包含了足够理解程序的信息?does the source listing contain enough information to understand the program?注释是否能解释代码的意图或概述它而不是重复它?(比如原因而不是方法)do comments explain the code s intent or summa

25、rize it, rather than just repeating it? (i.e. the why rather than the how)is the pdl-to-code process used?主要的注释和次要的区别是否清楚?is the distinction between major and minor comments clear?注释是否和代码对齐?are the comme nts inden ted the same as the code?注释风格是否易于维护和虑及注释的易改性?is the commenting style easy to maintain

26、and allow for easy modificati on of comme nts?是否避免行末注释?does the code avoid end line comme nts?注释是否能做到让读者了解下一步的意图?do comments prepare the reader s mind for what is to follow?每条注释是否是有价值的?(比如多余的、无关紧要的、无意义的注释是否已经被删除掉或改良了?)does every comment count? (i.e. have redundant, extraneous, or self-indulgent comm

27、ents been removed or improved?)工作于一个错误或运用未经验证的点子的代码是否已经注释?is code that works around an error or uses anundocumented featurecomme nted?是否每个控制语句都已经注释?is each con trol stateme nt comme nted?过长的或复杂的控制语句结构的末尾是否已注释?are the ends of lo ng or complex con trol structures comme nted?代码声明data declarations是否已经注释

28、说明了数据声明的单位?are un its on data declarati ons comme nted?是否已经注释说明数字数据的值范围?is the range of values on n umeric data comme nted?是否己经注释说明代码的含义?are coded meanings comme nted?是否已经注释说明输入数据的约束?are limitations on in put data commented?是否标记注释了比特位?are flags documented to the bit level?在每个全局函数的声明和使用处是否己经添加注释?has

29、each global variable been commented where it is declared and where it is used?面向对象编程object oriented programming总体general选择来实现面对对象设计的语言和技术是否支持。特性、设计设想?do the language and tech nologies selected for implementing an object orie nted desig n support the 00 features the desig n assumes?对于选择怎么样的语言和技术将影响对象

30、模型是怎么样构建,特别是关于 对象创建、通讯和持续是否有清楚的理解?is there a clear understanding of how the selected language and tech no logy may affect aspects of how the object model will be constructed especially in regards to object creation, communication, and persiste nee?对于对象模型的静态和动态的方面怎么样影响构造,特别是关于类的继 承、关联、聚合和委托是否有清楚的理解?i

31、s there a clear un dersta nding of how the static and dyn amic aspects of the object model will affect construction, especially in regards to class inheritance, association, aggregation, and delegation?是否创建了适当的惯例或其他机制来人工提供有用的。支持而不是由选择的语言或技术提供?have you created appropriate conventions or other mechani

32、sms to man ually provide useful 00 support not provided by your lan guage or tech no logy?是否已经创建了一致的模式、惯例和语言特性来确保一致的面向对象设计 的实现?have con siste nt patter ns, conven ti ons, and idioms bee n created to en sure con siste nt impleme ntati on of the object orie nted desig n?类和接口classes andces类的构建是否符合模块设计检查单的内容?does class con structi on follow the cxcheck_code-modules?接口类是否保持抽象的?are in terface classes kept abstract?对象是否适当和正确的时间被创建和销毁?are objects created and cleaned up appropriately and at the correct times?如果适合,是否在资源中需要引用指数的时候正确实现它?if appropriate, is reference counting

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论