Re:Replacing My Right Hand with AI
by ljlolel on Friday August 09, 2024 @03:14PM
(#41204570)
Would take a few seconds to clean up or add comments anyway with Claude if it didn’t do it already automatically
[ Parent
| on HN ]
Re:Replacing My Right Hand with AI
by lcnPylGDnU4H9OF on Friday August 09, 2024 @03:27PM
(#41204679)
Do you have an example of such comments? Maybe I'm wrong but I get the feeling that AI-generated comments would be mostly along the lines of beginner-level comments:
// Don't do this if there's more than 1
if (foo.length <= 1) {
foo.bar;
}
Comments which are helpful usually explain why something is done. That's usually to accommodate specific business rules which the AI isn't likely to know about at this stage. // This is due to a change Accounting requested because ...
if (foo.length <= 1) {
foo.bar;
}Have you tried it? It is very good at explaining and commenting code — better than my comments.
Re:Replacing My Right Hand with AI
by lcnPylGDnU4H9OF on Friday August 09, 2024 @03:44PM
(#41204803)
Admittedly, I've not tried it which is why I'm curious. I would expect that it's good at explaining well-studied algorithms but anything that's following more-or-less bespoke business rules seems like a different beast.
Again, I could be wrong; e.g., a banking application might have certain regulations it needs to follow making non-computer-technical reasons for certain things to be done. That would be a good candidate for a "helpful" comment which would be reasonably AI-generated. (Although, perhaps not a good candidate for an LLM-generated application.) The example of "our specific business wants this for reasons" is one that I think LLMs would struggle with unless that's included in the context window. Of course, that's also possible; not sure if that is presumed.