DEV Community

Discussion on: A Grammar-Based Naming Convention

Collapse
 
somedood profile image
Basti Ortiz • Edited

Before anything else, I would love to thank you for your brief explanation of the Hungarian language. I actually learned a lot from it. I may not memorize the words, but I now understand the subtle semantics behind them.

As for your question, I don't quite follow what you mean by "phrase the naming convention"?

Collapse
 
magwas profile image
Árpád Magosányi

I am the one who should write down (phrase) what our naming conventions should be. And I am struggling with such simple questions, whether "registration" counts as a noun or adjective in this case.

Thread Thread
 
somedood profile image
Basti Ortiz

Ah, I see. In my view, I'd say it's more appropriate to regard them as nouns, especially if you refer to the "process" or "object" as a whole. The "outcome" should be communicated as a consequence of functions (verbs). For example, the "outcome" of a process must be communicated through function names such as getRegistrationStatus or registerUser. That way, we can be explicit on whether we're referring to the "process" or the "outcome".

Thread Thread
 
magwas profile image
Árpád Magosányi

The only problem that in our implemetation pattern the function name does not convey any information, as there is only one function per controller, according to Single Responsibility Principle. It is fixed to be "call".

Thread Thread
 
somedood profile image
Basti Ortiz

Ahh, that's going to be a tough nut to crack then. I suppose my only advice for now is to remain consistent with it. It is ideal to follow the current convention whether it prescribes the "process" or "outcome".

Honestly, it's quite a lackluster piece of advice, but it's really the best one I have right now at the top of my head.