8 ms·
It was already a well-known review point way before LLM's. Every book about code cleanliness has some point about "write WHY not WHAT when commenting code". It'
by jaapz 1mo ago
It was already a well-known review point way before LLM's. Every book about code cleanliness has some point about "write WHY not WHAT when commenting code". It's a point everyone makes, because it's such an ubiquitous thing.
Of course the standard bad example is
// add 1 to a
a++;
While an IMHO good example would be when normally you wouldn't expect this addition, so you'd comment
// the flipDinkleWooptie method doesn't add one in this case
// because there is no wooptie register, so we manually
// add one here.
a++;