r/TheMachineLearning • • 23d ago

Frontier LLMs stopped adding code comments

Post image
720 Upvotes

178 comments sorted by

View all comments

4

u/nukem996 23d ago

Linux kernel coding standard is code should be clear enough to not need comments. Comments are reserved for odd behavior e.g spec says x but hardware actually does y. I've had patches rejected because it has comments.

2

u/snaphat 23d ago

The Linux kernel style guide discourages comments inside functions but explicitly recommends comments explaining what functions do and documenting data. Comments aren't reserved exclusively for unusual behavior. Perhaps, what you mean is inline-comments?

https://docs.kernel.org/process/coding-style.html#commenting

1

u/nukem996 23d ago

It depends on the maintainer. I had one tell me to remove all comments on all functions.

1

u/snaphat 23d ago

They weren't following the style-guide then, not surprising through

1

u/SizeableBrain 23d ago

Did they forget about the infamous "fuck me gently with a chainsaw" comment?