1499 lines of Ruby code.
19 lines of comments.
Nope, nope, nope. I would never touch this library.
Good amount of tests, but the moment this library doesn't work as expected and you need to jump into the code, you're completely screwed.
Not usable.
1499 lines of Ruby code.
19 lines of comments.
Nope, nope, nope. I would never touch this library.
Good amount of tests, but the moment this library doesn't work as expected and you need to jump into the code, you're completely screwed.
Not usable.
I don't think you're giving yourself enough credit.
A quick glance at the source shows that the size of the program is a result of implementing the many methods one expects from collection classes in Ruby, not because the code is especially byzantine. In fact, I haven't seen a single instance of class inheritance; the author seems to have chosen to solely use a few well defined modules instead.
Comments often tend to explain the same thing as the code exactly does and what you see w/o looking at the comment. Also, they tend to be forgotten - if someone changes the code, he/she often doesn't change the comment. As a result, you'll have an outdated comment which can confuse you.
I recommend "Clean Code"[1] for more info on this subject. Beside other chapters, there's a chapter about what's a good and what's a bad comment.
[1]: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
In any event, I was looking for solid examples, not a general discussion on whether comments are good or bad. We clearly are not going to agree on that point so we'll save the Internet another pointless argument :-)