Lazy naming convention
Categories:
Use only lowercase with
-
to separate words. Avoid using uppercase characters, underscore_
, or camelcase as they require extra keystrokes.
Problem
Naming conventions are important for maintaining code readability and consistency. However, many naming conventions can be verbose and require extra keystrokes.
Context
In software development, we need to name files, projects, branches, and other entities.
Solution
Use a naming convention that is easy on the eye and requires the least amount of typing. Use only lowercase with -
to separate words. Avoid using uppercase characters, underscore _
, or camelcase as they require extra keystrokes.
This approach has following benefits:
- Names are easy to read and remember.
- Typing effort is minimized, reducing typing errors and saving time.
- This guideline is easy to remember. When in doubt about a name, choose the option with the least amount of keystrokes.
Example and implementation
Examples of file names using this convention:
index.html
style.css
main.js
Examples of project names using this convention:
my-project
web-app
e-commerce
Examples of branch names using this convention:
feature/add-new-feature
fix/bug-123
hotfix/security-issue
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.