Originally posted by Katrina Owen:
In a lot of the assignemnts I've been nitpicking lately, I've seen variable names prefixed with <code>num</code>.
I'm curious as to what benefit people see to using this prefix?
Wow, I just realized that I sort of did this and didn't even think about it.
Let me see if I can lasso a reason by the horns.
In my most recent attempt, I used a variable named <code>numberOfFullLines</code> to denote, well, the number of lines that were fully populated by elements, as opposed to ones that were only partially populated. I guess an equally good name might have been simply <code>fullLines</code> or <code>fullyPopulatedLines</code> or <code>completeLines</code>.
This is an interesting question, since I have always felt that I am absolutely terrible at giving variables meaningful names. But by convention, I think counters that end in in the
word <code>count</code> make sense. And maybe also limits that begin with <code>max</code>.
What's rather curious is that, just now, I realized that I would be inclined to completely spell out <code>number</code> in a varible, but use <code>max</code> as an abbreviation for maximum. Guess I'll nitpick myself for being inconsistent.
One thing that makes my head spin with regard to java naming is classes that end in the suffix <code>Impl</code>. I know that's short for implementation, but couldn't someone have picked a better convention? I see that all the time. Why not call the interface <code>somethingInterface</code> instead of calling the implementation <code>somethingImpl</code>? Who comes up with this stuff anyhow?
Ah well, maybe I'll hang out here enough and find out that there's nothing wrong with that after all, and it's just one of those pesky personal preferences...