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;
}
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.
Comments
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:
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.Have you tried it? It is very good at explaining and commenting code — better than my comments.
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.
It’s 2024. It’s free to try. Try it out. It’s astounding.