Software Engineers Handbook/Supporting Processes/Coding Standards

      Here is the wikipedia entry for coding standards.

      Coding standards generally contain a set of conventions for a specific language. Items typically covered are:

      • Naming conventions including:
        • how descriptive and long the names should be,
        • what the capitalization scheme should be, and
        • what the postfix and prefix conventions are.
      • Physical organization, such as Definitions shall be located in the header files. and Do not include more than one class in one file.
      • Structure conventions, such as Opening and closing braces shall be located in the same column like this:
      {
          {
              // code in here
          }
      }
      
      • Style guides, such as Classes containing pointers shall have a virtual destructor. It is useful to include the reasoning and references for this type of standard.
      • Legacy code guidance, such as When editing existing code, follow the coding naming and structure conventions of the existing code.

      C++

      ↑Jump back a section

      Naming conventions

      "Always, always, always use good, unabbreviated, correctly-spelled meaningful names." -- Wiki: MeaningfulName

      Popular naming conventions (naming formats) include:

      • ALL_UPPERCASE_WITH_UNDERSCORES
      • all_lowercase_with_underscores
      • CamelCase
      • uppercaseOnlyInTheMiddle
      • _UnderscorePrefixedCamelCase
      • Camel_Case_With_Underscores

      For surprisingly long conversations about naming conventions, see Wiki: UnderscoreVersusCapitalAndLowerCaseVariableNaming; Wikipedia: CamelCase; Wiki: CamelCase; and "Underscores vs CamelCase".

      ↑Jump back a section

      Further reading

      ↑Jump back a section
      Last modified on 27 June 2009, at 20:06