个人作业—Week3

博客阅读体会

  阅读了十几位软件工程师前辈的博文,了解了前辈们作为一名软件工程师的成长经历,我有一些感触。

  这十几位前辈们的经历有着很大的差别,有的科班出身,有的则完全自学成才。不同的经历使得前辈们看问题的视角,表达的观点也有所不同。这些不同的观点中,也存在共同之处,体现在以下方面:

  前辈们都有着对于计算机科学,对于软件开发的热情,也很看重这一点。有的前辈初高中期间就有机会接触到计算机编程,在接触计算机过程中产生了兴趣,进而进行了实践。实践带来的成就感又进一步激发了兴趣。在自主的实践过程中培养了geek精神。在这样最初的兴趣的引导下,培养了专业的技术和对计算机科学的热情。而有些前辈在进入大学选定计算机专业后才接触到计算机,而他们也在深入地学习中逐渐培养了对计算机科学的热情。这份热情是职业自豪感的来源,也是做好一名软件工程师的必要条件。

  前辈们的主动精神和学习能力都非常强。计算机行业变化日新月异,能够在行业中立足、进步需要软件工程师具有很强的学习能力和主动精神。(即便是行业发展缓慢,想获得突出的成果也需要自己进行探索,学习基础教学以外的知识)这一点,对于非科班出身的从业者来说要求更高,毕竟在达到相同高度的情况下,没有人引导相较于有人引导难度更大一些。

  最后,我想关于科班教育提出我的看法。通过前辈们的博文,可以了解到,大部分前辈是科班出身,但也存在“半路出家”,非科班出身的软件工程师。有的博客中对于科班出身的必要性和重要性也有所讨论。对于这个问题,我的观点是:科班出身不是成为一名优秀软件工程师的必要条件,当然更不可能是充分条件;然而科班教育所要培养的是扎实的基础和开阔的眼界,这是成为一名优秀软件工程师的重要条件。这个观点不难论证,我想也很容易接受。其中我想强调的是基础的重要性,这也是很多人容易忽略的地方。

  

代码复审

  我对我的搭档陈鸿超同学的第一次作业进行了复审:

  根据http://blog.fogcreek.com/increase-defect-detection-with-our-code-review-checklist-example/提供的Code Review Checklist进行评价

 

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.
  • 命名规范性上总体做的不错,但还可以提升。程序中的类成员函数,变量,以及局部,全局变量都是使用驼峰法进行命名,个别变量没有遵循该规则。
  • Is there any redundant or duplicate code?
  • No
  • Is the code as modular as possible?
  • 程序中的部分功能模块做到了封装,顶层内容还可以进一步封装
  • Can any global variables be replaced?
  • 几乎不存在全局变量,但对顶层内容进行封装后可以避免全局变量的存在
  • Is there any commented out code?
  • 存在被注释掉的函数
  • Do loops have a set length and correct termination conditions?
  • Yes
  • Can any of the code be replaced with library functions?
  • 大概是没有
  • 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?
  • No

Documentation

  • Do comments exist and describe the intent of the code?
  • Yes
  • Are all functions commented?
  • 主要功能函数均有注释
  • 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?
  • Yes
  • 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.
  • 如果完成顶层的封装,将更利于测试
  • 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?
  • No
  • Are arrays checked for ‘out-of-bound’ errors?
  • Yes
  • Could any test code be replaced with the use of an existing API?
  • No
posted @ 2016-10-01 17:47  chengfr  阅读(144)  评论(1编辑  收藏  举报