Difference between revisions of "Cpp Coding Standards"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (sorting)
m
Line 1: Line 1:
 +
Note: The subpages of this page are work in progress.
 +
      There may be some inconsistencies until
 +
      Wednesday, Nov 29 2006.
 +
 
=== Purpose ===
 
=== Purpose ===
 
[[Coding standards]] are a part of [[defect prevention]]. They gather rules, advice and best practices for developing software, especially the code writing part. Here are listed some ideas what such standards could be for developing with C++ and within the [[OpenOffice.org]] project.  
 
[[Coding standards]] are a part of [[defect prevention]]. They gather rules, advice and best practices for developing software, especially the code writing part. Here are listed some ideas what such standards could be for developing with C++ and within the [[OpenOffice.org]] project.  

Revision as of 16:48, 28 November 2006

Note: The subpages of this page are work in progress.
      There may be some inconsistencies until 
      Wednesday, Nov 29 2006.

Purpose

Coding standards are a part of defect prevention. They gather rules, advice and best practices for developing software, especially the code writing part. Here are listed some ideas what such standards could be for developing with C++ and within the OpenOffice.org project.

Standards and Reviews

Coding standards and reviews are related. Reviews help getting to know standards and bringing them into the real life of the code. Reviews also help to improve standards and disclose needed changes.

The standards are parted into topics. Each topic is intended to cover an area that is small enough to be the focus of a code review session. The summary of rules regarding one topic should not cover more than "one page" of paper or on screen. This way one topic's summary can be printed out and be used as checklist when studying code.

Most times a summary alone is not enough to understand and discuss a rule, also there are exceptions and hints for realization. So, for each rule there will be a separate wiki page to discuss it.

Identifying Rules

Ids enable to make notes about rules (e.g. during reviews) and help when talking about them. Because items may be added or sorted out, such ids are not just cardinal numbers, but strings that do not change, when other items are added or removed. Each topic has an id, and each rule within the topic has an id itself.

Example: FDESIGN:OneTask is the rule with the id "OneTask" which belongs to the topic Function Design with the id "FDESIGN".


Topics by Problem Domain

Topics may appear at multiple domains.

Middle- and Lowlevel Design

Classes

Functions and Implementation Generally

Preferred vs. Discarded Types and Habits

Files, Formatting, Documentation

Principles and Process


Topics in Alphabetical Order


Personal tools