`
robinfung
  • 浏览: 55124 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Code Review

阅读更多

Code review

Optimization
 - Optimal Use of String Literals
   - Use string buffer for concatenation operations instead of strign literal
 - Avoid Variable Instantiation Inside Loops
 - Optimize Loop Exit Condition
   - sample:

     Wrong Block
     While(Loop Exit Condition Through Method Call) {
         Loop Processing
     }
    
     Right Block
     Loop Exit Condition Variable = Loop Exit Condition Through Method Call
     While (Loop Exit Condition Variable) {
         Loop Processing
     }

 - Conduct Read/Write Operations in Blocks
 - Perform Lazy Instantiation of Variables
 - Use Synchronization Carefully
 - Optimize Object Allocation and De-allocation
   - Control Cyclomatic Complexity
 
Code Maintainablility
 - Adhere to Coding Standards
   Every development assignment should have a set of coding standards, which form the program code template. Adherence to coding standards will help:
   - Achieve consistency in work products
   - Provide quality deliverables, because coding standards are created by experts to capture best practices
   - Make the program easy to understand and maintain it by improving code readability
   - Make reviews and sign-offs less time-consuming
   - Reduce rework, as it directly impacts schedule and cost
 - Use Consants
 - Avoid the Use of Deprecated Methods

UI Standards
 - Avoid Hard Coding of String Literals
 - Avoid Hard Coding of UI Component Dimensions
 - Use Threading Effectively

Exception Handing
 - Ensure Database Resources are Released
 - Put Loop Inside Exception Handling Blocks
 Wrong Block
 Loop Start
   Code Block
   Exception Handing {
   }
 Loop End

 Right Block
 Loop Start
   Code Block
 Loop End
 
 Exception Handing {
 }
 - Log Exceptions with Debugging Infromation

Database Resources Handing
 - Open connection Just-in-time
 - Optimaize the Frequency of Database Access
 - Perform Database Operations in Bathes
 - Optimazie Use of Database Tables Partitioning
 - Optimazie Use of Database Table Indexing
 - Optimazie Use of Database Table Views
 - Optimazie Use of Database Stored Procedures

Metrics Relevant to Code Review
 - Defect Density
   Defect Density = Number of Defects Found / Total Lines of Code
 - Cost of Quality
   Cost of Qulity(CoQ) = [(Appraisal Cost + Preventive Cost + Failure Cost) / Total Project Effort] * 100%
    Appraisal Cost = Hours spent on reviews and testing
    Preventive Cost  = Hours spent on quality audits, defect prevention, metrics data collection, and analysis
    Failure Cost = Hours spent on fix and rework
    Total Project Effort = Total hours spent by the project(development, project management, and quality activities)
 - Cost of Rework
   Cost of Rework(CoR) = (Failure Cost / Total Project Effort) * 100 %
 - Phase Containment Effectiveness
   Phase Containment Effectiveness = (Number of Defects Contained / Number of Defects Injected) * 100%
 - Defect Orgin
   Defect Origjin = Number of Defects Injected / Total LOC
   LOC: the number of defects injected per Line of Codes
 - Defect Injection Rete
   Defect Rate = Number of Defects Injected /Total Development Effort
    Number of Defects Injected = Number of defects injected per stage found prior to and after delivery or release to onshore or client in a requirement of release.
    Total Development Effort = Sum of development effort expended per stage of work scope for the requrement or release. This excludes management, training, and defect prevention hours.
 - Peer Review Effectivess
   Peer Review Effectivess = [Number of Defects Found/ (Number of Defects Found + Number of Defects Missed)] * 100%
    Number of Defects Found = Number of defects found per stage
    Number of Defects Missed = Total number of peer review defects from current and preceding stages that were detected in subsequent stages
 - Peer Review Efficiency
   Peer Review Efficiency = Number of Defects Found / Total Time Spent on Peer Reviews
    Number of Defects Found = Number of defects found per stage
    Total Time Spent on Peer Reviews = Hours spent on review preparation time, review time, and documenting review points per stage
 - Peer Review Compliance
   Peer Review Compliance = (Number of Peer Reviews Conducted / Number of Peer Reviews Planned)*100%
 - Delevered Defect Density
   Delevered Defect Density = Number of Defect Found After Delivery/ Total Lines of Code

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    Modern Code Review- A Case Study at Google.pdf

    Employing lightweight, tool-based code review of code changes (aka modern code review) has become the norm for a wide variety of open-source and industrial systems. In this paper, we make an ...

    Source Insight CodeReview宏,增加使用说明

    **Source Insight CodeReview宏**是专门针对Source Insight这款强大的源代码查看和编辑工具设计的一套扩展功能,主要用于代码评审和统计。Source Insight以其强大的代码导航、语法高亮和实时分析能力,深受程序员...

    IDEA代码检视插件Code Review Helper(支持团队协同)

    在实际使用中,下载的压缩包文件"IntellijIDEA-CodeReview-Plugin-master"包含了插件的源代码,开发者可以对其进行定制或扩展以满足特定团队的需求。安装插件通常包括以下几个步骤: 1. 解压下载的压缩包。 2. 打开...

    Source Insight 宏 codeReview.em

    CodeReview工具的作用:1.减少评审人的缺陷记录和汇总时间,方便责任人查找问题出处;2.检视完成后生成检查报告,代码作者点击按钮可以直接找到错误处;3.任务责任人修改完成后,直接修改问题状态,组织者按快捷键...

    CodeReview工具Jupiter

    Code Review的作用和意义已在很多技术团队内达成共识,可是很多时候并未被有效执行,甚至被认为是一项费时费力的工作。借助一些工具可以更容易,更有效率地来进行Code Review,本文介绍的Jupiter即是其中之一。  ...

    静态测试方法之代码审查(CodeReview)的清单

    静态测试方法之代码审查(CodeReview)的清单。代码审查可以帮助提高代码质量,避免由于代码习惯而造成的bug。下面列出的这些要点因该可以作为大部分代码审查的指导,如果是Java应用的话,这些建议应该被视作最佳实践...

    CodeReview工具

    Code Review是软件开发过程中的一个重要环节,它有助于提高代码质量,发现潜在的错误,以及确保团队成员间的代码风格一致。本文将详细介绍两款Eclipse插件——Jupiter和Reviewclipse,它们是进行Code Review的有力...

    代码审查CodeReview的最佳实践

    我一直认为CodeReview(代码审查)是软件开发中的最佳实践之一,可以有效提高整体代码质量,及时发现代码中可能存在的问题。包括像Google、微软这些公司,CodeReview都是基本要求,代 我一直认为CodeReview(代码...

    Redmine插件Code Review使用介绍

    在Redmine中,Code Review插件是一个重要的扩展,它致力于帮助开发团队进行代码审查,提升代码质量和团队协作效率。本文将详细介绍如何使用Redmine的Code Review插件。 首先,安装Code Review插件是必要的步骤。...

    CodeReview常見代碼問題

    ### CodeReview中的常见代码问题分析 #### 一、引言 在软件开发过程中,CodeReview(代码审查)是一项至关重要的活动。它不仅有助于提高代码质量,还能促进团队成员之间的知识共享和技术交流。本文将深入探讨Code...

    code review

    `CodeReview.em`可能是一个包含了代码审查过程记录或结果的文件,而`codereivew.docx`可能是详细的代码审查报告,其中可能详细列出了审查过程中发现的问题、建议的修改以及后续的行动计划。通过这两个文件,团队成员...

    Steven Code Review 代码在线审查

    Steven Code Review 2009.12M1发布包.rar 代码在线审查工具 @date: 2009-12-28 @author: YF @email: yifi@tom.com 功能: 1 方便学员学习教师的代码,无需在本机运行IDE即可以代码加亮的方式查看服务器共享的代码...

    Codereview 代码审查工具(国人开发)

    软件介绍: 一、软件特色 功能丰富:实现文件内容、度量、命名、注释、类图、Halstead等审查。 简单易用:无需安装,直接使用,直接删除;... 直观可视:分析结果与源代码在同一界面显示对照,...http://www.codereview.com.cn

    code review tool from google

    标题:Code Review Tool from Google 描述:Code review on the web 根据给定的文件信息,我们可以提炼出关于代码审查(Code Review)及其在谷歌开发流程中的应用的关键知识点。 ### 什么是代码审查? 代码审查...

    Java项目开发CodeReview 常见问题实例分析及指南

    CodeReview的基本手段还是需要技术经理通过人工检查项目成员的代码,来将各种问题扼杀在开发阶段,但是不同经验及技术水平的经理在review同一段代码所发现的问题可能相差比较大,不同的Team可能因此产生的效果也不同...

    code review代码检测原理

    **代码审查(Code Review)是软件开发过程中的一个重要环节,旨在提高代码质量,发现潜在的错误,提升团队协作效率,并确保代码遵循最佳实践和项目规范。本文将深入探讨代码审查的原理、步骤以及如何有效地执行代码...

    C++ Code Review检查清单

    C++代码 Code Review时使用的检查清单和问题记录模板

    Best kept secrets of peer code review

    首先,我们需要理解“同行代码审查”(Peer Code Review)的概念。这是一种质量保证活动,开发人员互相检查彼此的代码,旨在发现并修复错误,改进设计,以及传播知识和最佳实践。这个过程不仅限于找出错误,还在于...

    CodeReview.em

    source insighet 集成code review,代码审核时非常好用,使用起来比较简单,加入工程,同步,添加快捷键,使用快捷键即可正常使用,保存即可。

Global site tag (gtag.js) - Google Analytics