DEV Community

Discussion on: A Grammar-Based Naming Convention

Collapse
 
vinceramces profile image
Vince Ramces Oliveros

What about enums? I personally go camelCase with constant variables. And I put SCREAMING_CASE on any enum values.

Anyways I always thought naming conventions should follow the grammar-based naming conventions, even though in some style guides, they're different in some aspects. I don't want them to label me as code-nazi(sorry for germans) for correcting their code even though there are no errors. It's just the readability matters.

Collapse
 
somedood profile image
Basti Ortiz

Yes, that's completely fine! There's nothing wrong about a little variation. As long as your code conveys its intent, and you know exactly how to decipher it, you shouldn't really have to worry about "some dood" preaching about how a naming convention should be... unless you have to consider the other members of a team. In that case, it's probably best to follow their style guide over yours.

Collapse
 
vinceramces profile image
Vince Ramces Oliveros

Thank you for the reply. I think it was my first experience reading legacy code with unorganized naming conventions that I had an intern at a certain company. I had to make a documentation, a lot of refactoring, and deleting dead code just to make sure that anyone understood it.

Thread Thread
 
somedood profile image
Basti Ortiz • Edited

I can imagine the hell you had to go through, man. I 👏 applaud 👏 you for carrying on, though. That's a lot of work.