# Naming Convention

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

**Field:** Software Development  
**Category:** Programming Concepts  
**Also known as:** Naming Conventions, camelCase, snake_case, PascalCase, kebab-case

## Think of it like

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

## 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

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.

## 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.

## 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.

## 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.

## Three principles

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

## Related terms

- [Code Style Guide](https://learn.benibix.com/term/development/style-guide)
- [Variable](https://learn.benibix.com/term/development/variable)
- [Clean Code](https://learn.benibix.com/term/development/clean-code)
- [Linter](https://learn.benibix.com/term/development/linter)

## Taught in

- [Clean Code and Naming](https://learn.benibix.com/learn/development-concepts/clean-code-and-naming): Programming Basics, 17/18

---

Source: https://learn.benibix.com/term/development/naming-convention
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
