Where snake_case is the convention
- Python: PEP 8 recommends snake_case for variables, functions and modules.
- Databases: table and column names such as
date_of_birthavoid quoting problems with spaces and mixed case. - Ruby and Rust use it for methods and variables.
- Spreadsheet imports: converting column headings like “First Name” to
first_namebefore loading CSV data into code.
Related styles
CONSTANT_CASE (screaming snake case) is snake_case in capitals, used for constants and environment variables. kebab-case swaps underscores for hyphens and is used in URLs and CSS. All three are one click away above.
Tip
Keep names short and descriptive, avoid numbers at the start (many languages don't allow them), and stay consistent with the rest of your codebase.


