This document is a peer review form for a TCS project code walkthrough. It contains a checklist with over 50 items to check for the code being reviewed, grouped into categories like naming conventions, clean code writing, and testing verification. The reviewer is to mark pass/fail for each item and provide comments explaining any failures or exceptions. The goal is to ensure the code meets coding standards and best practices.
This document is a peer review form for a TCS project code walkthrough. It contains a checklist with over 50 items to check for the code being reviewed, grouped into categories like naming conventions, clean code writing, and testing verification. The reviewer is to mark pass/fail for each item and provide comments explaining any failures or exceptions. The goal is to ensure the code meets coding standards and best practices.
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4
January 15, 2003 RTR-TCS-GLB-PR-FR-02 v2.
TCS PROJECT CODE WALKTHROUGH PEER REVIEW FORM
Configuration Items(s): Date: Author: Reviewer
Pass Check List Item Comments
/Fail 1. Model Enter non-compliance code to model in the comments section. 2. Code JavaDoc JavaDoc meets coding standards (i.e., Header, Methods and Attributes). Class Header meets coding standards. Comments meet coding standards. Assumptions are documented and meet the comments coding standards. Field comments are documented and meet the comments coding standards. Naming Conventions Naming Conventions meet the coding standards. Package names meet the coding standards. Class names meet the coding standards. Interface names meet the coding standards. Method names meet the coding standards. Field names meet the coding standards. Constant names meet the coding standards. Parameter names meet the coding standards. Writing Clean Code Code meets 3 space indentation coding standard. Indentation is consistent. Code does not exceed the maximum single line 80 character coding standard. Comments indentation meets coding standards. Parenthesis in the code are used to specify the order of operations. Each line of code performs one operation (note rationale any exceptions in comments). Miscellaneous Concepts Use of literals is commented. Literals are String and numbers as opposed to variables and constants Example: January 15, 2003 RTR-TCS-GLB-PR-FR-02 v2.0
Pass Check List Item Comments
/Fail new FileOutputStream(“config/elp/preferences.xml”) instead of new FileOutputStream(preferencesFile) Methods, variables, and classes in the code are not exposed at any higher level than is required by the application. The model specifies accessibility. Method accessibility meets model specification. Class modifiers meet the model specification. Classes do not have public data members. Classes do not contain test or debug comments. Classes do not contain dead code. Variables in the code are initialized at declaration time (note the exceptions in comments section). Code uses class name to access static variables or methods. Buffers in the code are instantiated according to the model. Object creation meets the model specification. Loop considerations are met. • Constant calculations are outside the loop • Local variables are used where applicable • Loop terminates properly StringBuffers are used for concatenation instead of String. For GUIs, similar names for label and the associated displayed/entered field are used. Variable usage is clear. For format conversion, conversion occurs right after input or before output. Use one format to do all computations For format conversion, the code uses one format to do computation. Nesting level of () does not exceed 5 (note the location of the nesting in the comments section). Nesting level of blocks {} should not exceed 7 (note the location of the nesting in the comments section). Methods do not exceed 200 lines. Duplicate sections of code do not exist (note the location of the duplication in the comments section). All "switch" and "if-else" statements have the January 15, 2003 RTR-TCS-GLB-PR-FR-02 v2.0
Pass Check List Item Comments
/Fail appropriate handling of the "default" or "else" cases. C++ Related "NULL" is used instead of "0" for setting and testing a null pointer. Functions that do not return a value are declared to be type void. The C++ form of I/O defined in iostream.h is used instead of stdio. Inline functions are used instead of function Macros (note the inline functions in the comments section). All scalar variable types (e.g. doubles, ints, longs, etc.) are initialized to a default value when declared (note the exceptions in comments section). Global variables, those that are declared outside of all blocks and classes, are not used (note exceptions in comments section). Global variables should be commented in the code. The new and delete operators are used for all heap-related dynamic memory allocation. The malloc() and free() operators are not used (note the exceptions in comments section). Statically allocated class instances are avoided, since the developer cannot control when their constructors are called. This can lead to unpredictable behavior when there is more than one statically allocated class instance (note the static in comments section). Every invocation of new is matched with exactly one invocation of delete (note exceptions in the comments). If [] are used with the new expression, then [] must be used with the delete. Classes and structures are used to encapsulate complex data structures. Destructors (for classes) are used to deallocate any dynamic data structures, etc., that have been allocated by or are owned by the class. 3. Black Box Test Verification Approval for Test Cases was received (note the date in the comments section). Black Box test outputs match desired outputs. January 15, 2003 RTR-TCS-GLB-PR-FR-02 v2.0
Pass Check List Item Comments
/Fail Approval for Black Box test was received (note the date in the comments section). 4. White Box Test Verification Approval for Test Cases was received (note the date in the comments section) White Box test outputs match desired outputs. Approval for White Box test was received (note the date in the comments section). 5. Issues Code provides description of the @todo (note all of the todo items in the comments section). Code comments description of other problems or concerns. Note the issues in the comments section.