logoalt Hacker News

gritzkotoday at 8:23 AM2 repliesview on HN

Recently?


Replies

jaapztoday at 8:55 AM

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++;
vladvasiliutoday at 8:32 AM

He's been complaining about this pretty much since we started working, more than 10 years ago.