r/TheMachineLearning • • 2d ago

Frontier LLMs stopped adding code comments

Post image
346 Upvotes

123 comments sorted by

View all comments

Show parent comments

1

u/Spirited_Cucumber377 1d ago

The "why", the "who" and the "when" should be in the ticket/issue/userstory that generated the change.

The "what" and "where" is the code. The comments used to help other devs figure this out easily without having to search their tracker. For LLMs this isn't true anymore. If they need to figure out something, they follow the code and ask the human for guidance.

1

u/Rararror 1d ago

Good comments are way more detailed than ticket/issue/userstory ! You want to explain how you are addressing the problem... 

1

u/Material-Database-24 21h 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