General |
|
Does the code work? Does it perform its intended function, the logic is correct etc. |
代码并没有完全完善,生成功能和计算功能实现但是仍有缺陷,检验功能还未开发 |
Is all the code easily understood? |
能理解,虽然我们俩使用的语言不是一样的,但是每一部分他都很细心加了注释。 |
Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, indentations, formatting, and comments. |
有一些出入,因为一些默认的设置或者自己的习惯,比如等号两边都留有空格,所以看他的代码有些紧凑 |
Is there any redundant or duplicate code? |
有一些地方可以简化一下 |
Is the code as modular as possible? |
采用的C++编写,除了random其他函数都放在Main函数里面有些过于紧凑,可以将里面的函数模块化 |
Can any global variables be replaced? |
全局变量少,一些用来传递的参数可以设置为全局的 |
Is there any commented out code? |
有一部分未完成的代码被注释掉了 |
Do loops have a set length and correct termination conditions? |
是的 |
Can any of the code be replaced with library functions? |
能用到库函数的都用到了 |
Can any logging or debugging code be removed? |
有的被注释到了 |
Security |
|
Are all data inputs checked (for the correct type, length, format, and range) and encoded? |
并没有 |
Where third-party utilities are used, are returning errors being caught? |
没有 |
Are output values checked and encoded? |
没有,存在生成的真分数分母为0的情况没有处理 |
Are invalid parameter values handled? |
没有 |
Documentation |
|
Do comments exist and describe the intent of the code? |
注释明确的指出了代码的内容 |
Are all functions commented? |
所有的function都有注释 |
Is any unusual behavior or edge-case handling described? |
没有 |
Is the use and function of third-party libraries documented? |
是的 |
Are data structures and units of measurement explained? |
重要的都进行了解释 |
Is there any incomplete code? If so, should it be removed or flagged with a suitable marker like ‘TODO’? |
有不完整的代码 |
Testing |
|
Is the code testable? i.e. don’t add too many or hide dependencies, unable to initialize objects, test frameworks can use methods etc. |
程序并不能经得起测试 |
Do tests exist and are they comprehensive? i.e. has at least your agreed on code coverage. |
程序中没有包含测试用例 |
Do unit tests actually test that the code is performing the intended functionality? |
程序中没有包含unit tests,需要人工测试 |
Are arrays checked for ‘out-of-bound’ errors? |
数据结构多使用数组,全部设定在数组范围内并没有出现out-of-bound |
Could any test code be replaced with the use of an existing API? |
程序中没有包含test code |
我的结队伙伴并没有完成自己的全部功能,所以以上很多审查内容不能完全完成。就他目前所完成的功能进行审查和复核。
个人程序分析:
对照以上表格的内容,我觉得自己并不完善的地方有测试部分,并没有包含test code。生成计算式的时候总会出现随机数生成不随机的情况,所以表达式的生成很有限制。