Do you use meaningful modifiers for custom implementations?
Last updated by Tiago Araújo [SSW] 7 months ago.See historyWhen creating custom controls, avoid vague or generic names like CustomStepper or CustomDbContext. Generic terms like “custom” or “base” don’t communicate what makes the component unique, and they add little value for other developers. Instead, use meaningful modifiers that describe the component’s specific purpose or customization.
Why it matters
Meaningful modifiers make it clear what a class, module, or component does or how it differs from a standard version. This helps developers understand its role without digging through code and reduces the chance of naming conflicts with other libraries.
Naming a custom DbContext
implementation CustomDbContext
or a specialized input control CustomInput
doesn’t provide any real information. It’s unclear what is customized, making it harder to understand and maintain.
Bad example - A modifier that doesn't tell you what has been modified is of no value
A more descriptive name, like WriteOnlyDbContext
or BorderlessTextInput
, indicates exactly what’s different about the component, making it easier to understand its function at a glance.
Good example - A modifier that clearly conveys what is different from the original can save developers time reading through the code
- Do you use clear and meaningful names when coding?
- Do you use verbs for method names?
- Do you use nouns for class names?
- Do you avoid generic names like “manager” or "helper"?
- Do you avoid micro-culture jargon and insider terms?
- Are you consistent with the words you use to represent concepts?
- Do you know when to use technical terms versus domain terms?
- Do you avoid using your name or your company’s name in client code?
- Do you follow naming conventions for tests and test projects?
- Do you use clear and meaningful names when coding?
- Do you use verbs for method names?
- Do you use nouns for class names?
- Do you avoid generic names like “manager” or "helper"?
- Do you avoid micro-culture jargon and insider terms?
- Are you consistent with the words you use to represent concepts?
- Do you know when to use technical terms versus domain terms?
- Do you avoid using your name or your company’s name in client code?
- Do you follow naming conventions for tests and test projects?