Should there be an official Rails manual?
One of the biggest problems with documentation, especially in active community projects like Rails, is that it becomes outdated so quickly. Thus, we have tools like RDoc, which allow us to put documentation inline with the code. This makes a great API reference, but it isn’t always that helpful when learning the features of the framework.
When the fine folks at Caboo.se announced their drive to raise funds for Rails documentation, I was really hopeful that the result would be an “official” Rails manual. I suggested it on their wiki, and several people commented that it would be a good idea, but there didn’t seem to be a lot of public conversation about it (at least, not out side of #caboose). It seems so far that the Caboo.se documentation effort is primarily focused on the Rails RDoc.
Currently, the best resource for understanding Rails features are individual blogs. While this is good for bloggers, it is a pain for users. For example, yesterday I was trying to figure out all the things you can do with generators. The best resources I found on the subject were mini howtos on random blogs.
Several of the (Java) frameworks that I have used in the past have had an official manual, and although it was very dry (not the good kind of DRY), it was a great resource. The Spring framework and Hibernate both have excellent reference manuals.
I think that we need an official Rails reference manual: in-depth coverage of all the features of the Rails framework organized into a table of contents with an index.
One could argue that we don’t need a manual because of wonderful books like Agile Web Development with Rails, Ruby for Rails, Rails Recipes, etc. While these books are definitely helpful, they suffer from the problem of quickly becoming outdated (thus the need for a 2nd edition of AWDWR in just over a year). The community moves too fast to keep RDoc up to date, and the publishing industry, by nature, is simply slow. And for the most part, the books are a skin-deep overview of the most important features, not a reference manual.
One could also argue that this would hurt the publishers, but I don’t think it would. A reference manual is a lot different from a book. A reference manual, while potentially helpful for beginners, would be of more value for intermediate (and maybe even advanced) users. There would still be plenty of room for books targeted at beginners, and could open up a market for more advanced books on specific topics.
What should a manual look like?
One possibility is to treat it with the same respect as the Rails source code: put it under version control and file bug reports and patches for it. The advantage of this approach is that the documentation is versioned. There can be manuals for each release of the framework without having to duplicate efforts. Fixes can be merged into all versions of the manual. You could encourage (force) patch submissions for the framework to include documentation updates. The down side is that documentation would have to be written in something like DocBook (yuck), which would limit it to more tech-savvy authors.
The next option is a wiki. This has been tried and has turned into a jumbled, nearly useless mess. The wiki would require organization and a hierarchy. A wiki approach would make it easier for anyone to contribute. The down side is that there is only one version of documentation. It makes it harder to keep it up to date as Rails progresses.
A third option is to write something that combines the best of the previous two. A wiki interface to versioned documentation. This is sort of what Caboo.se is trying to do with RDoc. The wiki could either tie directly into subversion, or generate patches that could be submitted to a documentation team.
Who’s going to write it?
Well, we are. The are open source projects out there that have proven that good documentation is possible. You just have to be very intentional and disciplined.
To start with, we could just take existing blog entries, with the author’s permission, and compile them into a form of a “manual”. Then, proceed to make it more cohesive. We could also possibly pull in the parts of the Rails RDoc like the intro to ActiveRecord::Base, since that information is really more reference material than API documentation.
After that, the core team needs to be more adamant about requiring documentation with patches, and the community needs to step it up.
Thoughts?
What do you think? Is this truly a need of the community, or is it just something I long for?
6 Comments
I don’t think a manual is entirely necessary, it’s definetly nice to have as much documentation on a language as possible.
There is a lot going on with ruby and rails, both, at this given time; and I wonder if it will ever slow down enough so that people can develope a stable book release.
The books you mentioned are all really great books and they definetly help people learn the framework better than anything. Regardless of how outdated they may get, the idea is that you learn how to fully utilize the framework. And then go into more advanced usage by searching out new modules (or hopefully creating your own), and implementing them with your newly found understanding for the framework.
You definetly bring up some good points, and I’m not too sure if what I said made any sense.
way to censor the comments dude.
how about a django like book? or is ti too controversial to even say that in the rails blog world?
I’ll address SERF’s off-topic comments in another post, thus they’ve been moderated for now to keep this article about whether Rails needs a manual, and not the merits of Rails itself.
I think Django has done a pretty good job on their manual. It is one of the projects that I have in mind when I say that there are many projects that have proven that good documentation is possible.
I think we have a lot to learn from projects like Django, PostgreSQL and Mysql, and (dare I say) PHP.
I agree that something along the lines of the Django book would be good to have, but I believe that we need two things:
1. A Django style book that is geared mostly towards beginners. Something along the lines of the Agile book, but being open and free, reduces the barrier to entry without, IMO, detracting from sales of the book (or other similar ones), since anyone who decides to actually start coding in Rails will purchase those. Most importantly, it can be regularly updated.
2. Almost more important that the first point is something to provide better information for intermediate users, those who have read Agile or Ruby for Rails and are beyond that. Currently the only option is to subscribe to a lot of blogs or read everything on some of the Ruby blog aggregation sites, and read the mailing list (but who has time?) but there are still so many gaps. I think this could be a book like the Django book (but covering different topics than a beginners one), but with a bit more flexibility than a book. Sort of a combination book + wiki with comments, would be nice. The book would set the structure, but then wiki-like entries could branch off in different directions from the main chapters, added by Rails programmers. People spend time responding to queries on the mailing lists; if there was a structure that they could fill in bits of pieces of, they might spend that time to instead write a paragraph or two on this book/wiki. But someone would have to come up with the structure first. Also, examples are needed – that’s the thing I find most difficult in reading through the Rails API – the lack of examples, which leads to a lot of experimentation to understand exactly how it works or what the undocumented method options are.
thanks for acknowledging my post. I did get carried away, but I mean well (I promise)
I think you have the problem analyzed pretty much bang on. Even if we are to get the source for djangobook (which the django crowd is being a bit miserly about if they’re not releasing it) is it possible that such a project will take off because the “powers that be” don’t think it is a problem.
Without the blessing and support of those who are most knowledgeable and therefore best positioned to help out in this effort, it is doomed to fail.
Or we could just start it and hopefully people will get publicly shamed into contributing content.
Your point about examples is very well put. It is a pain in the neck trying to find out what a method does etc just looking at the barebones method def. We need things like argument domains, examples etc for the RDoc to make more sense and be more productive.
The best docs I ever seen for any framework are Django and Code Igniter
Post a Comment