syque.com

The Psychology of Quality and More

| Menu | Books | Share | Search | Settings |

C Style: Standards and Guidelines (contents)

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

Site Menu

| Home | Top | Settings |

Quality: | Quality Toolbook | Tools of the Trade | Improvement Encyclopedia | Quality Articles | Being Creative | Being Persuasive |

And: | C Style (Book) | Stories | Articles | Bookstore | My Photos | About | Contact |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

You can buy books here

More Kindle books:

And the big
paperback book


Look inside

 

Please help and share:

 

| Home | Top | Menu |

© Changing Works 2002-
Massive Content -- Maximum Speed