programming

Guide To Naming Conventions

Specifically, there are certain naming conventions available across all programming languages, also known as

  • Snake Case
  • Camel Case
  • Pascal Case
  • Kebab Case

Snake Case:

Snake Case also known as “underscore case” separates each word with underscore. All words in snake case need to be lower case. There is also an all-caps version of the snake case where all letters are in the upper case, also known as the screaming snake case. The capitalized version is used for declaring constants in most programming languages. This naming convention is commonly used in programming languages like:

  1. Python
  2. Ruby
  3. PHP

Example:

 

 

 

 

Camel Case:

Camel case, on the other hand, uses no separators between words but making the first word lowercase. Then, you capitalize the first letter of each word. This naming convention is commonly used in languages like:

  1. GO
  2. JavaScript
  3. TypeScript
  4. C#
  5. Java

Example:

Pascal Case:

Pascal case is similar to camel case. The only difference between the two is that pascal case requires the first letter of the first word to also be capitalized. You will see the pascal case used for naming classes in most programming languages.

Example:

Kebab Case:

The kebab case is very similar to snake case. Kebab case is also known as “hyphen-separated lowercase” or “spinal case.” The difference between snake case and kebab case is that kebab case separates each word with a dash character, instead of an underscore. You will encounter kebab cases mostly in URLs.

Example:

Cool Dev

Recent Posts

Bash Script Basics Tutorial: #1

Bash Script Basics Bash scripting is a powerful way to automate tasks in Linux. This…

1 year ago

Screen vs Tmux: Which One to Choose?

Screen vs Tmux Both screen and tmux are popular terminal multiplexers that allow you to…

1 year ago

How to Use nohup

How to Use nohup The nohup command allows you to run a script or command…

1 year ago

Running Bash script in background

Running Bash script in background Running Bash script in the background is useful for executing…

1 year ago

How do I make Git ignore file mode (chmod)?

How do I make Git ignore file mode (chmod)? Git is a powerful version control…

1 year ago

Setup Tailwind CSS with Angular 11

Install tailwind css with npm Run the following command to install tailwind css npm install…

3 years ago

This website uses cookies.