Casing Styles¶
When it comes to naming conventions, various casing styles exist. Let's explore the differences between them:
Snake Case¶
- In snake case, words are separated by underscores (
_
). - All letters are in lowercase.
-
Examples:
number_of_users = 34
hello_phrase = "Hello World"
Screaming Snake Case¶
- This variant of snake case uses all uppercase letters.
- Also known as the "screaming snake case."
-
Examples:
NUMBER_OF_USERS = 34
HELLO_PHRASE = "Hello World"
Kebab Case¶
- Similar to snake case, but words are separated by dashes (
-
). - All words are lowercase.
- Kebab case is a human-readable way to combine multiple words into a single identifier.
-
Examples:
number-of-users = 34
hello-phrase = "Hello World"
Camel Case¶
- In camel case, the first word starts with a lowercase letter.
- Each subsequent word begins with an uppercase letter.
-
Examples:
numberOfUsers = 34
helloPhrase = "Hello World"
Pascal Case¶
- Similar to camel case, but the first letter of the first word is also capitalized.
- Every word starts with an uppercase letter.
-
Examples:
NumberOfUsers = 34
HelloPhrase = "Hello World"
Mixed Case¶
- In mixed case, there is a mix of anything in no particular pattern.
- Examples:
given_UserIsAuthenticated_When_InvalidAccountNumberIsUsedToWithdrawMoney_Then_TransactionsWillFail()
Natural Text¶
- Natural text refers to any form of linguistic communication that humans use in their everyday interactions. It encompasses both spoken and written language.
-
Examples:
- Spoken Natural Text: Conversations with friends, interviews, phone calls, and public speeches.
- Written Natural Text: Books, emails, social media posts, and handwritten letters.