个人作业Week3

1.软件工程师的成长

  相比于上述博客中提到的成功人士,我的经历相对浅薄一些。

  在上大学之前,在我的印象中,电脑=游戏机,身旁许多同学因为去网吧玩电脑而被批评,指责,即使是在学校的微机课上,留给我印象最深的也只有ps。而我选择计算机科学与技术的重要原因之一就是听老师讲计算机发展前景好,就业面积广。于是抱着这样的想法,我来到的北航。

  记得刚上大学的时候,我就是一个电脑方面的小白,什么软件,程序的,别说的编写了,就是使用过的也不多,身旁好多同学不仅对计算机操作熟练,而且高中乃至小学就开始进行计算机编程,说句实话,我很羡慕他们,我也梦想着有一天我会成为和他们一样优秀的人,可是在大一的上半学期,刚刚进入大学校园,第一次背井离乡,远离父母,我很不适应这样的生活。期末考试结束后,第一学期的好多基础课程并没有达到我理想的成绩,排名也一度落到的学院的后段。于是在寒假即将到来的时候,我就思考,这样浑浑噩噩的度过大学生活可不是我所想要的,大学学习和高中学习的不同之处在于,高中我们的学习计划是被老师学校安排好的,我们只是被动的在学习知识,而大学更加自由开放一些,每个人可以根据自己的喜好选择自己感兴趣的方向研究,于是,我在那个寒假买了一本《GDK图形游戏编程》来研究,希望从兴趣出发,在学习知识的同时,锻炼自己的编程能力。就是这样,我的大学学习之路开始了。

  真正对编程感兴趣是在第二学期,这学期我学会了c++编程语言,c++相比于上一学期学习的C语言来说在编程方便更加灵活,而且是面向对象的编程语言(当时还是不是很理解面向对象的编程思想),总之用起来很方便,于是结合我学习的GDK图形界面库,我在课余时间写了好多小游戏,边学边玩,边玩边练,编程水平有了很大提高。

  后来,上了大二,由于课程的需求,我又学会了java编程语言,这是我真正接触面向对象程序设计思想,尽管刚开始觉得面向对象程序设计没有什么意义,但是随着后来程序的工程量越来越大,代码量越来越多,我逐渐意识到了面向对象设计思想的重要性,这也使我对程序设计有了更加深刻的理解。

  有了前两个学期的积累,如今的第三学期,我又选择了软件工程这门课,通过这门课的学习,我希望能够进一步提高自己的编程能力,并学会如何在团队中工作,未来的IT行业,不会因为一个两个人的个人努力而有所成就,每个人都需要学会去适应团队,并融合到团队中,这样才能充分展现自己的能力,展现自己的才华,实现自己的梦想。

  最后,愿自己能通过这门课程的学习有所收获,愿这门课程越办越好。

2.代码复审

复审的伙伴是崔正龙

General

  • Does the code work? Does it perform its intended function, the logic is correct etc.
  • Mostly yes.用我自己的测试用例进行测试,代码基本都能给出正确的结果。但是输入没有做异常处理。
  • 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.
  • Mostly yes.我们的编程习惯基本相同。
  • Is there any redundant or duplicate code?
  • In my opinion, no.在我看来并没有重复/冗余的代码
  • Is the code as modular as possible?
  • So-so.核心的计算模块很好地模块化了。
  • Can any global variables be replaced?
  • No
  • Is there any commented out code?
  • Yes
  • Do loops have a set length and correct termination conditions?
  • Yes.循环都有良好的终止条件
  • 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?
  • No.对各种输入没有进行检查
  • Where third-party utilities are used, are returning errors being caught?
  • No.没有使用第三方的utilities。
  • Are output values checked and encoded?
  • No.没有对输出结果进行检查(说实话我没懂怎么个对输出结果进行检查法)
  • Are invalid parameter values handled?
  • No.没有对非法参数的处理

Documentation

  • Do comments exist and describe the intent of the code?
  • No.没有相关的文档或者readme
  • Are all functions commented?
  • No.所有的函数都没有注释
  • Is any unusual behavior or edge-case handling described?
  • Yes.对于输出结果中是否换乘的处理不具有扩展性,代码中包含了数据本身(是手动判断换乘站的……)
  • 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?
  • Yes.
  • Are arrays checked for ‘out-of-bound’ errors?
  • No.没有检查越界错误
  • Could any test code be replaced with the use of an existing API?
  • No.
原文地址:https://www.cnblogs.com/nrm1/p/5924265.html