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
| Style | Example | Rule | Commonly Used For |
|---|---|---|---|
| camelCase | userNameList | First word lowercase, later words capitalised | JavaScript and Java variables and functions |
| PascalCase | UserNameList | Every word capitalised | Classes, components and type names |
| snake_case | user_name_list | All lowercase, underscores between words | Python and Ruby variables, database columns |
| SCREAMING_SNAKE | USER_NAME_LIST | All uppercase, underscores between words | Constants and environment variables |
| kebab-case | user-name-list | All lowercase, hyphens between words | URL paths, CSS classes, npm package names |
| Train-Case | User-Name-List | Words capitalised, hyphens between words | HTTP header names, titleised identifiers |
| flatcase | usernamelist | All lowercase, no separator | Package names, some domains and CLI flags |
| dot.case | user.name.list | All lowercase, dots between words | Config 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.
| Value | Roman | Note |
|---|---|---|
| 1 | I | Base symbol |
| 4 | IV | Subtractive: 5 minus 1 |
| 5 | V | Base symbol |
| 9 | IX | Subtractive: 10 minus 1 |
| 10 | X | Base symbol |
| 40 | XL | Subtractive: 50 minus 10 |
| 50 | L | Base symbol |
| 90 | XC | Subtractive: 100 minus 10 |
| 100 | C | Base symbol |
| 400 | CD | Subtractive: 500 minus 100 |
| 500 | D | Base symbol |
| 900 | CM | Subtractive: 1000 minus 100 |
| 1000 | M | Base 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.