Skip to main content

Naming conventions

Alternate Names for Variable

Common NameAlso CalledFormat
camelCaselower camel case
dromedary case
startsLowerCaseThenCapitalizesEachWord
PascalCaseUpperCamelCase
CapitalizedCamelCase
EachWordStartsWithCapital
snake_caseunderscore_case
pothole_case
lower snake case
lower_case_words_separated_by_underscores
SCREAMING_SNAKE_CASEconstant case
all caps snake case
upper snake case
UPPER_CASE_WITH_UNDERSCORES
kebab-casedash-case
lisp-case
spinal-case
hyphen-case
lower-case-with-hyphens
Hungarian Notationtype prefixing
Apps Hungarian (or Systems Hungarian)
prefixTypeVariableName
dot.notationobject property access
member access syntax
object.property
UPPERCASEshouting case (colloquial)
all-caps
ALLUPPERCASE

Common usages and examples

Naming ConventionUsageExample
camelCaseCommon in JS, Java, and some Python code for variables and function nameslet userName = "FeeFight";
PascalCaseUsed for class names in C#, Java, TypeScript
constructors in JS
class UserProfile {}
snake_caseCommon in Python for variables, function, file namesuser_profile = "FeeFight"
SCREAMING_SNAKE_CASEConstants in Python, JS, C++MAX_CONNECTIONS = 100
kebab-caseUsed in URLs, CSS classes, file namesbackground-color: #fff;
user-profile.html
Hungarian NotationOlder C/C++ style, not used much in modern codestrName = "FeeFight"
(prefix indicates type: str = string)
dot.notationUsed for accessing object properties or nested valuesuser.profile.name
UPPERCASELegacy style, sometimes used for constants or macrosDEBUG = TRUE

Quick Notes

  • camelCase: Standard in JS, Java, C++, often for functions and variables.
  • PascalCase: Ideal for classes, components, and constructors.
  • snake_case: Preferred in Python, also common in configs and databases.
  • SCREAMING_SNAKE_CASE: Great for environment variables and constants.
  • kebab-case: Only valid in filenames, CSS, and HTML—not in most programming languages (it breaks in JS/Python).
  • Hungarian Notation: Old-school, can be useful in embedded systems but not recommended in modern high-level languages.
  • dot.notation: Not a naming convention itself, but a way of referencing properties in an object.