Defining Programming Standards   
for Professional Programmers 
  

         

Home

Contents

1: Standards

2: Psychological Factors

3: General Principles

4: Commenting

5: Naming

6: Code Layout

7: File Layout

8: Language Usage

9: Data Usage

10: Programming Usage

11: Implementing Standards

A: Example Standard

B: References

C: Glossary

Syque

About

Share this page:

Google
C Style
syque.com
Web

 

 

Books and
more at:

USA:

In association with amazon.com

UK:

In Association with Amazon.co.uk

Canada:

In Association with amazon.ca

 

 

CHAPTER 5 : Naming

PART 2 : COMMENTING AND NAMING

CHAPTER 5 : Naming
5.1 Constraints upon naming
5.2 Abbreviations
5.3 Short names
5.4 Separating words
5.5 Spelling of names
5.6 Naming functions
5.7 Indicating functional group
5.8 Naming variables
5.9 Indicating type
5.10 Naming replacement items
5.11 Naming Files and Directories
5.12 Summary

<--Prev page | Next page -->

 

5.12  Summary

·          Don't make names too long. Establish guideline lower and upper limits.

·          Use abbreviations to reduce length of names.

·          Keep a list of standard abbreviations.

·          Severely limit the use of single character (or very short) variables.

·          Use a consistent method to separate out words in names.

·          Spell words using correct English spelling.

·          Make names clearly unique. Use the 'telephone test'.

·          Use underscores singly and within the name.

·          Beware of numerals looking like letters.

·          Name functions with verb-noun combinations.

·          Name functions that return a non-status variable, as a variable.

·          Use standard prefixes to identify items in functional groups.

·          Name variables with noun-abstract noun combination.

·          Name structures with nouns and their members with abstract nouns.

·          Use 'Is' (or similar verbs) in booleans (or use 'b' prefix).

·          Consider using single letter prefixes to identify types.

·          Use capitals for replacement items, including macros.

·          Name files like variables, describing the functions they contain.

·          Use '.c' and '.h' for source code and header file suffixes.

·          Name directories like nested structures.

 

<--Prev page | Next page -->

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x

 

  © Syque 1995-2010

Massive Content -- Maximum Speed