Navigation

June 16th, 2007

Navigation is kind of a big deal. It’s one of the few things we still sigh about when we think back to the days when we used Java and Eclipse. I don’t know if anyone is doing anything about it. Like most tool support, a much simpler solution than Eclipse could get you 90% of the value. Today I had an idea about how to approach navigation, and I think it rather a good one. Look at this:
dotjerky$ related app/controllers/products_controller.rb 
app/controllers/products_controller.rb (31)
test/functional/products_controller_test.rb (28)
app/models/product.rb (18)
app/views/products/index.rhtml (18)
test/unit/product_test.rb (16)
app/views/products/_form.rhtml (15)
db/schema.rb (15)
app/models/image.rb (14)
app/models/user.rb (14)
app/views/products/show.rhtml (14)
app/views/layouts/site_layout.rhtml (14)
test/fixtures/products.yml (14)
app/helpers/products_helper.rb (14)
test/fixtures/taggings.yml (14)
... ... ...

This was accomplished with about 10 minutes of Ruby hacking and a few calls to subversion. It basically looks up which files tend to get committed at the same time as the given file, which means that it has no dependency on the language or framework used. Performance is a problem, accessing all that history, so I need to figure out some sort of cache. Otherwise, it’s a simple matter of slapping a GUI on this thing and hooking it into TextMate.

It seems like you could do some really cool stuff with line numbers too, like showing snippets of code from other files that were modified at the same time. That would be quite a bit more work though, and probably more annoying when it showed the wrong thing.

1 Response to “Navigation”

  1. Seth Nickell Says:
    Hey Austin, Comments are closed for the post... but I was wondering if you had sample code that was using CoreAudio? I've been doing music programming (predominantly in Python) and have been thinking about transitioning to ruby now that I'm using it for various rails development. I was looking at using CoreAudio with the dl library, but maybe that's not the best approach? -Seth

Sorry, comments are closed for this article.