The 'n' prefix
ID | NAMING-25 |
Title | The prefix n should be used for variables that represent a number of things. |
Priority | Strongly recommended |
Severity level | 8 |
Description | The prefix n should be used for variables that represent a number of things. Do not use the prefix for other purposes and do not use other prefixes for representing the number of things. |
Rationale | Variables starting with this prefix can easily be identified. |
Avoid:
numberOfFiles
nrCars
lineCount
Instead use:
nFiles
nCars
nLines