|
|
|
|
|
Activity:
Review Code
|
|
Participating Roles
Responsible:
Developer |
A code review is used to identify areas that might cause problems for future development and testing. Code reviews also provide additional insight from other developers on how code should be written. With reviewed code, others working in the same area can follow the precedents set by previous developers. Buddy reviews require a single, knowledgeable peer to go through the changes with the developer before checking in the code. Unit tests must be completed and code analysis must be performed. Reviews should concentrate on areas that cannot be checked via the compiler or code analysis such as performance, readability, or security.
Entry Criteria
Dependencies:
- A reviewer familiar with the code area is available.
Sub-Activities
|
1 |
Verify Name Correctness |
- Make sure the names of the classes and the methods are properly defined to represent the functionality of the code segment.
|
2 |
Verify Code Relevance |
- The code being reviewed is relevant to the task for which the code is written. There should be no code changes allowed that do not address the functionality to be implemented or corrected.
|
3 |
Verify Extensibility |
- The code is written so it can be extended if it is the intention to do so, or reused in other areas of the system.
- Strings constants used in the code are properly placed in resources that can be internationalized.
|
4 |
Verify Minimal Code Complexity |
- Repeated code can be simplified into common functions.
- Loops are used where appropriate.
- Similar functionality is place in a common procedure or function.
|
5 |
Verify Algorithmic Complexity |
- The number of execution paths in the code being reviewed is kept to a minimum. Only recognized paths are allowed to exist.
|
6 |
Verify Code Security |
- Check the code for the protection of assets, privilege levels, and the use of data at entry points. Verify the code against the checklists found in the Patterns and Practices security code review index (see link to the left).
|
7 |
Fix Review Changes |
- Fix review changes, compile, perform unit tests, and perform code analysis. Debug and fix the code if any unit tests are broken.
|
Exit Criteria
|
The reviewer agrees on all changes to the code base for the development task. | |
|
|
|
|
© 2005, 2006 Microsoft Corporation. All rights reserved.
Version 4.0.1 |
|