đ Ah, the age-old debate resurrected! Why explain *what* the code does when you could just write clearer code to begin with? đ€ But hey, let's reignite the flames with this groundbreaking revelation: maybe, just maybe, #comments should state the obvious too. đ„ Because we all need more #verbose hand-holding, right? đ
https://www.hillelwayne.com/post/what-comments/ #codeclarity #programmingdebate #codingbestpractices #HackerNews #ngated
https://www.hillelwayne.com/post/what-comments/ #codeclarity #programmingdebate #codingbestpractices #HackerNews #ngated
Maybe Comments SHOULD Explain 'What'
People say âComments should explain why, not what.â I feel like starting a flame war today so Iâm going to argue that comments should explain âwhatâ too. Please donât use this as justification to write bad code, okay? Okay. First of all, why shouldnât comments explain âwhatâ? If you need comments to explain whatâs going on, it suggests your code is unclear. If I write //weight, radius, price w = 10, r = 9, p = 1 Thatâs not as clear as saying