This post originated from an RSS feed registered with Ruby Buzz
by James Britt.
Original Post: Ruby Lib Pet Peeve
Feed Title: James Britt: Ruby Development
Feed URL: http://feeds.feedburner.com/JamesBritt-Home
Feed Description: James Britt: Playing with better toys
Grrr. I'm trying to get some Ruby code together for soon-due magazine article, and I needed to get a certain library. Installation was a snap; it was available as a gem.
The rdoc main page showed how to install the lib, which is nice, but I was past that. It didn't, however, show even a simple example.
Now, I knew this was likely the lib Iwanted, because I had already seen a basic example in some archived thread. And here's my gripe: the example omitted the proper 'require' statement. You can't run the example unless you know how to load the library.
My first guess was that the require argument would be the name of the library, or some minor variation. But, oh, no. It was related to the lib name, but not (to me, at least), obvious. The gem included some examples, and it was there I learned the correct way to start using the library. Seems, though, that something so basic should be right up front, in the docs, in an example, on the main page.
(Mind you, I've released a few libraries myself, and I cannot assure you that I'm not guilty of this myself. But still. Grrr.)