|
These standards are guidelines to help you write your code. Every organization has guidelines.
These are mine. Please adhere to these guidelines - points will be deducted if you do not.
50-75% of a software system's cost is consumed by maintenance which includes fixing problems, adapting code to new environments and adding functionality. The readability of the program directly affects maintainability. The following standards are meant to enhance readability. If you write great code, but the code is unmaintainable, you cost the company money and you are a liability. Yes, it takes more time initially to write maintainable code, but there is a large return on the investment. C++ Coding Standards |
C++ Coding Standards::
Back to Top
Some of the important issues to address are::
Assembly is cryptic and so the burden to document is higher for you. Nothing is obvious in assembly language - document, document, DOCUMENT! Why, what and how are all important. An example:
bad:
Back to Top
Identification: Name / Date/ Class Form Organization: List names of all code routines with one sentence description. OR Each Event Procedure: Minimum one sentence description. Explain more as needed.
All of the above PLUS: Program Purpose:Why is the program being written? What problem does it solve? A few sentences or a paragraph here.
Identification: Name / Date/ Class Module Organization: List names of all code routines with one sentence description. Each Procedure: Minimum one sentence description. Explain more as needed.
Explain WHY things are being done. Don't just repeat the obvious - give the reader some insight! Use meaningful names for variables, constants and functions. Use indenting to show loops and branches. Use white Space to make code readable. Back to Top
|