Read about:

Archive for July, 2009

A Rails Puzzler

(Programming)

While I refuse to call this “magic”, the following has been confusing me for a long time now and I’ve finally decided to post it to my blog and see if anyone else gets it.

It turns out that ActiveScaffold and YARD don’t play nice together. In particular, if YARD has previously been loaded (say, to define a Rake task for it), ActiveScaffold initialization will fail with the following error:

uninitialized constant Helpers::ControllerHelpers

Using --trace and following the source code, I find out that this is happening during ActiveScaffold’s initialization, particularly at this statement:

ActionController::Base.send(:include, ActiveScaffold::Helpers::ControllerHelpers)

Debugging the ActiveScaffold initialization code yields this baffling result:

>> ActiveScaffold::Helpers
=> Helpers
>> ActiveScaffold::Helpers::ControllerHelpers
NameError: uninitialized constant ActiveScaffold::Helpers

It’s the weirdest thing that I’ve seen since I became a Rubyist and it is blocking me from using YARD to generate the documentation for my current Rails project. Unfortunately, cutting out ActiveScaffold isn’t going to fly because the deadline for initial release is so close and so much functionality is implemented using it already. It wasn’t my choice; if I had my way, I might never use ActiveScaffold ever again.

On “Magical” Ruby and Rails

(Programming)

Giles Bowkett wrote a post which, at the surface, seems to be a harsh criticism of the way that Pythonistas and, in particular, Django developers view Ruby and Rails but is actually much more general — he simply wanted to point out that the entire notion of calling language/framework features “magic” is silly for programmers, who should prefer to be rational than superstitious.

Read the rest of this entry »

Future Ruby – Day 3

(Programming)

Sunday, July 12th, 2009

While the previous two days had already blown my mind, it seems as though the best had been saved for last.  The day’s talks started with Collin T. Miller giving us his thoughts on how we can move away from text as the primary way of encoding computer programs and move towards other encodings that more closely resemble the domains in which we are trying to solve computing problems. While I found his ideas interesting, I don’t think I can agree with his notion that text should be replaced as the primary encoding for programs. I think that text is an excellent way of representing computer programs: it is concise, easy to manipulate, and easy to parse.

FutureRuby – Days 1 & 2

(Programming)

Edit: In my haste to post my write-up of these first two days of the conference, I didn’t do much in the way of linking and I forgot to write about one of the coolest things that happened on Saturday, the flying robot blimp. Bear with me as I edit this post to add some much needed links and visuals.

Friday, July 10, 2009

After work, I walked over to the Metropolitan Hotel to get my badge. My kit included a schedule, a large poster, a crimson t-shirt with black Russian-propaganda style Future Ruby logo, a bottle of water, a pack of matches, a patch with the Future Ruby logo on it (for sewing on to backpacks and the like) and a TTC pass valid for the length of the convention. All of this was stuffed inside of a rugged, dark green bag with the Future Ruby patch sewn on it. This is by and far the best swag I’ve ever received at a conference, ever.

After that, I got dinner and headed down to Unspace HQ for a wicked awesome patio party. Unspace HQ seems like an incredible place to work — prime location, lots of outdoor space, and a pretty nice collection of knick knacks, including a working pinball machine — but it is also an excellent space for a party. The highlight of the night for me was seeing two CF18’s doing a fly-by. Although I’m not a huge fan of military hardware, watching the way that they turned through the air was a unique experience.

I went home early to give myself enough time to commute home and get at least 5-6 hours of sleep for the next day.

GitHub Project Watch – 09/07/08

(Programming)

I’ve decided to create a new series of posts called “GitHub Project Watch” to highlight some of the projects on GitHub that I am watching. It’s kind of like GitHub Rebase, but with my own personal touch.

Here are some of the projects that I’m watching this week:

  • jmettraux/ruote: an open source workflow engine built with Ruby. I might be using this for a project I’m working on. Also see jmettraux/ruote-web2 for a demonstration of how to integrate ruote with Ruby on Rails.
  • brynary/webrat: automated acceptance testing with Ruby. It can simulate a simple browser on its own or drive a real browser via Selenium. Apparently there’s some work in progress on integrating with Watir and Celerity as well.
  • radiant/radiant: RadiantCMS, the lightweight web content management system for Ruby on Rails. I’m contributing a Japanese translation, the current version of which is currently available in the official i18n branch. (also see kbingman/radiant and enricob/radiant)
  • chriseppstein/compass: As I wrote previously, Compass is gaining new features at an incredible rate. It now sports improved Rails integration, Blueprint 0.9, an extension system, and asset hosts support. As an added bonus, it no longer depends on edge Haml; it will work with the newest stable release of Haml, 2.2.0. This is one of the most watched repositories on GitHub for a reason — if you’re not already using this, try it today!

I’m sure that I will hear of even more awesome projects at Future Ruby.

Compass: Still going on strong

(Programming, Web Design)

It’s no secret now that Compass is one of my favourite Ruby technologies. I wrote about it in great length on Tenthline’s blog and I spoke about it with Anita Kuno at Ruby Job Fair. It’s simply one of the best web design tools I’ve ever used, bar none. It offers all of the benefits of using CSS frameworks while allowing you to stay in control of your markup.

Future Ruby

(Programming)

Last year, I attended my first computing conference ever: RubyFringe. It was really more of an “un-conference”, organized by everybody’s favourite Toronto Ruby shop, Unspace.

The whole experience was fantastic. Giles Bowkett kept us in our seats past lunch with his thought-provoking presentation which mixed his slick Ruby MIDI generator, Archaeopteryx, with a call to action so moving that we could not help rising from our seats to give him a standing ovation. Nick Sieger threw us a curveball with a presentation on the history of jazz music and how it relates to programming. RubyFringe was a weekend to remember for everybody involved.

So, I was incredibly excited when Pete Forde and Meghann Millard announced that they would be running another Ruby conference in Toronto: Future Ruby. It’s not quite meant to be a RubyFringe sequel; really, something as uniquely awesome as RubyFringe will never be replicated again. But in any case I bought my ticket almost the very moment they went on sale.

Future Ruby will be next week and I will be there.  Hope to see you there too!