upvote
Indeed, getting good comments is hard. The other annoying thing is that you set out the spec and tell it to write code that creates users, and it'll create code that creates users and also user preferences, and then you tell it not to create the user preferences until required, and then you get:

   createUser(); // creates user, but does not create user preferences until required
reply
This exactly. Drives me nuts. It starts throwing in random comments that are only relevant to the path we took to get to the final code, vs comments anyone else would actually care about.
reply
> only relevant to the path we took to get to the final code

The coding standard I've cobbled together (based purely on my own pet peeves) calls these "history comments", and after about many rounds of "see this right here? That's history, take it out" has pretty much eliminated them. Of course, the coding standard doc has all of those examples along with terribly repetitive prose explaining why it's bad, and so I've stopped even looking at the coding standards doc lest my eyes start twitching uncontrollably, but it seems like the AIs need to accumulate cruft somewhere, and I'd rather it be there than in the code?

reply