zoukankan      html  css  js  c++  java
  • 第二次博客作业

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


    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

    单元测试都没有完成

  • 相关阅读:
    Ubuntu20.04本地安装Redash中文版
    ubuntu设置root密码
    qmake设置生成文件分类
    QML对象的构造函数和析构函数
    QString使用split按照某字符进行分解
    Qt的qDebug直接打印不添加头文件
    C++宏定义中的#
    Qt设置生成的文件路径
    QWidget禁止最大化
    js-去掉回车和空格
  • 原文地址:https://www.cnblogs.com/cheney223/p/4847616.html
Copyright © 2011-2022 走看看