Classes are my precious
TL;DR: Classes represent concepts. And concepts are singular.
Problems
Naming
Code Standards
Solutions
- Rename classes to singular
Context
Naming things is hard.
We need to agree on certain rules.
Sample Code
Wrong
class Users
Right
class User
Detection
[X] Automatic
This is a syntactic rule.
Tags
- Naming
Conclusion
Name concepts in the singular.
Classes are concepts.
More Info
What exactly is a name - Part II Rehab
Maxi Contieri ・ May 23 '21
Disclaimer
Code Smells are just my opinion.
Credits
Photo by Anton Malanin on Unsplash
We are still in the infancy of naming what is really happening on software development projects.
Alistair Cockburn
Software Engineering Great Quotes
Maxi Contieri ・ Dec 28 '20
This article is part of the CodeSmell Series.
Top comments (2)
What's a better name for
EcdsaParams
?developer.mozilla.org/en-US/docs/W...
Params is an abreviattion, so it is another code smell
blog.devgenius.io/code-smell-33-ab...