Hacker News new | ask | show | jobs
by bigpeet 2275 days ago
There should be naming guidelines just like how a team should have style guidelines. The discussions should happen when creating (or updating) these guidelines.

Then these guidelines should be followed, no need for long discussions during code reviews.

Variable name does not follow guidelines => Mark it as an issue, defer to the guidelines move on.

2 comments

Some people will just find it as an excuse to go all over it the naming issue. Worse than the "80 columns is the limit" people, because after all 80 columns is 80 columns. But there's no "ideal name" for some people.
No. The purpose of a name is to convey meaning to the reader. There is exactly one valid complaint about a name: “I’ve read this carefully and I still don’t know what it means.”

A standards-compliant name that interferes with understanding is not okay. A name everyone gets, which happens to not follow a rule in some rulebook, is probably fine.