There are a lot of naming choices available, and many companies/projects have set their standards, holding their conventions over and above others.
In this article, we will look at the most popular naming conventions
[1] The flat case, also called the lazy case
all words written continuous in lowercase with no spaces or special characters example: packagename
- usage in Java Package names
[2] Upper Flat case
all words written continuous in uppercase with no spaces or special characters example: CONSTANT
- use in C / Java constants
[3] Lower camel case, also called dromedary case
starts with lowercase and every subsequent word starts with Uppercase letter; written continuous with no spaces or special characters example: camelCase
- usage in Java variables
[4] Upper Camel Case, also called Pascal Case or Studly Caps
starts with uppercase and every subsequent word starts with Uppercase letter; written continuous with no spaces or special characters example: UpperCamelCase
- usage in .Net Identifiers
[5] Snake Case, also called Pothole case
starts with lowercase and every subsequent word starts with lowercase; each word is separated by underscore
_example: simple_variable
- usage in Python variables
[6] Screaming Snake Case
all words in uppercase separated by underscore
_similar to snake case example: SCREAMING_VARIABLE
- usage in multi-word C / Java Constants (static final or enumerations)
[7] Kebab Case, also called Caterpillar case/dash case/lisp case or param case
all words written in lowercase strung together with hypen
-example: simple-kebab-variable
- usage in Lisp Programming Language
[8] Upper Kebab Case, also called Train case or Cobol Case
all words written in uppercase strung together with hypen
-example: TRAIN-CASE
- usage in Cobol Programming Language
And that's it! Use the above conventions for a more readable code structure and improve your code quality.
Thanks for reading!