pcouy@lemmy.pierre-couy.fr to Programming@programming.dev · 11 days agoCode Smells Catalogluzkan.github.ioexternal-linkmessage-square51fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkCode Smells Catalogluzkan.github.iopcouy@lemmy.pierre-couy.fr to Programming@programming.dev · 11 days agomessage-square51fedilink
minus-squarecurbstickle@lemmy.dbzer0.comlinkfedilinkarrow-up0·9 days agoNot updating comments with code is what I’m talking about - that’s not a comment problem, thats a programmer problem. If they aren’t updating the “why”, that programmer is the problem, not comments.
minus-squarepcouy@lemmy.pierre-couy.frOPlinkfedilinkarrow-up0·9 days agoWhen refactoring, it’s often the “what” that changes, not the “why”
minus-squarecurbstickle@lemmy.dbzer0.comlinkfedilinkarrow-up0·edit-28 days agoThat really depends. Especially for a function that may see use in a variety of scenarios. I’m going to be firmly against anyone suggesting against proper comments - which, I’m sorry, but you are by your own statement. Code will change for many, many, many reasons beyond just refactoring. Edit: and why it was refactored is important as well. There are just so many reasons, and yes, I will continue to be against this newer trend of “dont comment, make codes your comments”. All that is, is a great way to make your code harder to manage later. It doesnt take much effort to explain why you’re doing something.
minus-squarepcouy@lemmy.pierre-couy.frOPlinkfedilinkarrow-up0·8 days agoLet’s rephrase my opinion, so that we can (hopefully) agree on something : What I’m arguing against is the “ChatGPT-style” (or “tutorial-style”) comments that I’ve seen all over juniors’ code, even before LLMs got widespread
Not updating comments with code is what I’m talking about - that’s not a comment problem, thats a programmer problem.
If they aren’t updating the “why”, that programmer is the problem, not comments.
When refactoring, it’s often the “what” that changes, not the “why”
That really depends.
Especially for a function that may see use in a variety of scenarios.
I’m going to be firmly against anyone suggesting against proper comments - which, I’m sorry, but you are by your own statement.
Code will change for many, many, many reasons beyond just refactoring.
Edit: and why it was refactored is important as well.
There are just so many reasons, and yes, I will continue to be against this newer trend of “dont comment, make codes your comments”.
All that is, is a great way to make your code harder to manage later. It doesnt take much effort to explain why you’re doing something.
Let’s rephrase my opinion, so that we can (hopefully) agree on something : What I’m arguing against is the “ChatGPT-style” (or “tutorial-style”) comments that I’ve seen all over juniors’ code, even before LLMs got widespread