A RDoc template without frames

Despite the snazzy look of the new default RDoc templates with three
panes at the top, I keep coming back to the original flat look of
http://www.rubycentral.com/book/builtins.html. There’s something deeply
usable with having all the modules and methods take up a full screen
instead of being cramped into tiny panes at the top. Of course, it
could also be, as Dave Thomas suggested, that I’m just “getting old and
inflexible”.

Regardless of which, I’d be terribly appreciative if anyone had the
insight and energy to make a set of RDoc templates that used this flat
format with 1 index and 1 page per module. I’d really like to have it
for the unveiling of the new Ruby on Rails site, which is coming
shortly.

Even Dave says its not supposed to be that hard: “…if someone wanted
to create a new output template and generator, it would be fairly
simple: just change the stuff that generates the current top frame to
store it all in one file, not three”

Anyone up for it? :slight_smile:

···


David Heinemeier Hansson,
http://www.basecamphq.com/ – Web-based Project Management
http://www.rubyonrails.org/ – Web-application framework for Ruby
http://macromates.com/ – TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ – Broadcasting Brain

Regardless of which, I'd be terribly appreciative if anyone had the
insight and energy to make a set of RDoc templates that used this flat
format with 1 index and 1 page per module. I'd *really* like to have it
for the unveiling of the new Ruby on Rails site, which is coming
shortly.

+1. I wish I had time to just do it!

David Heinemeier Hansson wrote:

Despite the snazzy look of the new default RDoc templates with three panes at the top, I keep coming back to the original flat look of http://www.rubycentral.com/book/builtins.html\. There's something deeply usable with having all the modules and methods take up a full screen instead of being cramped into tiny panes at the top. Of course, it could also be, as Dave Thomas suggested, that I'm just "getting old and inflexible".

I don't have the time to do it either, but I'd really appreciate it too. If (like me) you constantly use Firefox/Mozilla's type-ahead-find feature you'll be messed up constantly by framed sites.

There are lots of problems with the online ruby book HTML, but I've always found it much more useable than any of the rdoc documentation.

I think the absolute ideal of Ruby documentation would be something along the lines of:

* Ruby language reference
   * keywords and their meanings
     * alias
       alias <new name> <old name>

       example:
       alias oldBackquote `
       def `(cmd)
         result = oldBackquote(cmd)
         if $? != 0
           raise "Command #{cmd} failed"
         end
         result
       end
       print `date`
       print `data`
     ...
     * rescue
       rescue <ExceptionClassList>
       rescue <ExceptionClassList> => <varname>

       example:
       begin
         eval string
       rescue SyntaxError, NameError => boom
         print "String doesn't compile: " + boom
       rescue StandardError => bang
         print "Error running script: " + bang
       end
     ...
   * regexp reference
     ...
     * m - multiline
     ...
   * commandline reference
   ...
* Ruby core builtins
   * Array
     *
     ...
     * each
     ...
   * String
     ...
     * length
     ...
* All ruby builtins
   ...
   * CGI
   ...
   * Process
   ...
   * Test
     * Unit
   ...
   * Zlib
     * GzipFile
* Ruby standard library
   * soap
   * webrick
     * <webrick documentation or link to webrick documentation site>
   * yaml
     * <yaml documentation or link to yaml documentation site>
     * Yaml
       * dump
       * load

As far as I know, the keyword documentation I'm dreaming of doesn't exist anywhere, but it would be just amazing to have. I always forget little details, like does 'alias' have symbols after it, or bare function names? Does it use a comma separator or whitespace? How do you assign a variable for the exception when you rescue it? What are the options for creating a multiline, case-insensitive regular expression?

As for the documentation of the built in classes, I think the builtins page linked above is a masterful work of UI design. It is exactly what's required when you are asking yourself the question "What's the name of that method that converts an id number to a string, and what class is it in?"

I go to that page, and after a bit of quick scanning I spot Fixnum#id2name, I click on that and get an explanation and a great example.

The way that page is laid out, there are about 1.5 screens (for me) worth of text, all of it laid out in a clear hierarchy, all of it hyperlinked. Compare that to RDoc Documentation

The page is mostly blank, but at the top I get 3 scrollable frames, each about 20 "windows" long. It just isn't as easy to browse.

Once I choose a class/file the documentation is excellent and readable, but because of the frames, my type-ahead-find doesn't work.

Now, Ruby has gotten bigger between the release of the first book and the documentation on ruby-doc.org, but the list at the book site is still better for me. I use Array far more than I do Zlib::GzipFile::NoFooter. While they may both technically be part of the core, Array, String, Hash, etc. really deserve special status as inner core, or uber-mega core, or something. 99% of the time I find I'm looking up uber-mega core information or keywords, and Zlib::GzipFile::NoFooter just gets in the way.

My not-so-humble opinion. :wink:

Ben

Funny, that 3-pane format reminded me a lot of a Smalltalk class/method
browser, except it isn't one, of course. The problem is that it's
static, not dynamic. Given that we have rails here, how about a real
browser, rather than static web pages? Heck, you might even contemplate
generating the documentation on the fly, so you just point it at a
directory and you can start browsing.

cjs

···

On Mon, 20 Dec 2004, David Heinemeier Hansson wrote:

Despite the snazzy look of the new default RDoc templates with three
panes at the top, I keep coming back to the original flat look of
http://www.rubycentral.com/book/builtins.html\.\.\.\.
Regardless of which, I'd be terribly appreciative if anyone had the
insight and energy to make a set of RDoc templates that used this flat
format with 1 index and 1 page per module.

--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.NetBSD.org
     Make up enjoying your city life...produced by BIC CAMERA

I did a design up once for something without frames:

http://johnwlong.com/images/rubyred-rdoc-template.png

I even did up the html for it. When I got around to implementing it I didn't find the time to actually make it work, but I did get it going in the three/four pane view.

If anyone's interested in using the html I'd be happy to hand the project off to them.

···

--
John Long
http://wiseheartdesign.com

David Heinemeier Hansson wrote:

Despite the snazzy look of the new default RDoc templates with three panes at the top, I keep coming back to the original flat look of http://www.rubycentral.com/book/builtins.html\. There's something deeply usable with having all the modules and methods take up a full screen instead of being cramped into tiny panes at the top. Of course, it could also be, as Dave Thomas suggested, that I'm just "getting old and inflexible".

Regardless of which, I'd be terribly appreciative if anyone had the insight and energy to make a set of RDoc templates that used this flat format with 1 index and 1 page per module. I'd *really* like to have it for the unveiling of the new Ruby on Rails site, which is coming shortly.

Even Dave says its not supposed to be that hard: "...if someone wanted to create a new output template and generator, it would be fairly simple: just change the stuff that generates the current top frame to store it all in one file, not three"

Anyone up for it? :slight_smile:
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

I'm not a big fan of the 3 pane view, but am waiting to see if my
brain adjusts to it.

···

On Tue, 21 Dec 2004 03:47:18 +0900, Aredridel <aredridel@gmail.com> wrote:

> Regardless of which, I'd be terribly appreciative if anyone had the
> insight and energy to make a set of RDoc templates that used this flat
> format with 1 index and 1 page per module. I'd *really* like to have it
> for the unveiling of the new Ruby on Rails site, which is coming
> shortly.

+1. I wish I had time to just do it!

John W. Long wrote:

I did a design up once for something without frames:

http://johnwlong.com/images/rubyred-rdoc-template.png

I even did up the html for it. When I got around to implementing it I didn't find the time to actually make it work, but I did get it going in the three/four pane view.

If anyone's interested in using the html I'd be happy to hand the project off to them.

Gorgeous templates, John. I'd love to get a copy of what you have. I'm sure we can find someone to wrap up. Better yet, would you be okay with making a zip of your work available to the list?

_why

Curt Sampson ha scritto:

Funny, that 3-pane format reminded me a lot of a Smalltalk class/method
browser, except it isn't one, of course. The problem is that it's
static, not dynamic. Given that we have rails here, how about a real
browser, rather than static web pages? Heck, you might even contemplate
generating the documentation on the fly, so you just point it at a
directory and you can start browsing.

well, I don't think visitors of the site are expected to add classes/methods/objects to the rails space from a form.. even if it would be really cool :smiley:

Nicholas Van Weerdenburg ha scritto:

I'm not a big fan of the 3 pane view, but am waiting to see if my
brain adjusts to it.

actually it is a 4 pane view.
I'm a fan of the three pane one as it comes out from javadoc :confused:

Ask and you shall receive:

http://johnwlong.com/downloads/rubyred-rdoc-template.zip

The ruby-red.rb is the three/four pane rdoc template. It worked with one of the versions of rdoc, but may need some tweaking to get it going with your version.

One thing I wondered about while working on it. Seems like it would be nice for rdoc to have a way of specifying a copyright of some kind to be displayed on the documentation. A flag would be nice:

rdoc ... --copyright "Copyright&copy; 2004, John W. Long"

···

--
John Long

why the lucky stiff wrote:

John W. Long wrote:

I did a design up once for something without frames:

http://johnwlong.com/images/rubyred-rdoc-template.png

I even did up the html for it. When I got around to implementing it I didn't find the time to actually make it work, but I did get it going in the three/four pane view.

If anyone's interested in using the html I'd be happy to hand the project off to them.

Gorgeous templates, John. I'd love to get a copy of what you have. I'm sure we can find someone to wrap up. Better yet, would you be okay with making a zip of your work available to the list?

_why

Oops. Right.

I am used to Java doc layout, and like it. But I am giving my brain
time to see if it adjusts to the 4 pane view.

Thanks,
Nick

···

On Tue, 21 Dec 2004 06:57:03 +0900, gabriele renzi <rff_rff@remove-yahoo.it> wrote:

Nicholas Van Weerdenburg ha scritto:
> I'm not a big fan of the 3 pane view, but am waiting to see if my
> brain adjusts to it.
>
>

actually it is a 4 pane view.
I'm a fan of the three pane one as it comes out from javadoc :confused:

--
Nicholas Van Weerdenburg

John W. Long wrote:

One thing I wondered about while working on it. Seems like it would be nice for rdoc to have a way of specifying a copyright of some kind to be displayed on the documentation. A flag would be nice:

rdoc ... --copyright "Copyright&copy; 2004, John W. Long"

This copyright could be included in the generated templates. At the bottom, in the same fashion seen in your mockup. If you have a name for your design, it might work better to say "Regal Elegance Design is Copyright (c) 2004, John W. Long." Should you determine that your templates are regal and elegant enough (and they are) to warrant a name such as Regal Elegance.

_why

Sounds like something better done in the markup than the command-line.
When I run rdoc on your code, I certainly won't know to add the
switch...

···

On Tue, 21 Dec 2004 14:24:18 +0900, John W. Long <ng@johnwlong.com> wrote:

Ask and you shall receive:

http://johnwlong.com/downloads/rubyred-rdoc-template.zip

The ruby-red.rb is the three/four pane rdoc template. It worked with one
of the versions of rdoc, but may need some tweaking to get it going with
your version.

One thing I wondered about while working on it. Seems like it would be
nice for rdoc to have a way of specifying a copyright of some kind to be
displayed on the documentation. A flag would be nice:

rdoc ... --copyright "Copyright&copy; 2004, John W. Long"

This copyright could be included in the generated templates. At the

> bottom, in the same fashion seen in your mockup. If you have a name for
> your design, it might work better to say "Regal Elegance Design is
> Copyright (c) 2004, John W. Long." Should you determine that your
> templates are regal and elegant enough (and they are) to warrant a name
> such as Regal Elegance.

I'm not planning on copyrighting the design. I would like it to be used and modified by everybody. But as a developer I'd want to copyright my documentation.

The design's name is Ruby Red, although Regal Elegance does have a certain ring to it. =)

···

--
John Long
http://wiseheartdesign.com

I'm not planning on copyrighting the design.

You already have, simply by making it. You'd have to "uncopyright" it.
(copyleft, creative commons, GPL, FSF, etc)

Douglas

Douglas Livingstone ha scritto:

I'm not planning on copyrighting the design.

You already have, simply by making it. You'd have to "uncopyright" it.
(copyleft, creative commons, GPL, FSF, etc)

just to know.. is someone else missing the previous messages of this thread?
I'm afraid my newsserver is going mad, but I'm more afraid of news2ml.rb getting broken :confused:

Douglas Livingstone wrote:

I'm not planning on copyrighting the design.

You already have, simply by making it. You'd have to "uncopyright" it.
(copyleft, creative commons, GPL, FSF, etc)

Good point. I hereby release it into the public domain. I'll get around to changing the copyrights in the zip file at some point.

···

--
John

Douglas Livingstone wrote:

I'm not planning on copyrighting the design.

You already have, simply by making it. You'd have to "uncopyright" it.
(copyleft, creative commons, GPL, FSF, etc).

I know you quoted it, but the GPL and Creative Commons are most emphatically not "uncopyrights". They are licenses to use the work that are explicitly based on the owner's copyright.

Steve

just to know.. is someone else missing the previous messages of this thread?
I'm afraid my newsserver is going mad, but I'm more afraid of news2ml.rb getting broken :confused:

My version of thunderbird is having a hard time tracking it. I have to restart thunderbird each time I want to check and see if there is a new message.

Really weird.

···

--
John

John W. Long wrote:

My version of thunderbird is having a hard time tracking it. I have to restart thunderbird each time I want to check and see if there is a new message.

Does collapsing and uncollapsing the current message thread help? At least that fixes it for me. It seems to be caused by all new messages getting put at the bottom of a thread.