个人作业-Week3:代码复审
Posted 根本没有名字
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了个人作业-Week3:代码复审相关的知识,希望对你有一定的参考价值。
软件工程师的成长
我在上大学之前,对于软件工程师之类并无概念,并且高初中的电脑课也从未提及过写代码之类的东西,更多的都是一些教一些办公软件的使用(笑,明明电脑课总是因为老师“有事”变成其他课,根本就没上过几节吧),来到大学后得知一些同学高中就开始搞各种竞赛后,我感到十分惊讶,什么,从小热爱学习XX,一路坚持,最终成为XX大师的人小说以外真的有啊。大学之后的课余时间更是鲜有与软件工程相挂钩的事情,用一句话概括,就是过着这些博主批判对象的生活,十分尴尬。选这个课就是觉得应该做出些改变了,然而在第一次作业就尴尬了,说实话第一次作业我先前还真写过,没错,就是地铁规划,一模一样的题目,于是想当然得觉得很简单,没有好好构思就直接动手,然后就出现了BUG调了很长时间。。然而具体的改变应该做些什么,还是不甚确定,希望能够在这学期中找明自己的道路。
Add:
关于他们的个人成长这里我作为文章中批判的对象看的着实缺乏实感,难以讲出什么感想。但这些经历让我切实感受到了读书的分量,作者的专业书籍的阅读量,着实令我震惊。我上大学之初便跟随C课程老师的推荐买下了poj上的那本书,并计划当时那个学期读完练完,然而每次拿起都是一时热情,一遇到各科作业等各种事情暂时放下后,下次拿起就是很长一段时间之后了。直至今日书还很新,以至于卖给学弟都没问题的程度,那些读了几十本书,自己动手写了诸多游戏的人的经历让我感到着实羞愧不已。然而即便是课本,上课的教材,也鲜有在课程结束之后再次拿起。平时看书倒是看得挺挺多,可都是闲书,说来惭愧,上大学后在图书馆借的最多的书是闲书。至于未来发展变数太多,不好妄下定论,不过捏他一句文中的话,磐石方能筑高台,现阶段先安心学习,多读书,增强自己的实力,以后的事情在慢慢考虑吧。
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:代码复审的主要内容,如果未能解决你的问题,请参考以下文章