Hacker News new | ask | show | jobs
by GianFabien 1564 days ago
Totally agree.

Source code is for the compiler to read and comments for the humans to read so that they understand the constraints, reasons, etc that things were done they were. In my younger days, I tended to write "self-documenting code" which basically didn't. I lost count of the number of times code written a few months prior made no sense to me and I had to painstakingly re-read and understand the source code. That's how I learned to use comments as the breadcrumbs to follow months / years down the track.

If you write throwaway code, then no need to bother with the comments. Make sure you do throw away such code.