3 ms·
Once in a while I look back at my own code and wish I had a comment to explain what the hell it does. Maybe even a one liner - can be super useful when code it
by pkrotich 4y ago
Once in a while I look back at my own code and wish I had a comment to explain what the hell it does. Maybe even a one liner - can be super useful when code it cryptic.
I once had a colleague who wrote extra long comments and I felt like it was an overkill (maybe I was intimated!?) and a distraction when reading the code with IDE that cannot hide comments as needed. If you’re a vim user see [0] on hiding comments with fold.
[0] https://www.rtfm-sarl.ch/articles/hide-comments.html https://www.rtfm-sarl.ch/articles/hide-comments.html