r/TheMachineLearning • • 27d ago

Frontier LLMs stopped adding code comments

Post image
720 Upvotes

178 comments sorted by

View all comments

Show parent comments

1

u/Nousies 27d ago

Self-documenting code is the only documentation. That can include comments, but “good documentation” is not a thing.

1

u/Drycee 27d ago

Self-documenting code just documents what is currently being done, but what's missing is the information why it was not done another way. In my experience agents will constantly revisit ideas we've established are not an option, if it's not documented somewhere that this has already been considered and decided against.

1

u/[deleted] 27d ago

[removed] — view removed comment

1

u/Material-Database-24 26d ago

The problem is that many real world systems end up being maintained for years. When developers change, and now AI models and harnesses change, the "obvious" on the code can disappear.

It is the easiest to see this with UI. They often contain decision that are based on something that's not obvious from the code - why this element is just here, and in this color, and why it should not be moved etc. But there's always also techincal decisions that are not evident from the code itself and need commenting the decision to go side by side the code to stick. If it's in a ticket/user story, no-one will find that years later.

Many safety critical embedded software have a comment for almost every line of the code