6.1 Rules common to all identifiers

Identifiers use only ASCII letters and digits, and, in a small number of casesnoted below, underscores and very rarely (when required by frameworks likeAngular) dollar signs.

Give as descriptive a name as possible, within reason. Do not worry about savinghorizontal space as it is far more important to make your code immediatelyunderstandable by a new reader. Do not use abbreviations that are ambiguous orunfamiliar to readers outside your project, and do not abbreviate by deletingletters within a word.

  1. errorCount // No abbreviation.
  2. dnsConnectionIndex // Most people know what "DNS" stands for.
  3. referrerUrl // Ditto for "URL".
  4. customerId // "Id" is both ubiquitous and unlikely to be misunderstood.

Disallowed:

  1. n // Meaningless.
  2. nErr // Ambiguous abbreviation.
  3. nCompConns // Ambiguous abbreviation.
  4. wgcConnections // Only your group knows what this stands for.
  5. pcReader // Lots of things can be abbreviated "pc".
  6. cstmrId // Deletes internal letters.
  7. kSecondsPerDay // Do not use Hungarian notation.