Coding Standard
From Toysoldiers
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
The above tips are taken from Pete Goodliffe's Code Craft: The Practice of Writing Excellent Code.