I discovered a generally helpful and practical Github guideline repo with respect to naming things. Applying these could tremendously improve one's code readability and maintainability. Enjoy and don't hesitate to place a star on the repo to appreciate the author.
Comprehensive language-agnostic guidelines on variables naming. Home of the A/HC/LC pattern.
- English language
- Naming convention
- Avoid contractions
- Avoid context duplication
- Reflect the expected result
- Naming functions
- Singular and Plurals
Naming things is hard. This sheet attempts to make it easier.
Use English language when naming your variables and functions.
/* Bad */ const primerNombre = 'Gustavo' const amigos = ['Kate', 'John'] /* Good */ const firstName = 'Gustavo' const friends = ['Kate', 'John']
Like it or not, English is the dominant language in programming: the syntax of all programming languages is written in English, as well as countless documentations and educational materials. By writing your code in English you dramatically increase its cohesiveness.
Pick one naming convention and follow it. It may be