• 第二次博客作业


    结对伙伴第一次作业的代码复审


    General

    • Does the code work? Does it perform its intended function, the logic is correct etc.

    代码可以正常工作

    • Is all the code easily understood?

    小伙伴的代码写得有些凌乱,主要有些被废弃的cpp仍未删除,增加了阅读难度

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

    并没有出现重复或者冗余的代码,但是留下了编写程序中的痕迹,比如无用类和cpp文件未删除等情况

    • Is the code as modular as possible?

    封装度很高,计算的过程进行了封装(calculation类)

    • Can any global variables be replaced?

    没有发现可以被替代的全局变量

    • Is there any commented out code?

    这位同学的代码其实挺干净的,没有被注释掉的代码。

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

    没有错误。简洁清楚…

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

    没有可以被替换为库函数的代码段。

    • Can any logging or debugging code be removed?

    这个代码中没有任何用于调试的代码段。

    Security

    • Are all data inputs checked (for the correct type, length, format, and range) and encoded?

    进行了基础的输入安全性检查,比如输入文件为空或者不存在会出现error提示

    • Where third-party utilities are used, are returning errors being caught?

    没有用到第三方代码……

    • Are output values checked and encoded?

    输出值没有经过检查

    • Are invalid parameter values handled?

    无效的参数确实进行了处理

    Documentation

    小伙伴的习惯非常好,有注释,代码简洁明了,易于理解

    Test

    单元测试都没有完成

  • 相关阅读:
    驱动Makefile
    ioremap
    file结构体
    Python基础-语法知识
    企业运营对 DevOps 的「傲慢与偏见」
    漂亮得不像实力派!
    如何用 OneAPM 优化你的 Node.js 应用?
    全球说:要给 OneAlert 点100个赞
    DevOps 和技术债务偿还自动化
    PHP 性能分析与实验(二)——PHP 性能的微观分析
  • 原文地址:https://www.cnblogs.com/cheney223/p/4847616.html
Copyright © 2020-2023  润新知