Hacker News new | past | comments | ask | show | jobs | submit login

If you have a variable representing the length of an array containing user accounts, would you prefer the name "length" or "price"?



This isn’t a relevant argument. The fact that you constructed an absurd scenario and there’s a clear winner in it does not imply that there is always a clear winner. In fact, my experience is that in the majority of times there is not a clear winner, and terms get completely overloaded or used imprecisely.

So, again, your absurd scenario proves to be quite a weak argument when you consider the scope of the whole problem.


Then I don't think I see the type of meaningless variable renames you are talking about. I do see variable names about as bad as in my example though, and I see them being fixed. They typically arise from some copy/paste where someone wanted similar logic but forgot to rename a variable.

I don't see people renaming from say numberOfItems to noOfItems or similar, if that's the type of renames you're referring to. Can you give an example of a rename you are seeing?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: