Skip to content

Instantly share code, notes, and snippets.

@jimwhite
Last active October 31, 2023 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimwhite/7866da091ddd56e5ba4a485a0295f7da to your computer and use it in GitHub Desktop.
Save jimwhite/7866da091ddd56e5ba4a485a0295f7da to your computer and use it in GitHub Desktop.
Bard's code naming style guide
When naming variables in code, you can follow these best practices:
Descriptive: Choose names that are easy to remember.
Concise: Use clear and concise names.
A longer name needs to earn its length vs a shorter one by being more informative.
Lowercase: Use lowercase letters.
Underscores: Use underscores to separate words in a name.
No spaces: Avoid using spaces in names.
No special characters: Avoid using special characters.
No acronyms: Avoid using acronyms and abbreviations.
No conflicts: Avoid names that could be confused with keywords or built-in functions.
No digits: Variable names cannot start with a digit.
Case-sensitive: Variable names are case-sensitive.
Alpha-numeric: Variable names can only contain alpha-numeric characters and underscores.
No limit: There is no limit on the length of the variable name.
Here are some other best practices for naming variables:
Write in English.
Avoid using other punctuation such as periods, hyphens, exclamation points, etc..
Be simple and descriptive, avoid generic names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment