Maintain consistency across codebase
Consistent naming reduces cognitive burden by allowing readers to safely reuse knowledge across contexts.
Avoid conflicting meanings for the same word:
Use naming molds (templates) consistently:
Common Naming Patterns (Pick One and Use Consistently)
Concept | Adjective-Noun Pattern | Noun-Descriptor Pattern | Action-Object Pattern |
---|---|---|---|
Maximum user connections | max_user_connections |
user_connection_limit |
track_user_peak |
Total file size in bytes | total_file_size_bytes |
file_byte_count |
calculate_file_bytes |
Tip
Enable safe assumptions about names across different contexts. Mixed patterns force readers to decode different templates, increasing cognitive load.