for (iLoopIndx = 0; iLoopIndx < 10; iLoopIndx++)
{
if (iQuitFlag == 0)
{
...
}
}
When "single-stepping" through a program during debugging/execution, this
format makes the program's actions clearer - we can tell by which lines are
visited whether or not the if conditional evaluated to true or not.
if (iQuitFlag == 1)
break;
Again, this format allows clearer interpretation of program actions
when stepping through execution with a debugger.
The name of every function and globally-accessible value declared within the module should begin with that three character abbreviation followed by the underscore.
As overall rules we observe the following (directly quoted from the guidebook)
The moderator should also ensure that during the meeting the participants keep their emotions in check, and that the inspection meeting is used to find defects, not to find faults with the author
The product should simultaneously be checked against other relevant documents/products for compliance and correctness.
Each individual should record the time spent on this inspection process, and record each perceived defect in the product.
Copies of the recorded information are submitted to the moderator prior to the meeting, and the moderator reviews the logs to ensure the team is adequately prepared for the meeting.
The reader then begins a logical and orderly interpretation of the product, noting the function of items (e.g. might be paragraphs or sections in documents, functions or control blocks in source code, etc) and their relationship to the product and higher level documents.
Any inspector may interrupt the reader at any time when an item with a possible defect is read. A short discussion may be held if necessary (including questions directed at the author) and the defect is noted and categorized by the recorder. To keep the meeting on time, time limits may be placed on the discussion of any given suspected defect -- if the limit is reached then discussion is terminated and an "unresolved" tag is appended to the defect categorization. Time permitting, the unresolved defects may be returned to at the end of the meeting. Ideally consensus should be reached on each potential defect.
Defects should be prioritized (major or minor), and at the end of the meeting the moderator and/or team determines whether a reinspection is needed. If so, all major defects should be corrected before the reinspection. The author and moderator should meet briefly to estimate rework time and schedule a followup meeting.
Example Detailed Design Inspection Checklist
CLARITY
Is the overall function of each unit and the design
as a whole clearly described?
Is the intent of all units or processes documented?
Is unit design clearly represented, including data flow,
control flow, and interfaces?
COMPLETENESS
Have the specifications for all units in the program
been provided?
Have all the acceptance criteria been described?
Have the algorithms used to implement each unit been
clearly specified?
Have all the calls made by each unit been listed?
Has the history of inherited designs been documented
along with known risks?
COMPLIANCE
Does the document follow all relevant project and
organizational standards?
Has the design been created using the methodology
and tools required by the organization(s)?
CONSISTENCY
Are data elements named and used consistently
throughout the design?
Is the design of all interfaces consistent among
themselves and with the system interace specifications?
Does the detailed design, together with the architectural
design, fully describe the "as-built" system?
Does the design conform to the architectural design?
DATA USAGE
Are all the variables and constants (including pointers)
defined and initialized?
Are all defined data blocks actually used?
Are literals used where a constant data name should be used?
Are all data blocks specified as used (for structure and usage)?
Are all routines that modify data aware of the data block's usage
by all other routines?
Are all logical units, events, and synchronization flags defined
and initialized?
FUNCTIONALITY
Does the design correctly implement the specified algorithms?
Will the design fulfill the specified requirements and purpose?
INTERFACE
Do argument lists and return types match between calls, prototypes,
and function declaration with respect to number, type, and order?
Are all passed values (including return values) properly
defined and checked?
Are all input and output values properly defined and checked?
Is the data area of passed data mapped as the called routine
expects it to be?
Are messages issued for all error conditions?
Have the parameters been specified in terms of unit of measure,
range of values, accuracy, and precision?
LEVEL OF DETAIL
Is the ratio of code to design documentation less than 10-to-1?
Are all required module attributes defined?
Are all assumptions about design modules adequately documented?
Has sufficient detail been included to develop and maintain the code?
LOGIC CORRECTNESS
Is there logic missing?
Are greater-than, equal to, less-than-zero, or other
conditions each handled?
Are branches correctly stated (e.g. the logic is not reversed)?
Are actions for each case correct?
MAINTAINABILITY
Does each unit have high internal cohesion and low external coupling?
Are any programming standards in jeopardy because of the design?
Has the complexity of the design been minimized?
Does the design exhibit clarity, readability, and modifiability?
PERFORMANCE
Will all synchronization mechanisms perform as required?
Do processes have time windows?
Have all constraints, such as processing time and size, been specified?
RELIABILITY
Are defaults used and are they correct?
Are boundary checks performed on memory accesses (arrays,
structures, pointers, etc) to ensure memory is not altered?
Have interfaces been checked for inadvertent destruction of data
(e.g. unwanted side effects on passed parameters)?
Is error checking performed on inputs, outputs, interfaces, and results?
Are the potential effects of undesired events considered and planned for?
Do return codes for particular situations match the documented
global definitions?
TESTABILITY
Is the design described in a testable, measurable, and demonstratable form?
Can each unit be tested, demonstrated, analyzed, or inspected
to show that they satisfy requirements?
Does the design contain checkpoints to aid in testing (e.g. assertions,
conditionally-compiled code, etc)?
Have all test drivers, test data sets, and test results been described?
Can all logic be tested?
TRACEABILITY
Are all parts of the design traced back to the requirements?
Can all design decisions be tracked back to trade studies?
Have the unit requirements been traced to the specification documents?