Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yes to creating a good, clear and describable method naming
No to what ever the fuck he/she is doing -
Awlex177456yI'd tell him to fuck off and write that shit into the docs. Choose a name that be spoken within one normal breath.
-
Hostard3376yIn the language I programm, the limit of all names (classes, methods, variables) is 30 chars and this is also sometimes really annoying. But you get very creative to find good names...
-
Has (s)he added comments to each one of them too, if the answer is yes, then there's no excuse for names to be so long. There should be no more than 5 words in a single method name, otherwise it becomes too long to read and understand. That's why comments were invented to add description to the code. Also did he ever hear about polymorphism and/or overloads? Such long names make it impossible to work with if he writes polymorphic code and/or uses overloads.
-
mundo0349116yAsk the dude to use snake case if readability is the objective.
Camel case is for 3 words at most. Generally. -
muliyul5766yJoke's on you because you're going to have to maintain that code. I would NEVER approve that.
-
Like @muliyul said, since you approved it, you're just as guilty.
What I would have done :
talk to the guy
Put up a linter and a variable / function name limit
Asked him to fix every error
Alternatively : go nuclear
Write your code in a single function name then parse & eval the name. -
workabit1556yFunction names shoild be descriptive for sure, but these names are too long and it is a waste of time and a hassle to read. Ask him to use shorter names and do some code comments to explain the functions, this is how it is supposed to work ...
-
workabit1556y@Commodore 🤣🤣
Third option : teach him abojt code comments, code docs and descriptions -
@Debugmed that's what I had in mind by "by talk to him". (which is quite ironic : being too vague in a rant about someone too explicit 😋)
Anyway the idea was:
1. Teach
2. Setup safeguards
3. Put in practice
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
johnny301when your code is a mess but everything work out in the end
-
tahnik63So I need to create a nice new web app. Let's look at some cool JS frameworks that I can work with. *5 mins l...
my team mate thinks that function name should be descriptive so you can understand what It will do.
Here are the examples of functions he created:
createArrayOfConsentChangedEventObjectForAConsentForAllDataProcessorsWithoutNameInEvent()
createArrayOfConsentChangedEventObjectForAConsentForAllDataProcessorsWithNameInEvent()
createAndPushConsentChangedEventWithAndWithoutNameForAParticularConsent()
I was supposed to review his code but this names are so annoying that I gave up on reviewing and just passed his code since functionalities were working as expected. -_-
Am I the only one who gets annoyed by long function names?
joke/meme
time waste
rant
js
fml
random