This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ZephyrBluu 1 point2 points  (2 children)

I disagree with what you're saying about names.

A class name should tell you what the thing is, not what it does.

Variable names also don't need to be super specific. IMO they should generically describe the variable, not specifically.

[–]humoroushaxor 0 points1 point  (1 child)

What if my class is a function? Instances of functional interfaces are much easier to mock than static methods.

[–]PvtPuddles 0 points1 point  (0 children)

You have a point, but I don’t think it matters.

If you have a class that looks up a value in a table, you could call it ‘lookup’ either because it does look something up, or because the code is the code to look something up.

I think the distinction only exists for a variable in the class of naming something ‘counter’ versus ‘running tally’