码迷,mamicode.com
首页 > 其他好文 > 详细

个人作业-Week3:代码复审

时间:2016-10-01 22:23:23      阅读:307      评论:0      收藏:0      [点我收藏+]

标签:

软件工程师的成长

  我在上大学之前,对于软件工程师之类并无概念,并且高初中的电脑课也从未提及过写代码之类的东西,更多的都是一些教一些办公软件的使用(笑,明明电脑课总是因为老师“有事”变成其他课,根本就没上过几节吧),来到大学后得知一些同学高中就开始搞各种竞赛后,我感到十分惊讶,什么,从小热爱学习XX,一路坚持,最终成为XX大师的人小说以外真的有啊。大学之后的课余时间更是鲜有与软件工程相挂钩的事情,用一句话概括,就是过着这些博主批判对象的生活,十分尴尬。选这个课就是觉得应该做出些改变了,然而在第一次作业就尴尬了,说实话第一次作业我先前还真写过,没错,就是地铁规划,一模一样的题目,于是想当然得觉得很简单,没有好好构思就直接动手,然后就出现了BUG调了很长时间。。然而具体的改变应该做些什么,还是不甚确定,希望能够在这学期中找明自己的道路。

General

  • Does the code work? Does it perform its intended function, the logic is correct etc.答:存在一些问题,如

技术分享

  • Is all the code easily understood?

  Yes

 

  • 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.

  Yes

  • Is there any redundant or duplicate code?

  No.

  • Is the code as modular as possible?

  No.

  • Can any global variables be replaced?

  No.

  • Is there any commented out code?

  No.

  • Do loops have a set length and correct termination conditions?

  No.

  • Can any of the code be replaced with library functions?

  No.

  • 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?

  No.

  • Are output values checked and encoded?

  Yes.

  • Are invalid parameter values handled?

  Yes.

Documentation

技术分享

 

  • Do comments exist and describe the intent of the code?

  No.

  • 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’?

  No.

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.

  Yes.

  • Do tests exist and are they comprehensive? i.e. has at least your agreed on code coverage.

  No.

  • Do unit tests actually test that the code is performing the intended functionality?

  No.

  • Are arrays checked for ‘out-of-bound’ errors?

  No.

  • Could any test code be replaced with the use of an existing API?

  No.

个人作业-Week3:代码复审

标签:

原文地址:http://www.cnblogs.com/thereisnoname/p/5926428.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!