
Editorial illustration.
Originally published 7 August 2023; rewritten and reviewed on 15 October 2026.
A developer opens a project and sees customer_id, CustomerId and customerID used for the same idea. Nothing necessarily crashes, but every variation asks the reader to pause. Naming conventions help remove that friction when they are applied consistently.
Use casing to communicate structure
| Style | Example | Typical context |
|---|---|---|
| camelCase | customerId |
Local variables or properties in some languages |
| PascalCase | CustomerProfile |
Types and public members in C# conventions |
| snake_case | customer_id |
Python names or database conventions |
| SCREAMING_SNAKE_CASE | MAX_RETRIES |
Constants in some ecosystems |
| kebab-case | customer-profile |
URLs and file names |
These are examples of common practice, not rules that override a language or an established repository. A hyphenated URL name cannot simply be copied into an identifier where a hyphen means subtraction.
Follow the project before adding another style
Read nearby code and the repository’s conventions. Configure the available formatter or linter so the team does not repeatedly debate mechanical choices in reviews. Where a public API or database schema already exists, consider compatibility before renaming it.
Casing still cannot rescue an unclear name. data, result2 and processThing may obey every formatting rule while revealing little about the work. Choose names that express the domain and distinguish similar concepts, such as billingAddress and deliveryAddress.
Review names in the code that uses them
Read the call site aloud. Does the name explain the value or operation without requiring the implementation to be opened? If a boolean reads ambiguously, consider a name that expresses the condition directly.
The useful outcome is a vocabulary the team shares. My preference is a predictable convention combined with names that explain intent; that combination saves more reading effort than choosing a fashionable casing style in isolation.