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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值