Reputation: 5898
Most common method/variable/class names that you use often and that explain you intent clearly and precisely.Is there any pattern you follow to figure that out.
Upvotes: 2
Views: 802
Reputation: 55907
It's not common names, but common patterns of names I think you need
So I try to make the variables mean something
successfulTransmissionCount
widgetUnitPrice
unusedSessionTimeout
But then on occasions, where there is scope for ambiguity I may use a "units" suffix. If I'm dealing with two existing APIs one that works in seconds and one that works in milliseconds it really helps my eyes to be reminded of the units
long unusedSessionTimeoutMillis
(Yes there are alternatives to using raw primitive types that may give the same effect)
Upvotes: 0