« Previous day (May 24, 2007) | Main | Next day (May 26, 2007) »

20070525 Friday May 25, 2007

Ruby Screenshot of the Week #12: Improved Ruby Documentation

One of the things I did this week was to rewrite the code which extracts documentation for all the core Ruby APIs (which are defined in the C Ruby implementation). This fixes some bugs where a method here and there were missing its documentation.

In doing so, I started looking at the actual IDE presentation of the documentation as well, and thought I could make it a lot more appealing. Without further ado, here's how the documentation looks now:

The most interesting part here is that the IDE now figures out whether portions of the documentation corresponds to Ruby code, and then presents it with syntax highlighting right there in the documentation popup. (I've also improved the way the method signatures are displayed so it should use less space and be more readable now, although that's harder to spot than if you compare before-and-after shots.)

Heres another example. This shows a migration in a Rails application, where you're getting code completion on the create_table method.

One interesting aspect of this highlighting is that it's easier to spot mistakes in your comments. As I was testing this feature, I pulled up the documentation on the Rails send_file method - and the following code fragment looked wrong:

Sure enough, it looks like it's missing a single-quote right after 404.html. This is the kind of thing which will be a lot easier to spot and fix with the new enhanced highlighting!

P.S. You don't have to use code completion to get the documentation popup - just hit Ctrl-Shift-Space with the caret on the symbol you want to look up - or Command-Shift-Space on the Mac.

(P.S.2: If you're trying to download this, see my other blog entry on the current temporary download location.)

(2007-05-25 15:01:53.0) Permalink Comments [18]

Where's nbextras.org?

Updated Monday May 28: The machine is back up and running (and much faster than before). You can grab up to date builds from the old location again (and the wik installationi page points back to it again). The latest builds have both a fix for the RHTML problem as well as support for encoding properties on projects, so the old file.encoding=UTF-8 system property workaround should no longer be necessary.


The deadlock.nbextras.org machine, which I've been pointing to regularly as the best place to get up to date builds of the Ruby support, is off-line. It is being replaced by a brand new machine, much faster and more reliable, and should be back up on-line on Monday (May 28th).

Apologies to those of you relying on deadlock.nbextras.org for regular updates. The service should be getting a lot better from now on. The reason it's taking several days to perform the migration is that this is a volunteer-driven effort, so there's a bit of cooperation necessary to get the machine picked up at the ISP, the disks mirrored over to the new machine and the machine taken back in to the ISP and get back up and running.

In the meantime, I've set up a temporary location where you can get up to date bits. The instructions and URL will be kept up to date on this wiki page.

(2007-05-25 14:59:42.0) Permalink Comments [7]