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
-
@retoor, there must be a way to ensure the accuracy of generated comments. Although, I understand the limitation of LLM's.
-
I'm ready to leave a dead treat on your github if you don't login again :) * waiting *
huhh? -
I don't think this is useful.
Maybe, only maybe, if it's for stuff like JSdoc or shit like that, but linters already show you that.
Thing is, as @retoor said, comments like // this adds two and two are only noise with no value.
Don't use comments to describe what the code *does*. We all can read code (it's called code for a reason).
Instead, use comments to describe *intent*, as in, why you chose to do it that way, whether you used some dark magic trick like quake sqrt, or if there are any unexpected side effects.
Those are the really valuable comments. -
You are overthinking. Comments are part of the program, and as such they have to be maintained, which is a job for a human; truth is this cannot be automated and will never be.
As for the detractors of comments, their code is the most illegible. Honestly, everytime I encounter their virginal line of argumentation, all I can think of is chewing through forty fucking thousand SLOC in one or two hours, and having to stop to interpret the logic at every turn because the author thought that barely stating their intent every now and then was good enough. It isn't and has never been.
Related Rants

44k downloads. Fuck you I'm gonna install!
Hey hackers,
Let's talk about the problem statement first!
In software engineering, engineers often procrastinate when it comes to writing comments for documentation purposes. As they delay properly documenting their codebase, they are even more likely to procrastinate on updating their previously written comments when they make changes to their functions or code. This can lead to chaotic and buggy code, and if not addressed, it completely obsolete or even counter intuitive the purpose of comments in the code.
Solution!
A tool that automatically detects changes in a function or code and compares them with the current comment description. If there is a discrepancy between the code and the comment, the tool either automatically updates the comment or allows the user to manually select the code and its associated comment to directly make changes using LLM's.
So, my question is: Is this idea worth working on? Is it a real problem, or am I just overthinking it? If anyone has a better idea, please share it in the comments. Also, if someone is working on this problem already or planning to work on this in future, we can collaborate. This will be an open-source project.
Sign out, Peace!
github: priyanshu-kun/project-kento
question
vs-code