Skip to content
BENIBIX Learn

Naming Convention

Development🧩 Programming ConceptsDevelopment Practices

Also known as Naming Conventions, camelCase, snake_case, PascalCase, kebab-case

A team rule for how to write names in code, like camelCase.

Think of it like

Think of it like a school rule for name tags. Every tag puts the first name first.

Example

Lucy's team writes variables as userName and classes as UserProfile. A new hire reads the code. At a glance, they can tell a class from a variable.

Why it matters

Code is read far more often than it is written. Names that follow one rule are faster to read and harder to mix up.

Definition

A naming convention is a team rule for how to write names in code. It sets the shape of a name, like camelCase, snake_case or PascalCase. It can also set meaning, like is or has at the start of a yes-or-no value. Each language has its own habits. JavaScript uses camelCase for variables, and Python uses snake_case. One shared rule makes code quick to read and search.

Example code

javascript
const userName = 'Lucy';      // camelCase
class UserProfile {}          // PascalCase
const MAX_RETRIES = 3;        // UPPER_SNAKE_CASE
One shape for variables, one for classes and one for fixed values.

Common mistake

Mixing styles in one project, like user_name in one file and userName in the next. Pick one and let a linter enforce it.

Key takeaways

  1. 1
    One shape. camelCase, snake_case, PascalCase.
  2. 2
    Names carry meaning. Like isReady or hasItems.
  3. 3
    Follow the language. Each has its habits.

Learn it properly