/ˈneɪ.mɪŋ kənˈven.ʃən/

noun — “the unwritten rulebook that keeps your variables from turning into a spaghetti monster.”

Naming Convention is a systematic way of choosing names for variables, functions, classes, constants, and other identifiers in code. By following a consistent Naming Convention, developers ensure that code is readable, maintainable, and easy for collaborators to understand. Common conventions include camelCase, PascalCase, snake_case, and kebab-case, depending on the language or framework. Naming conventions work hand-in-hand with Variable Naming, Abbrev, and Acronym standards to maintain clarity and prevent semantic chaos in large codebases.

In real-world coding, naming conventions prevent confusion and reduce bugs caused by inconsistent or ambiguous names. Here’s how practical rules look in action:

// camelCase for JavaScript variables and functions
let userName = "Alice";
function getUserAge(uid) {
    return users[uid].age;
}

// PascalCase for classes
class UserProfile {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
}

// snake_case for Python variables
user_age = 25
def get_user_name(uid):
    return users[uid]['name']

// UPPER_CASE for constants
const MAX_CONNECTIONS = 100
const PI = 3.14159

Key considerations when using Naming Convention include readability, consistency, and alignment with the team’s style guide or the language’s community standards. In collaborative projects, adhering to conventions reduces cognitive load, makes debugging easier, and improves onboarding for new team members. It also helps maintain consistency across functions, variables, and modules, especially when integrated with automated tools, Client–Server architectures, or shared libraries.

Naming Convention is like a city street sign system for your code: follow it, and everyone finds their way; ignore it, and chaos reigns.

See Variable Naming, Abbrev, Acronym, Initialism, Variable Scope.