Changes for page Expressive Names

Last modified by chrisby on 2023/11/18 17:45

From version 1.11
edited by chrisby
on 2023/11/18 16:24
Change comment: There is no comment for this version
To version 1.10
edited by chrisby
on 2023/11/18 16:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,7 +4,7 @@
4 4  * **Avoid misinformation.** For example, ambiguities, confusion with similar names or easily confused characters (l and 1, O and 0).
5 5  * **Make differences clear.** Avoid very similar expressions and blank words are redundant (a, an, the, info, data).
6 6  * **Use pronounceable names.** Programming is a social activity that people talk about with others.
7 -* **Use searchable names.** Searchable means avoiding search conflicts with other independent things with the same name. The length of a name should match the size of its scope. For local counting loops, one letter is sufficient; if the variable is used in several places in the code, it needs a longer name.
7 +* **Use searchable names. **Searchable means avoiding search conflicts with other independent things with the same name. The length of a name should match the size of its scope. For local counting loops, one letter is sufficient; if the variable is used in several places in the code, it needs a longer name.
8 8  * **Avoid encodings.** There should be no references to the scope or type of the variable in the name.
9 9  * **Avoid mental mappings.** The name of a variable should not require mental effort to understand. For example, unusual abbreviations should be avoided.
10 10  * **Names of classes consist of nouns** or substantivistic expressions.