Keep Variable and Identifier Names Short and Consistent

Prefer short, consistent names that reduce noise without making variables or identifiers unclear.

Problem

Naming conventions help keep code and repositories readable, but overly long or inconsistent names create noise. Mixed styles such as myVariable, my_variable, and my-variable also make projects harder to scan.

Context

In software development we name files, projects, branches, variables, and other identifiers constantly. A simple default keeps naming predictable and reduces friction.

Solution

Prefer short names that stay clear. Use lowercase with - as the default word separator. Avoid uppercase, _, and camelCase unless a language, tool, or upstream convention requires a different format.

This approach has the following benefits:

  1. Names are easy to read and remember.
  2. Less typing and less complex typing reduce the chance of mistakes.
  3. The default is easy to remember: when in doubt, choose the shortest clear name.

Examples and Implementation

Examples of names that follow this convention:

  1. index.html
  2. style.css
  3. main.js

Project names:

  1. my-project
  2. web-app
  3. e-commerce

Branch names:

  1. feature/add-new-feature
  2. fix/bug-123
  3. hotfix/security-issue

Use a different format only when the surrounding tool or language expects it, for example when environment variables must be uppercase or a programming language uses snake_case or camelCase for identifiers.


Last modified September 10, 2026: guidelines coding C2-1630 C2-1628 C2-1629 (1f6a9b9)