3 ms·
Comments on non-trivial code is invaluable. I do it constantly and appreciate traversing previously made comments, especially when beyond short-term memory. Reg
by andirk 4y ago
Comments on non-trivial code is invaluable. I do it constantly and appreciate traversing previously made comments, especially when beyond short-term memory. Regexes, multi-conditionals, all those weird edge cases. How does any of that go "out of date"? As time progresses, comments become _more_ valuable, not less. What is the use case where comments are bothersome or out of date?
- VBprogrammer 4y agoComments about what something is doing are both the least useful and most likely to go out of date. Comments about why something is happening are in my experience much more useful. An example: # Using an if / elif rather than a select here Rather than: # Use a large if / elif statement here due to a regression in TCL 8.4 which made select statements significantly slower. See GitHub.com/tcl-bugs.