upvote
It does, but the model is also decent at refactoring. I tend to just have it knock out a solution first and then tell it to refactor it in the next step. That usually makes the quality at least bearable. It may be helpful to tell the agent to write a style and architecture guide for itself that it can reference in later chats.

The thing I find it very hard to calibrate on, though, is comments, including documentation comments on classes and methods. It tends toward the extremes of either commenting everything in the

    createUser(); // creates user
style or of just dumping out thirty lines of optimized bit-banging with no explanation of what that code even sets out to achieve. Maybe somebody has a good solution for this?
reply
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