Coding Standard Assignment Kit
Coding Standard Assignment Kit
PSP Fundamentals
The Software Engineering Institute (SEI) is a federally funded research and development center sponsored by the U.S. Department of Defense and operated by Carnegie Mellon University.
This material is approved for public release. Distribution limited by the Software Engineering Institute to attendees.
Coding/Counting Standard
September 2011
Objectives
Coding/Counting Standard
September 2011
Coding/Counting Standard
September 2011
(continued)
Coding/Counting Standard
September 2011
Capitalization
Examples
Coding/Counting Standard
September 2011
Suggestions
Coding/Counting Standard
September 2011
Reuse Instructions
- Describe how the program is used. Provide the declaration format, parameter values and types, and parameter limits. - Provide warnings of illegal values, overflow conditions, or other conditions that could potentially result in improper operation.
Reuse Example
Use descriptive names for all variables, function names, constants, and other identifiers. Avoid abbreviations or single letter variables.
(continued)
Coding/Counting Standard
September 2011
Write programs with sufficient spacing so they do not appear crowded. Separate every program construct with at least one space. Indent every level of brace from the previous one. Open and closing braces should be on lines by themselves and aligned with other.
each
Capitalization
- Capitalized all defines. - Lowercase all other identifiers and reserved words. - Messages being output to the user can be mixed-case so as to make a clean user presentation.
Capitalization Example
Coding/Counting Standard
September 2011