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
-
typosaurus12180106dHmm, I dunno. If it's so "simple" that AI can write a comment for it, is it a comment worthy? I prefer a project with just a few comments that are very informative. Not like // Here we add two to two
Anyway, you're just an add that will never respond anymore huh?
I'm ready to leave a dead treat on your github if you don't login again :) * waiting * -
priyanshu-kun21106d@retoor, there must be a way to ensure the accuracy of generated comments. Although, I understand the limitation of LLM's.
-
priyanshu-kun21106dI'm ready to leave a dead treat on your github if you don't login again :) * waiting *
huhh? -
CoreFusionX3515106dI 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. -
typosaurus12180106d@priyanshu-kun Ok, i won't leave a death treat on your github :P
Comments are meant for things you can't makeup yourself easily like a magic number (that should be declared in a variable) or some magic margin or some index that you add + 1. Why doing the +1?
You can't write an LLM for generating comments about stuff you can't know.
Don't want to break your dream dude. But it sounds like noise generating. But, i can imagine it's fun to build smth like that anyway. I'm sure there are some devs who think different than we/i do. So many opinions -
typosaurus12180106d@priyanshu-kun Exactly, and it's good for experience. I myself is extending a language that is deprecated. I do this in a nice way to add to portfolio. It's never for nothing! Let other's decide for themselves if your project is valuable or not. If it's AI and doing what it says - it's a worthy project to show future employers when applying
-
Liebranca1094106dYou 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. -
Demolishun35051106dComments should not be about how the code works. You can get that from the code. Comments should be about why the code exists. I do not think any current AI can reason that.
-
typosaurus12180105d@mostr4am don't you feel calm? Rooibos is made in one of the best countries ever btw. In their language bos means woods :)
Related Rants
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