Kevin Finlayson website
I swear this will be updated soon. Find me at work, or write me right here.
You can read my mind grapes or see my tweets.
Friday
Nov 28, 2008
05:01 PM
Garden of Contentment
Today I’ve been captivated by an article published in the New Yorker by food writer and Chinese cuisine specialist Fuschia Dunlop. Letters from China: Garden of Contentment is the story of Dragon Well Manor, a restaurant in Hangzhou that strives to keep alive ancient cuisinary techniques of the region, sourcing ingredients not just from local farms and collectors, but from expeditions through the forests and mountains of the region as well.
Just as captivating are the descriptions of the restaurant, which was originally a traditional landscaped garden in one of China’s most spectacular natural regions.
Thursday
Nov 06, 2008
12:16 AM
Cafe Myriade
Earlier today I came across mention of a new espresso place in Downtown Montreal called Cafe Myriade. Oddly enough, it was on another developer’s blog, James Golick, who’s even more of a coffee nerd than me, it seems.
The staff at Myriade is genuinely friendly and excited about their new venture. The espresso I ordered – a single shot made with coffee from Vancouver’s 49th Parallel – was among the best I’ve had in recent memory, incredibly velvety, with as little bitterness as I’ve had with these beans. Remarkably even and enjoyable, especially if you like woody/chocolatey espresso.
Myriade also sells SOMA chocolate, imported from the Toronto chocolatier, one of only two in Canada that make their own chocolate, apparently. I really like that this shop is supporting Canadian providers, and at really reasonable prices ($2 for a single shot of espresso, for instance). Apparently the lattes and melted chocolate cappuccinos are Myriade’s specialty.
So check it out: Cafe Myriade located at 1432 Mackay, Downtown Montreal, between Ste-Catherine and DeMaisonneueve.
Friday
Aug 29, 2008
12:37 AM
Edit/Update Paperclip Plugin Attachments
So I’ve discovered the wonderfully easy-to-use Paperclip attachment plugin for Ruby on Rails, written by Jon Yurek at Thoughbot .
I like that attachments are treated like any other class instance attribute (@post.image), instead of having to be associated with a post from a separate assets resource entirely. It uses Imagemagick, it has a small footprint, many of the features that make attachment_fu great, and others that it lacks.
When I started playing around with Paperclip, I noticed that there are some RESTful actions missing in the documentation: destroy, edit, update, and so on. That same documention intimates that you should/can have an upload form on your edit page, so I persevered – it would really be ideal if users could simply upload new images and documents, overwriting existing ones.
When I got to this point, I did what anyone would do: wrote out the actions based on the generated scaffolding patterns, hoping it would ‘just work’. I had a post model with attachments for an image and also a sample text. Not only do I want users to be able to swap these out, but to update other columns in the class instance without losing the existing files attached to the record.
When I went ahead a tested the configuration I’d cobbled together, it wasn’t working correctly. It didn’t update, it created a new record, with the existing values, which was…not ideal.
Evaluating the form_for tag, I noticed that the tag I’d copied in from the RiDocs was using was a little unusual:
<% form_for :post, @post, :url => posts_path, :html => { :multipart => true } do |f| %>
The tutorials online only require the symbol for the class and the multipart => true bits. Not only that, but knowing how RESTful conventions work, that :url => posts_path is an obvious problem: when you’re working with a class instance, your paths should be singular.
Changing it to singular (:url => post_path) didn’t work – suddenly I was getting an error stating that the ID of the object wasn’t an action! Well, obviously. So I needed to explicitly state the action:
<% form_for :post, @post, :url => post_path, :action => 'update', :html => { :multipart => true} do |f| %>
But this didn’t work either! The update parameter was either being overlooked or wasn’t providing the correct parameters in the expected format. Finally, researching the available parameters for the form_for tag, I came up with this:
<% form_for :post, @post, :url => post_path, :html => { :multipart => true, :method => :put } do |f| %>
Which explicitly states the http method used in the transaction. This works beautifully! File attachments remain the same unless you’ve selected new ones, it works for multiple simultaneous attachments on a model…it’s gorgeous. I hope this helps, I couldn’t find much info on edit/update features for Paperclip.
Friday
Aug 08, 2008
01:30 PM
Beijing 2008 Opening Ceremony

The Big Picture has posted yet another fantastic photo essay on the opening ceremonies of the Beijing 2008 Olympic Games.
I’d really like to see some video of Cai Guo-Qiang’s fireworks and gunpowder show (of which I’m assuming the above photo is a highlight).
Saturday
Jul 05, 2008
01:02 PM
Welcome Kees Alfred

Longtime Dust and Mold client Andrea Vanderkooij and her husband Alan Groombridge welcomed Kees Alfred Vanderkooij-Groombridge into their family on Sunday, June 30. Kees Alfred is a large, healthy and happy baby (9.5 lbs, 22.5 inches), possibly with an early taste for butter-cream icing, as a result of his mother’s recent Babycakes project and performance, which you can check out at the artist’s website
Congratulations Andrea and Alan!