Emilia has her own Cloud. Maybe you can find some interesting packed files there: Cloud

Essention programming Case Styles:
Camel, Pascal Snake and Kebab

In programming, we often remove the spaces between words because programs of different sorts reserve the space (‘ ’) character for special purposes. Because the space character is reserved, we cannot use it to represent a concept that we express in our human language with multiple words.

As an example, the concept of user login count is not referenced in our code as user login count often. We do not do the following:

user login count = 5

A typical language parse would treat each word as a separate concept. User, login, and count would each be treated as separate things. So, we do something like the following:

userLoginCount = 5

Now, the parser will see one concept, userLoginCount, and us programmers can easily see the representation.

The best way to combine words

There is no best way to combine words. In the above example, we removed spaces and capitalized each word following the first word. There are, however, a great number of algorithms for combining words, and a few very common ones.

The most common case types:

camelCase

camelCase must (1) start with a lowercase letter and (2) the first letter of every new subsequent word has its first letter capitalized and is compounded with the previous word. An example of camel case of the variable camel case var is camelCaseVar.Fun fact: Sort of cameCaSes are often used to EnCrypt a Random tExt and hide a password in The text.


thisTextIsEntirelyInCamelCase
Example for camelCase

snake_case

snake_case is as simple as replacing all spaces with a "_" and lowercasing all the words. It's possible to snake_case and mix camelCase and PascalCase but imo, that ultimately defeats the purpose.

An example of snake case of the variable snake case var is snake_case_var.

this_text_is_entirely_in_snake_case
Example for snake_case

kebab-case

kebab-case is as simple as replacing all spaces with a "-" and lowercasing all the words. It's possible to kebab-case and mix camelCase and PascalCase but that ultimately defeats the purpose.

An example of kebab case of the variable kebab case var is kebab-case-var.
this-text-is-entirely-in.kebab-case
Example for kebab-case

PascalCase

PascalCase has every word starts with an uppercase letter (unlike camelCase in that the first word starts with a lowercase letter).

An example of pascal case of the variable pascal case var is PascalCaseVar. Note: It's common to see this confused for camel case, but it's a separate case type altogether.
TthisTextIsEntirelyInPascalCase
Example for PascalCase

UPPER_CASE_SNAKE_CASE

UPPER_CASE_SNAKE_CASE is replacing all the spaces with a "_" and converting all the letters to capitals.

an example of upper case snake case of the variable upper case snake case var is UPPER_CASE_SNAKE_CASE_VAR.
THIS_TEXT_IS_ENTERLY_IN_UPPERCASE_SNAKE_CASE
Example for UPPER_CASE_SNAKE_CASE

Quick Comparison Table

Case TypeExample
Original Variable as Stringsome awesome var
Camel CasesomeAwesomeVar
Snake Casesome_awesome_var
Kebab Casesome-awesome-var
Pascal CaseSomeAwesomeVar
Upper Case Snake CaseSOME_AWESOME_VAR

Brainteaser

Now that you've been introduced to the most common case types, you're prepared to hop into most of the popular languages and know what conventions to keep when you're writing your own code! Got it? Then find the hidden password somewhere in the text above and enter it here:

ID:zzt