- Avoid disinformation
- Make meaninful distinctions
- Imagine that you have a
Product
class. If you have another calledProductInfo
orProductData
, you have made the names different without making them mean anything different.Info
andData
are indistinct noise words as well. - Noise words are redundant. How is
NameString
better thanName
? Would aName
ever be a floating point number? Doing so would cause disinformation. - Imagine finding one class named
Customer
and another namedCustomerObject
- what should you understand as the distinction?
- Imagine that you have a
- Class names
- Classes and objects should have noun or noun phrase names like
Customer
,Wikipage
,Account
, andAddressParser
. Avoid words likeManager
,Processor
,Data
, orInfo
in the name of a class.
- Classes and objects should have noun or noun phrase names like