标签:
General | |
Does the code work? Does it perform its intended function, the logic is correct etc. | 可以运行。可以实现随机产生题目功能,无法实现判作业功能,逻辑正确,没有大的问题。生成的题目不但写在txt中还打印到控制台上了。 |
Is all the code easily understood? | 用的c语言语法,稍稍有些晦涩,没有注释,很难过。 |
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? | main函数非常长,非常非常长。 |
Can any global variables be replaced? | no |
Is there any commented out code? | no |
Do loops have a set length and correct termination conditions? | yes~否则就不能正常进行了 |
Can any of the code be replaced with library functions? | 能用的库函数都用了。在这里,c语言貌似没有很多现成的库函数可用 |
Can any logging or debugging code be removed? | no |
Security | |
Are all data inputs checked (for the correct type, length, format, and range) and encoded? | yes~ |
Where third-party utilities are used, are returning errors being caught? | 没有 话说并不知道c语言有没有出错catch的机制,貌似没有。 |
Are output values checked and encoded? | yes~ |
Are invalid parameter values handled? | 有些没有进行参数检查 |
Documentation | |
Do comments exist and describe the intent of the code? | 几 乎 没 有 注 释 超 级 sad |
Are all functions commented? | no |
Is any unusual behavior or edge-case handling described? | no |
Is the use and function of third-party libraries documented? | no! |
Are data structures and units of measurement explained? | no! |
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? | 程序中没有测试代码 |
Are arrays checked for ‘out-of-bound’ errors? | no |
Could any test code be replaced with the use of an existing API? | 程序中没有测试代码 |
总体来说,小伙伴的代码写得是很好的。尤其是以C语言语法来实现生成题目的功能,简直可以用神奇二字来称赞。然而有一些地方也确实对复审者不太友好,比如没有注释,以及不分页。在完成要求的功能上,没有产生括号,这点可以继续改进。程序中不包括测试代码,有些参数在使用之前没有检。不过我想这些都是我们的通病,我自己也要注意。希望小伙伴可以把要求的检查功能也实现就最好了。
标签:
原文地址:http://www.cnblogs.com/oushihuahua/p/4847290.html