by ripjaygn · 2y ago · 0 comments
Comments should be about why the code is doing what it's doing. By definition, this won't be in the code, so the AI cannot divine it to existence.
Readable code is about what the code is doing, which should be apparent from reading the code. This AI tool can be used as a helper for a junior dev or to follow the call stack or code flow.
Maybe AI can do a good job one day when it has the full context of code, i.e requirements docs, transcripts of meetings, emails, JIRA tickets etc.
Maybe this is what will save humans against the robots — the ability to verify and study topics in their context efficiently.
I don't think that's true.
You're essentially saying that no one other than the original author can possibly add useful comments, and that is manifestly untrue.
It's well within the reach of AI to add comments about how a function is used, and even infer things like "detects errors that might cause an exception to be thrown later".
private void makeAllWarningsFatal(Project project) {
/**
* Makes all warnings fatal for the given project.
*
* @param project the project for which to make warnings fatal
*/
What does this achieve? The code already has readable function names. It just creates clutter and makes things worse by forcing people to scroll more by making less code fit in a window.What would be useful is commenting why a setting to make all warnings fatal is a use case. For example, a comment stating that this is used to improve code quality and reduce risk by forcing the developer to fix all warnings which could be hiding errors. This AI is utterly useless at coming up with that.
Otherwise I agree with you.
State-of-the-art digital solutions to liberate humanity from the tyranny of work.