Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why Comments Are Stupid: A Real Example (simpleprogrammer.com)
6 points by jsonmez on April 14, 2015 | hide | past | favorite | 2 comments


What a dreadful example. The old code was relatively short and could be read sequentially and without scrolling. The new code requires hopping up and down to see the helper methods (which are called only once) and exist only to replace a comment with a function whose name is basically the comment!

Only the very first change (changing the name of the parameter) was an improvement.


Agreed. "FindPivotIndexBetweenEndOfStringAndRoot" as a method means nothing to me (although the original comment was also useless.) What the hell is a "Pivot Index"? And is "Root" after the "End Of String" or before it? WHAT IS HAPPENING?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: