Previously at Uber, Skyscanner, Skype/Microsoft. I love to help people grow and share what I learned. I write longer articles on software engineering at blog.pragmaticengineer.com.
Good question. In my opinion, the easier to understand the purpose, the better. For the most part, this would mean simple & short.
But it depends on the codebase and domain. E.g. in a large codebase following agreed on architecture principles on using e.g. viewcontrollers and the concept of interactors, the name RootViewControllerInteractor could count as a good name. Or in an accounting domain, EndOfYearCalculationController could also be a thoughtful name.
My point is to put thought to come up with clear names that make sense to you and other devs who will work on the same codebase.
I use namespaces for split words, Interactor\Controller\View\Root, Calculator\Controller\EndOfYear etc. Nouns for things, verbs for methods, adjectives for interfaces.
Two words in a method name shows violation SRP.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good question. In my opinion, the easier to understand the purpose, the better. For the most part, this would mean simple & short.
But it depends on the codebase and domain. E.g. in a large codebase following agreed on architecture principles on using e.g. viewcontrollers and the concept of interactors, the name RootViewControllerInteractor could count as a good name. Or in an accounting domain, EndOfYearCalculationController could also be a thoughtful name.
My point is to put thought to come up with clear names that make sense to you and other devs who will work on the same codebase.
I use namespaces for split words, Interactor\Controller\View\Root, Calculator\Controller\EndOfYear etc. Nouns for things, verbs for methods, adjectives for interfaces.
Two words in a method name shows violation SRP.