How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
And the award for the longest most descriptive name goes too... Seriously though, there are situations where names like this cannot be reduced, perhaps at that point get another opinion. Perhaps a set of more generic things composed to do whatever that did would have worked better, but who knows.
This reminded me of a talk I saw recently where the presenter suggested that if a method name has words like "And" or "Or" in it, that tells you that the method has too many responsibilities.
I think in this case the long name tells me that the procedure is not working as an abstraction. The implementation is leaking into the name, so you may as well inline the implementation into the calling code.
To put it another way, the name tells me how the procedure does what it does, but not what the result represents or why I should call it.
It's also quite inflexible because if I added another condition I would have to change the name as well, even if the overall purpose of retrieving this data hasn't changed. The change would impact all of the code that calls the procedure.
If these users actually represent something meaningful to the domain you're working in (maybe something like "customersWithOutstandingInvoices") then renaming it would make the procedure more useful, because the calling code can describe a business process at a high level and the stored procedure has the responsibility of ensuring the correct set is returned.
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.
I was working on a project.
Our ex-developers created a stored procedure called "getAllUsersByInvoiceAndNonZeroInvoicesWithNonNullCustomerNamesAndBalanceBiggerThanZero".
It was in the Turkish language. I only translated into English.
Is this kind of naming good? Because there was also a method with this name in the backend project.
And the award for the longest most descriptive name goes too... Seriously though, there are situations where names like this cannot be reduced, perhaps at that point get another opinion. Perhaps a set of more generic things composed to do whatever that did would have worked better, but who knows.
This reminded me of a talk I saw recently where the presenter suggested that if a method name has words like "And" or "Or" in it, that tells you that the method has too many responsibilities.
I think in this case the long name tells me that the procedure is not working as an abstraction. The implementation is leaking into the name, so you may as well inline the implementation into the calling code.
To put it another way, the name tells me how the procedure does what it does, but not what the result represents or why I should call it.
It's also quite inflexible because if I added another condition I would have to change the name as well, even if the overall purpose of retrieving this data hasn't changed. The change would impact all of the code that calls the procedure.
If these users actually represent something meaningful to the domain you're working in (maybe something like "customersWithOutstandingInvoices") then renaming it would make the procedure more useful, because the calling code can describe a business process at a high level and the stored procedure has the responsibility of ensuring the correct set is returned.