Naming Conventions & Roman Numerals

camelCase or snake_case? Hyphens or underscores in URLs? How do you write 1999 in Roman numerals? This page tabulates eight naming conventions with their rules and where each belongs, plus the Roman numeral symbols and the subtractive rule.

Eight Naming Conventions

StyleExampleRuleCommonly Used For
camelCaseuserNameListFirst word lowercase, later words capitalisedJavaScript and Java variables and functions
PascalCaseUserNameListEvery word capitalisedClasses, components and type names
snake_caseuser_name_listAll lowercase, underscores between wordsPython and Ruby variables, database columns
SCREAMING_SNAKEUSER_NAME_LISTAll uppercase, underscores between wordsConstants and environment variables
kebab-caseuser-name-listAll lowercase, hyphens between wordsURL paths, CSS classes, npm package names
Train-CaseUser-Name-ListWords capitalised, hyphens between wordsHTTP header names, titleised identifiers
flatcaseusernamelistAll lowercase, no separatorPackage names, some domains and CLI flags
dot.caseuser.name.listAll lowercase, dots between wordsConfig keys and telemetry metric names

Roman Numeral Symbols

There are only seven base symbols: I(1) V(5) X(10) L(50) C(100) D(500) M(1000). A smaller symbol before a larger one subtracts; after it adds.

ValueRomanNote
1IBase symbol
4IVSubtractive: 5 minus 1
5VBase symbol
9IXSubtractive: 10 minus 1
10XBase symbol
40XLSubtractive: 50 minus 10
50LBase symbol
90XCSubtractive: 100 minus 10
100CBase symbol
400CDSubtractive: 500 minus 100
500DBase symbol
900CMSubtractive: 1000 minus 100
1000MBase symbol

Frequently Asked Questions

Should I use camelCase or snake_case?

There is no global optimum; following the convention of your language and community matters most. Python, Ruby and Rust idiomatically use snake_case; JavaScript, Java and Swift use camelCase; Go uses PascalCase for exported identifiers. Database columns are almost universally snake_case because most engines are case-insensitive. The real red line is never mixing styles within one project — once you do, code search, refactoring and tooling all become unreliable. At system boundaries, such as a Python backend serving a JavaScript frontend, convert once at the boundary rather than letting both styles seep into the same layer.

Why is kebab-case recommended for URLs rather than underscores?

Three practical reasons. Search engines have traditionally treated the hyphen as a word separator while ignoring the underscore, so kebab-case aids keyword recognition. Underscores also hide beneath the underline of a styled link, hurting readability. And URLs are case-sensitive, so all-lowercase avoids duplicate-content variants of the same resource. Together these make lowercase kebab-case the de facto standard for URL paths.

Why is 4 written IV rather than IIII in Roman numerals?

Roman numerals use a subtractive-left, additive-right rule: a smaller symbol before a larger one subtracts, after it adds. So 4 is IV, meaning 5 minus 1, and 6 is VI, meaning 5 plus 1. This keeps the notation shorter and easier to scan. IIII does appear historically, especially on clock faces, reportedly for visual balance with VIII opposite and to avoid reading IV as an abbreviation for Jupiter. The modern standard is IV.

How do you write 1999 in Roman numerals?

It is MCMXCIX, decomposing into 1000 + 900 + 90 + 9. Convert each part: 1000 is M; 900 is CM, meaning 1000 minus 100; 90 is XC, meaning 100 minus 10; 9 is IX, meaning 10 minus 1. Concatenated, that is MCMXCIX. The general method is to take the largest symbol from high to low, switching to the subtractive form for digits like 4 and 9 instead of repeating a symbol four times.