codereview介绍[通俗易懂]

codereview介绍[通俗易懂]1.定义:Codereviewissystematicexamination(oftenknownaspeerreview)ofcomputersourcecode.Itis

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/167312.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 活动图求最少时间和松弛时间

    活动图求最少时间和松弛时间一、介绍PERT(Program/ProjectEvaluationandReviewTechnique)即计划评审技术,PERT是利用网络分析制定计划以及对计划予以评价的技术。构造PERT图,需要明确四个概念:事件、活动、松弛时间和关键路线。1、事件(Events)表示主要活动结束的那一点;2、活动(Activities)表示从一个事件到另一个事件之间的过程;3…

  • yuicompressor java_yuicompressor

    yuicompressor java_yuicompressorYUICompressor-TheYahoo!JavaScriptandCSSCompressorTheYUICompressorisaJavaScriptcompressorwhich,inadditiontoremovingcommentsandwhite-spaces,obfuscateslocalvariablesusingthesma…

  • 动态域名3322更新方法是什么_3322r

    动态域名3322更新方法是什么_3322r有人说放在cron不行,未做尝试,若不行可考虑编成shell试试

    2022年10月27日
  • 5g的控制信道编码方式_5gnr上行支持的信道编码

    5g的控制信道编码方式_5gnr上行支持的信道编码第1章物理层架构1.1物理层内部功能协议栈1.2物理层编码与处理过程(1)信道编码(2)调制解调(3)层映射(4)扩频预编码(仅仅用于上行,可选)(5)多天线技术的预编码(6)资源映射(7)OFDM变换本文主要探讨NR的信道编码技术第2章NR的物理层信道编码技术概述物理层信道编码不是单一的编码,而是有一组编码组成。以发送为例,阐述物理层信道编码的过程以及其中涉及到的主要,接收过程与之相反。(1)TrBloc……

    2022年10月29日
  • c++ 线程间通信方式「建议收藏」

    c++ 线程间通信方式「建议收藏」线程同步和线程互斥互斥:是指某一资源同时只允许一个访问者对其进行访问,具有唯一性和排它性。但互斥无法限制访问者对资源的访问顺序,即访问是无序的,线程间不需要知道彼此的存在。同步:是指在互斥的基础上(大多数情况),通过其它机制实现访问者对资源的有序访问,线程间知道彼此的存在。在大多数情况下,同步已经实现了互斥,特别是所有写入资源的情况必定是互斥的。少数情况是指可以允许多个访问者同时访问资源线程…

  • PHP中file_exists()函数不能检测包含中文的文件名的解决办法

    PHP中file_exists()函数不能检测包含中文的文件名的解决办法

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号