Ask HN: Comments in Code. Yay or Nay?

3 points by reconnecting ↗ HN
Do we still need to maintain comments in general-purpose scripting language? Is good code code that doesn't need comments? What are the most useful comments in code that you've seen?

7 comments

[ 4.3 ms ] story [ 29.4 ms ] thread

    # If you see this comment after 2008 something went wrong.  rewrite this "temporary script".
I give people an excuse to get rid of my temporary things.
Comments are a gift to future you. When you pick up the code again after 6 months/years/however-long-in-the-future and it looks like something you've never seen before, the comments you left should be notes you need to build context around what's in the code and (sometimes more importantly) what's NOT in the code.
Comments are essential. The code may tell you the "what", but you need the comments to tell you the "why".
shouldn't it be described in readme/docs?
I can't stand people who say that all code comments are bad.