Couloir.org | Altitude Slickness

Flickr off Rails

{ 28 Jan 2007 }

I have to take a moment to vent because I’ve had quite a frustrating evening. You see, after getting inspired by the famous Putting Flickr on Rails demo, I set out to investigate the FlickrAPI. Not long after I had installed the flickr.rb gem, however, I hit my first hurdle. I’m sure everyone out there knows this, but flickr.rb has long since stopped working. Like a dead cell phone they keep selling at the Verizon store, flickr.rb is no more. There are patches and workarounds, but it gets messy fast.

But wait, did you say “flickr.rb”? Perhaps you meant rflickr instead? But of course—why would I be wasting my time trying to leverage such outdated code when something so shiny and new was available? Sorry, I should have known better.

And yet, where is the documentation for rflickr? To say it’s thin is to say giraffes are tall. It doesn’t exist. And when you realize the hoops through which you have to jump just to authenticate with Flickr properly, it just gets more daunting.

All of which is to say I’m frustrated by the frequency with which Ruby code is generated and quickly discarded by the community, the lack of care put into documentation in general, and generally speaking how much less reliable external libraries like these seem in the Ruby world when you compare them to what exists for plain vanilla PHP. Ruby developers—you surely can do better. It’s not enough to stop at Rails and call it a day.

Updated: Hopefully this tutorial on Flickr authentication will prove helpful to some… But you’ll definitely need to leverage Google’s code cache for the original zip file and the very sparse documentation for rflickr.

Posted in: flickr, rails
Hierarchy: previous, next

Comments

There are 6 comments on this post.

RoQ | posted on 12 Feb 2007 at 07:34 AM

Hi Scout, I´m a follower of ypur work and of Couloir, I juast want to say that your designs are beste of the web and you js slideshow is the awesomeness materialized.
Nice that you have comments now

Jeff | posted on 26 Feb 2007 at 02:03 AM

Having spent the last few hours jumping through the many hoops necessary to get Flickr going on Rails, I certainly appreciate your perspective.

And I thank you—your post pointed me away from flickr.rb and toward rflickr.rb, which actually works.

Having worked with PHP for a few years before diving into RoR over the past year, I do miss the user-friendly, example-rich documentation that is so plentiful in the PHP world. But I don’t think our RoR peers intend to be discourteous. Some people really prefer API’s docs over user guides.

I would posit that one reason for flickr.rb’s demise is that the constraints that Flickr added to the API in general and the authentication scheme in particular just made the process of accessing Flickr a bit of a drag.

rflickr is a bit rough about the edges—you get access to the Flickr API with very little Ruby-esque syntactic sugar. But it works if you are patient enough to wade through authentication at the command prompt. And because it adheres so closely to the Flickr API, one could argue that the need for additional documentation is diminshed.

The rflickr source can be found at rubyforge and there are discussions there that provide insight into the developer’s perspective on the project. One thread in particular clarified for me how rflickr was designed and alerted me to some of its pitfalls—namely the lack of syntactic sugar and shortcuts.

It is ironic that the QuickTime movies touting RoR make it appear so much easier to learn and to use than it is. But I do think, in the long run, RoR is worth the investment in time that it requires.

Jonathan Barket | posted on 27 Feb 2007 at 09:55 AM

Hey Scott,

I ran into a similar problem a while back. I actually manged to get flickr.rb working, but it is unbelievably slow, and unfortunately so is rflickr.

I’m not sure how complex your application needs to be, but you might take a look at miniFlickr (http://www.railsweenie.com/forums/2/topics/904).

It’s very simple… you hit Flickr, and get back the raw output… but I’ve used it to create a couple of simple sites (dellostritto.com for example), and it’s worked wonders for me.

Anyway, just ran across your site looking around at other people using SimpleLog. Keep up the good work.

SU | posted on 27 Feb 2007 at 09:10 PM

Thanks for the comments, everyone. I haven’t stopped programming Ruby, but I ended up taking the project I was working on in a different direction because I feared a Rails-specific solution wouldn’t reach a wide enough audience in a world where PHP still dominates. I’ll hopefully have something to demo soon.

Jason | posted on 15 Jun 2007 at 01:27 PM

Spent an hour or two trying to debug the “Putting Flickr on Rails” demo. There should at the very least be a date on the demos that would give users a hint that maybe the demo is outdated and is no longer valid. Big waste of time.

paUL | posted on 17 Jul 2007 at 02:56 AM

yes i took hours trying to get flickr demo working,
I think for new demo its way to complex + it does not work at all.
php is much easier to learn