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
-
Jr is right! That shit is confusing!
I say - thats not enough comments. Reject, and ask jr to double the amount of comments. rinse. repeat, until jr gets the point.
Maybe jr should wrap the confusing code with descriptive function names? Like: SortTheStupidArray, and GetFirstElementOfArray? then add comments. And that zero... it can be a const! -
This would not have happened if you were reviewing the code properly on weekly basis maybe?
-
sariel85313y@magicMirror this is the answer.
And when they finally get the message, tell them to go back and remove all unnecessary comments.
Don't fuck around with jr's, they're dumb as a box of hair and need to be put in their place.
I'm all for discussions around why a change has to happen, but you do not tell your Sr or lead that you won't do something because you don't like it.
Don't like to be treated that way? Find another career. -
Ask him to put comments on like
Start of if, end of if
Start of function, end of function
Return // this line return the result
For loop. // loops through all the elements
Print_ln // this line prints the line
Then he will understand.
Or may be ask him to read a good book about clean coding -
@magicMirror this is a nice idea, will ask him to do this, maybe he'll see the problems lol
-
@lassiecoder we do code review for every PR, usually it requires 1 senior dev approval before it can be merged, but everyone is welcome to share their opinions. We don't have code review sessions with the whole team every week, but when code smell is detected anyone can raise a ticket
-
@nullcoffee he will enjoy it. Tbf he has only begun working as a dev for a few months, his code comprehension is weak. That's why he wants each line of code to be accompanied by a comment in plain English so he can understand it faster.
-
@Xamenyap This junior hotshot needs to be put into his place. Tell him that code needs to be written in a way where it should be clear what the code is doing without comments (make sure variables, methods have proper names).
Now comments are usually added to explain WHY some code was written/executed in a certain way. Its necessary to comment parts which are not obvious, otherwise devs will spend up to few hours sometimes days debugging the whole flow just to figure out WHY something was done in a certain way. -
mucalena6063yWait till you see comments in non English language flying in your codebase and have to use Google translate.
-
this fucking junior just reported that I "didn't mentor him enough" to my manager! Meanwhile he couldn't accept the most basic feedback!
Junior dev complained about my request to remove unnecessary comments because they're too obvious. "They may be obvious to you, but not to others" he said.
The codes and the comments:
// Sort the array
arr.Sort()
// Return the first element of the array
return arr[0]
rant