Code Review
Biju Abraham
Purpose
 Make sure that the code that is being
produced has sufficient quality to be released
 Poor structure
 Match business process
 Simple omissions
 Teaching tool to help developers learn when
and how to apply techniques to improve code
quality, consistency, and maintainability
 learn different and potentially better ways of
coding
Reviewer - The approach
 Ask questions rather than make statements
 Avoid the "Why" questions
 Remember to praise
 Make sure you have good coding standards to
reference (more to follow)
 Make sure the discussion stays focused on the code
and not the coder
 Remember that there is often more than one way to
approach a solution
 Solutions are the responsibility of the code owner
Developer – The Approach
 Remember that the code isn't you
 Create a checklist for yourself of the
things that the code reviews tend to
focus on
 Help to maintain the coding standards
Documented Review
 Put a summary comment at the top—
and be positive
 Use an electronic mechanism to record
the comments – Jira
 Make an upfront agreement that not
every question needs to be responded
to
Checklist
 Confirm Coding standards
 Confirm business standards (later)
 Unit Testing exists and demonstrated
 Verify dependencies for code change
 Provide code comments
Coding Standards - Detailed Checklist
 Interfaces
 Are they as specified by the
design
 Naming convention
 Capitalization

Interface

Parameters
 Comments
 Files
 File names
 Comments
 Organization
 Body of Code
 Declarations

Capitalization

Naming convention (i.e. for global
variables)

Comments

Meaningful names

Single line

Initialization

Placement
 Comments

Function header

Block

Single line

Training
 Statements

Single line

Compound

White lines

Blank spaces
 Other concerns 
Next Steps
 Standardize on
http://java.sun.com/docs/codeconv/CodeC
 Rong to provide presentation to
Developers on coding standards
 Checklist to be included in Jira soon

Test Presentation

  • 1.
  • 2.
    Purpose  Make surethat the code that is being produced has sufficient quality to be released  Poor structure  Match business process  Simple omissions  Teaching tool to help developers learn when and how to apply techniques to improve code quality, consistency, and maintainability  learn different and potentially better ways of coding
  • 3.
    Reviewer - Theapproach  Ask questions rather than make statements  Avoid the "Why" questions  Remember to praise  Make sure you have good coding standards to reference (more to follow)  Make sure the discussion stays focused on the code and not the coder  Remember that there is often more than one way to approach a solution  Solutions are the responsibility of the code owner
  • 4.
    Developer – TheApproach  Remember that the code isn't you  Create a checklist for yourself of the things that the code reviews tend to focus on  Help to maintain the coding standards
  • 5.
    Documented Review  Puta summary comment at the top— and be positive  Use an electronic mechanism to record the comments – Jira  Make an upfront agreement that not every question needs to be responded to
  • 6.
    Checklist  Confirm Codingstandards  Confirm business standards (later)  Unit Testing exists and demonstrated  Verify dependencies for code change  Provide code comments
  • 7.
    Coding Standards -Detailed Checklist  Interfaces  Are they as specified by the design  Naming convention  Capitalization  Interface  Parameters  Comments  Files  File names  Comments  Organization  Body of Code  Declarations  Capitalization  Naming convention (i.e. for global variables)  Comments  Meaningful names  Single line  Initialization  Placement  Comments  Function header  Block  Single line  Training  Statements  Single line  Compound  White lines  Blank spaces  Other concerns 
  • 8.
    Next Steps  Standardizeon http://java.sun.com/docs/codeconv/CodeC  Rong to provide presentation to Developers on coding standards  Checklist to be included in Jira soon