Weekday code accepted into Ruby Facets

Dave Hoover picked up the ball from my "next-weekday" post and submitted a contribution to the Ruby Facets project. Now Ruby Facets lets you require 'facets/more/times' and say things like 1.weekday.ago, 4.weekdays.from_now, and 9.weekdays.since(some_time).

Have a look at the source. Thanks for your work preparing this contribution, Dave!

Providing a format to RESTful resource routes

I am absolutely loving the RESTful support in Rails 1.2. It uses conventions to tilt the playing field toward domain-driven design. Yum, yum, yum. My favorite use of conventions in Rails yet. The URLs are meaningful, the controllers now have a clear design, it's an appropriate and extensible abstraction, life is good and Rails apps are much improved for it.

But I ran into a hitch that foiled me for a little while. I only solved it by spelunking into the code, so I'm posting the solution in hopes that Google will be a better friend about this.

Simply providing a :format option to a resource's named route doesn't work as expected.

photo_path(:id => 1, :format => 'png') #=> /photo/1?format=png

Instead, the resources routing method defines a separate named route prefixed with formatted_:

formatted_photo_path(:id => 1, :format => 'png') #=> /photo/1.png

Tricky...I wonder what it would take to make this complication unnecessary.

Ruby on Rails and more at Obtiva

I'm pleased to announce that I'm now working with Obtiva, a group of Agile coders in Wheaton.

We do a lot of Ruby on Rails development work. I'm enjoying getting to know and learn from Dave Hoover and Tyler Jennings. We're hard at work on several exciting projects, some intranet apps and some major upcoming launches for national brands that are expected to get quite a lot of traffic. In addition to client work, there are rumored to be some very interesting internal efforts. Watch for some compelling announcements in this space.

Interestingly, we're also a top-shelf Java Eclipse RCP shop. I got a demo of a major app we just delivered to a client's thousands of end users, and it's very polished and snappy. I'm quite excited about the opportunity to work with a serious agile team on this caliber of product.

We do agile coaching and training as well. I'll talk more about that in another post.

I'm excited to be part of this team. We're enthusiastic about developer testing and other agile practices, we walk the walk, and it shows in the high quality of our deliverables and the friendly culture.

Full speed ahead!

Shortcut for locating files in TextMate

I haven't yet actually hunkered down and learned TextMate as a key tool like I did when I learned Vim at the sage advice of The Pragmatic Programmer. But I should.

One bit I picked up recently: instead of scrolling through the file drawer to find a certain file in the project, just hit Command-T. Up pops a nice filename search box. Type a key word from the file name, and a list of filenames appears below. Type a little more to shorten the list, or just use arrows and Return, up pops the file. No mouse.

Old hat for many, I'm sure, but for me it makes a big difference.