Coding Standard

From Toysoldiers

(Difference between revisions)
Line 1: Line 1:
-
For the sake of consistency and easier to understand code, we will follow the [http://www.gnu.org/prep/standards/standards.html#index-names-of-variables_002c-functions_002c-and-files-74|GNU Coding Standard].
+
For the sake of consistency and easier to understand code, we will follow the [http://www.gnu.org/prep/standards/standards.html#index-names-of-variables_002c-functions_002c-and-files-74 GNU Coding Standard].
 +
 
 +
==Names==
 +
 
 +
===Variables===
 +
 
 +
===Functions===
 +
 
 +
===Types===
 +
 
 +
===C++ Namespaces and Java packages===
 +
 
 +
===Macros===
 +
 
 +
===Source Files===
 +
 
 +
==Self-Documenting Code==
 +
 
 +
===Simplicity===
 +
 
 +
===Meaningful Names===
 +
 
 +
===Atomic Functions===
 +
 
 +
===Descriptive Types===
 +
 
 +
===Name Constants===
 +
 
 +
===Emphasise Important Code===
 +
 
 +
===Group Related Information===
 +
 
 +
===Provide a File Header===
 +
 
 +
===Handle Errors Appropriately===
 +
 
 +
===Write Meaningful Comments===
 +
 
 +
==Literate Programming==
 +
 
 +
===Documentation Tools===
 +
 
 +
==Consistency==
 +
 
 +
===Fixed tab lengths===
 +
 
 +
===Braces===
 +
 
 +
===Language Usage===

Revision as of 16:53, 14 September 2007

For the sake of consistency and easier to understand code, we will follow the GNU Coding Standard.

Contents

Names

Variables

Functions

Types

C++ Namespaces and Java packages

Macros

Source Files

Self-Documenting Code

Simplicity

Meaningful Names

Atomic Functions

Descriptive Types

Name Constants

Emphasise Important Code

Group Related Information

Provide a File Header

Handle Errors Appropriately

Write Meaningful Comments

Literate Programming

Documentation Tools

Consistency

Fixed tab lengths

Braces

Language Usage

Personal tools