3 ms·
I'm the sole author and developer of HashBackup, written in Python. I just checked, out of curiosity, and 18% of HashBackup's non-blank lines are comment lines
by prirun 4y ago
I'm the sole author and developer of HashBackup, written in Python. I just checked, out of curiosity, and 18% of HashBackup's non-blank lines are comment lines. Considering Perl is usually more dense than Python, I'd say your "very cryptic 100 lines" of Perl should have at least 20 comment lines, and probably more, for me to feel comfortable with them.
I know some people have a philosophy of "ignore the comments, just read/trust the code", but it is such a waste of time to revisit code 5 years later and have to remember or re-learn all of the circumstances and edge cases that lead to the decisions in this concrete implementation. This is true just for myself, having written the code (!), and would be especially true on a team of 80 SWE's: it's more likely you didn't write the code you're looking at, or multiple people have mucked with it, and everyone who has to modify it in the future is going to have to go through this re-learning process to some degree before changing it. Do them a favor and comment everything that is committed to a repo.