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

Setup Tailwind CSS with Angular 11

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

1 year ago

How to setup laravel project using homestead

Step 1 : Create a new directory Homestead by using this command  cd ~/Homestead Step…

1 year ago

NPM vs NPX

npx and npm are both command line tools that are used to install and run…

1 year ago

Configure laravel project in vagrant box in ubuntu

Step 1: Create a directory where you want to store project such as  mkdir ~/vagrant_projects…

1 year ago

How to use a CORS proxy to avoid “No Access-Control-Allow-Origin header” problems

If you want to solve the Access-Control-Allow-Orgin header problems, you can setup the cors proxy.…

1 year ago

React Native Hybrid with Ease

React Native Hybrid: Is React native hybrid? a popular question that mostly developers asked. Let…

1 year ago

This website uses cookies.