2006-01-06 1029 Lifestuff: == Paperclipping across the universe == http://home.greywulf.uk.to/images/paperclip_red.jpg I spent . . .

Paperclipping across the universe

I spent a fair chunk o’ yesterday coding in Ruby on Rails just to see how fun it is. Yeh, I’m geeky like that. Live with it :)

It started with a guy called Kyle. He had this idea of trading One Red Paperclip for something – anything – then carrying on all the way up to getting a house. He’s well on the way, too. The current offer is a trip to Yahk, British Colombia, and the offers he’s getting for it are quite amazing. Sometime in 2006, I’m pretty sure he’ll get his house.

Anyhow. A few days ago he posted up his next (but related) idea. One Red Paperclip, mark 2 – a site where anyone can go and create their own trade-chains. Folks could see what’s up for trade, make an offer, comment and generally join in the whole funky One Red Paperclip experience.

As an idea, it’s simple. Perfect, simple, immediately obvious and downright fun. I had to have a go.

Paperclippr is my humble attempt. I’d say that as a site it’s around 70% complete. Folks can sign up, put items up for trade, make offers and trade. There’s even an RSS feed of the latest items, which is nice. What’s missing is the last part. I need to write in the last bit of code that completes the trade, closes off the item and (optionally) creates the new trade item ready for the whole cycle to start over again. Oh, and there’s the sidebar to finish too, but that should be pretty straightforward.

What I found out though is that Ruby on Rails is fun to work with. It’s got a few ideosyncracies, especially when it comes to naming conventions for variables, database fields and arrays. Nothing too difficult though, and it does make the code very easy to read. First time I’ve used a language that understands plurals for variable names. Sheesh.

Overall though, Rails gets a thumbs up. Expect more Rails coding from me in future.

Update: The sidebar is done, and looks ok.

Session permissions are a pain in Ruby on Rails. If someone isn’t logged in, it’s a NULL session_id, and rubdy barfs badly on anything that’s NULL. So, you have to check for it. Everywhere. Why oh why it wan’t just silently log-and-continue (or just generate a warning) I’ll never know. But ah well, it’s easy to code around.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.