1. 定义:

Code review is systematic examination (often known as peer review) of computer source code. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills. Reviews are done in various forms such as pair programming, informal walkthroughs, and formal inspections

2. 介绍

Code reviews can often find and remove common vulnerabilities such as format string exploitsrace conditionsmemory leaks and buffer overflows, thereby improving software security. Online software repositories based on Subversion (with Redmine or Trac), MercurialGit or others allow groups of individuals to collaboratively review code. Additionally, specific tools for collaborative code review can facilitate the code review process.

Automated code reviewing software lessens the task of reviewing large chunks of code on the developer by systematically checking source code for known vulnerabilities. A 2012 study by VDC Research reports that 17.6% of the embedded software engineers surveyed currently use automated tools for peer code review and 23.7% expect to use them within 2 years.[2]

Capers Jones' ongoing analysis of over 12,000 software development projects showed that the latent defect discovery rate of formal inspection is in the 60-65% range.[ambiguous] For informal inspection, the figure is less than 50%.[citation needed] The latent defect discovery rate for most forms of testing is about 30%.[3]

Typical code review rates are about 150 lines of code per hour. Inspecting and reviewing more than a few hundred lines of code per hour for critical software (such as safety critical embedded software) may be too fast to find errors.[4][5] Industry data indicates that code reviews can accomplish at most an 85% defect removal rate with an average rate of about 65%.[6]

The types of defects detected in code reviews have also been studied. Based on empirical evidence it seems that up to 75% of code review defects affect software evolvability rather than functionality making code reviews an excellent tool for software companies with long product or system life cycles

3.分类:

Code review practices fall into three main categories: pair programming, formal code review and lightweight code review.[1]

Formal code review, such as a Fagan inspection, involves a careful and detailed process with multiple participants and multiple phases. Formal code reviews are the traditional method of review, in which software developers attend a series of meetings and review code line by line, usually using printed copies of the material. Formal inspections are extremely thorough and have been proven effective at finding defects in the code under review.[citation needed]

Lightweight code review typically requires less overhead than formal code inspections, though it can be equally effective when done properly.[citation needed]Lightweight reviews are often conducted as part of the normal development process:

  • Over-the-shoulder – One developer looks over the author's shoulder as the latter walks through the code.
  • Email pass-around – Source code management system emails code to reviewers automatically after checkin is made.
  • Pair Programming – Two authors develop code together at the same workstation, such is common in Extreme Programming.
  • Tool-assisted code review – Authors and reviewers use specialized tools designed for peer code review.

Some of these may also be labeled a "Walkthrough" (informal) or "Critique" (fast and informal).

Many teams that eschew traditional, formal code review use one of the above forms of lightweight review as part of their normal development process. A code review case study published in the book Best Kept Secrets of Peer Code Review found that lightweight reviews uncovered as many bugs as formal reviews, but were faster and more cost-effective.

4.常见的code-review tool

开源软件:

比较:

Software Maintainer Development status License VCS supported Platforms supported Workflow Cost
Differential (Phabricator) phabricator.org actively developed Apache v2 Subversion, Git, Mercurial PHP pre-commit, post-commit Free
Gerrit Shawn Pearce actively developed Apache v2 Git Java EE pre-commit Free
Review Board reviewboard.org actively developed MIT CVS, Subversion, Git, Mercurial, Bazaar, Perforce, ClearCase, Plastic SCM Python mainly pre-commit Free
Rietveld Guido van Rossum actively developed Apache v2 Git, Subversion Python pre-commit Free

reference:

http://en.wikipedia.org/wiki/Code_review

http://en.wikipedia.org/wiki/List_of_tools_for_code_review

codereview介绍的更多相关文章

  1. Linux下服务器端开发流程及相关工具介绍(C++)

    去年刚毕业来公司后,做为新人,发现很多东西都没有文档,各种工具和地址都是口口相传的,而且很多时候都是不知道有哪些工具可以使用,所以当时就想把自己接触到的这些东西记录下来,为后来者提供参考,相当于一个路 ...

  2. 关于CodeReview(java)(转)

    关于codereview,在平时的开发中,经常忽略的环节,参照目前介绍写好代码的几本书和之前掉进的坑,做了一个总结,分享出来. 为什么要做 通过review规避一些代码层面的问题 提升可读性,方便后续 ...

  3. java中的codereview

     关于codereview,在平时的开发中,经常忽略的环节,参照目前介绍写好代码的几本书和之前掉进的坑,做了一个总结,分享出来. 为什么要做 通过review规避一些代码层面的问题 提升可读性,方 ...

  4. Git Review + Gerrit 安装及使用完成 Code-Review

    转载自:https://cloud.tencent.com/developer/article/1010615 1.Code Review 介绍 Code Review 代码评审是指在软件开发过程中, ...

  5. CSS3 background-image背景图片相关介绍

    这里将会介绍如何通过background-image设置背景图片,以及背景图片的平铺.拉伸.偏移.设置大小等操作. 1. 背景图片样式分类 CSS中设置元素背景图片及其背景图片样式的属性主要以下几个: ...

  6. MySQL高级知识- MySQL的架构介绍

    [TOC] 1.MySQL 简介 概述 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司. MySQL是一种关联数据库管理系统,将数据保存在不同的表中,而 ...

  7. Windows Server 2012 NIC Teaming介绍及注意事项

    Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...

  8. JavaScript var关键字、变量的状态、异常处理、命名规范等介绍

    本篇主要介绍var关键字.变量的undefined和null状态.异常处理.命名规范. 目录 1. var 关键字:介绍var关键字的使用. 2. 变量的状态:介绍变量的未定义.已定义未赋值.已定义已 ...

  9. HTML DOM 介绍

    本篇主要介绍DOM内容.DOM 节点.节点属性以及获取HTML元素的方法. 目录 1. 介绍 DOM:介绍DOM,以及对DOM分类和功能的说明. 2. DOM 节点:介绍DOM节点分类和节点层次. 3 ...

随机推荐

  1. 剑指Offer:打印从1到最大的n位数

    题目:输入数值n,按顺序打印从1到最大的n位数,例如输入n=3,则从1,2,3,一直打印到999 陷阱:若使用循环遍历 1- 999...9 并依次输出,当位数n过大时,无论将其存入int或long或 ...

  2. 实体框架Entity Framework 4.1快速入门

    介 绍 在旧的Entity 框架中,开发者可以从已存在的数据库中产生业务实体的模型,这种开发方法被称为数据库驱动的开发方法.而在4.1的Entity Framework中,支开发者先创建实体业务类,然 ...

  3. MySQL查询执行过程

    MySQL查询执行路径 1. 客户端发送一条查询给服务器: 2. 服务器先会检查查询缓存,如果命中了缓存,则立即返回存储在缓存中的结果.否则进入下一阶段: 3. 服务器端进行SQL解析.预处理,再由优 ...

  4. HDU 1394-Minimum Inversion Number(BIT)

    题意: 给你n个数字的序列 每次把第一个数字放到最后 得到一个新序列 一共有n个序列求这些序列中哪个序列含最小的总的逆序数 (输出最小总逆序数) 分析: 用BIT求出初始各数的逆序数,第一个数放最后它 ...

  5. 黑盒测试用例设计方法&理论结合实际 -> 场景法

    一概念 现在的软件几乎都是用事件触发来控制流程的,事件触发时的情景便形成了场景,而同一事件不同的触发顺序和处理结果就形成事件流.这种在软件设计方面的思想也可以引入到软件测试中,可以比较生动地描绘出事件 ...

  6. [MySQL-1] mysql error 1101 blob/text column can't have a default value

    在MySQL Query Browser上创建一个含有TEXT类型的字段,创建不成功,报错:mysql error 1101 blob/text column can't have a default ...

  7. 清理vs工程文件(python2.7)

    本文记录了两种方法,用于对vs目录的清理工作,这两种方法都是用python2.7实现的,一个是基于文件的扩展名,一个是基于文件的大小: 基于文件大小的清理脚本: #-*- coding:utf-8 - ...

  8. 用JSP做后台管理系统

    添加新闻 /**  * 获取从页面读取的数据  * @param request  * @return 单个新闻信息  * @throws UnsupportedEncodingException   ...

  9. HDU-4616 Game 树形DP

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4616 比较典型的树形DP题目,f[u][j][k]表示以点u为子树,经过 j 个陷阱的最大值,其中k= ...

  10. Delphi外挂开发网站

    http://cheatengine.org/http://wenku.baidu.com/view/2d5de818964bcf84b9d57b15.html   [delphi外G]http:// ...