Unicode in Rails

I’m really happy to see that Thijs has just pointed out that the unicode_hacks plugin is undergoing further development:

We’re almost ready with a new version of Julik’s ‘Unicode Hacks’ that’s now called ‘ActiveSupport::Multibyte’. You can find more information and code on the ‘Multibyte for Rails’ project site.

I’m particularly pleased to see that: “We hope to get ActiveSupport::Multibyte accepted as a new core extension in the 1.2 release of Ruby on Rails”. That would be a real boon. Check out the FAQ too.


RailsConf Day 2

Urgh, I’ve spent most of the weekend recovering from a cold and lack of sleep, so I’m finally at a point where I can write up the final day of the conference. In the meantime, I noticed that DHH has a great railsconf writeup, which covers many of the things I saw.

In the morning, Jim Weirich kicked off with a talk about how to write good libraries in Ruby. He pointed out that there a lot of really bad libraries out there that do hideous things and have weird side effects. Monkey-patching is OK, in an application, but in a library, you really have to keep control of yourself (“sufficiently encapsulated magic” as I once heard schwern call it). He presented some good advice, but most of it was really kind of obvious if you’ve worked in any dynamic languages before. I did get the impression that there were a lot of Java converts in the audience, for whom this might not have been so obvious.

As a side note, Tom showed me how to use Quartz Composer in the end of that talk. That’s a heck of a cool toy. I must play more.

Next up was why the lucky stiff. It was nearly James Duncan Davidson, as _why was a little conspicuous by his absence. But he showed up on time, and went on to talk about a number of things. Watching a talk by by _why is more like being at the theatre than a lecture. It’s hugely entertaining. If I said that he talked about how to use the * operator (splat), and his lovely sandbox library, it might sound dry. This would be to ignore the contributions of the Dragons, Foxes, Owls and huge cast of characters that assisted him on his journey.

After this, the main talks started. I went to see Rany Keddo talk about “How I turned my Bank job into a rails playground”. His answer: lie, steal, cheat. It seemed to have worked well for him though. The best bit had to be his picture of Gollum labelled as “DBA”. 🙂

After lunch, I went into Sean O’Halpin’s talk, “RoR against the Machine”. But I’ll admit that I wasn’t paying much attention; I was too busy working on my own talk. Which is a shame, as it sounded really interesting. The notion of having Virtual Machines as “MS Office Servers” sounded like a really cool hack.

I did manage to catch the very end of Hampton Catlin on “HAML: Naughty Boys Need Structure”. HAML is an alternative approach to writing pages which aims to sit between the extremes of XML::Builder, which is just code and erb which is interpolated markup. I’m not sure I agree with it, but it’s an interesting experiment.

After my talk, we all filtered into the main hall to hear James Duncan Davidson. His talk was entitled “The Web is a Pipe”. He was talking about how using HTTP as a substrate for integrating web applications is the way to go. Having used FastCGI, I really, really agree with him. Doubtless there are some times when you’ll hit performance issues, but it’s certainly a very sensible default.

The final talk was given by Dave Thomas. This was the most unexpected talk of the conference, and it completely blew me away. He started out talking about terrorism, apropos of the 5 year anniversary of 9/11. This seemed to shock most of the audience (although he didn’t say anything revolutionary—much of it was very reminiscent of Bruce Schneier). But he veered around to talking about risk. And from there to talking about Rails and FUD. And how to deal with it. He dissected several of the common tactics that are used to diss Rails. But, he emphasised, he’s not saying Rails mustn’t be criticised. Just that he wants valid criticism, not straw men. This was one of the best talks of the conference for me.

After the conference, we gradually filtered out towards a rather lovely curry in Soho…