Archive for December, 2007
RailsConf Talk Proposal
Tuesday, December 18th, 2007This year I went to RailsConf in Portland Oregon and had a good time, but the whole time I was there I thought I should be doing my own dang presentation. So I submitted a proposal for the upcoming RailsConf 2008. For the curious, here is the proposal. Hopefully they’ll bite, because I think everyone walked away from RailsConf 2007 wishing there were more in-depth technical topics discussed.
HyperExtending ActiveRecord Internals
Description
While ActiveRecord gives us so much power right out of the box, it doesn’t have to stop where the Rails core team leaves off. This set of code walkthroughs will explore several production-tested techniques for extending the internal machinery of ActiveRecord to allow richer dynamic finders, scope conditions, association proxies, access-control, and more. Guaranteed to give you real super powers.
Session type: 45 minute conference session
Abstract
I love ActiveRecord. Its an extremely handy set of code that does a lot for me and I’m grateful for it every day. However, as a developer, whenever I get a taste of a good thing, it just makes me hungry for more. What if I could represent associations in my finder conditions? I could get a list of all Customers who had Purchases from the Chicago store with simple finders:
Customer.find(:all,:conditions=>{:purchases=>{:store=>‘Chicago’}})
Customer.find_all_by_purchases_having_store(‘Chicago’)
What if I could declare scopes and chain them together to filter my finder results? I could define a scope using an association between users and their sessions, call it ‘logged_in’, and use it as a filter on an association proxy to find all my friends who are currently logged in:
@user.friends.logged_in.find(:all)
What if I could leverage the elegant combinatorial power of symbolic expressions to represent conditions without the need for embedded SQL in strings? What if I could automatically limit the records retrieved based on a User’s rights? What if I could build a has_many :through that bridged another has_many :through?
I’ll cover how to do all of these using source code walkthroughs and impart some advice and techniques for writing your own ActiveRecord extensions along the way.
Looking forward to the Holiday week
Tuesday, December 18th, 2007I’m taking a week off work during the holidays to spend time with my dog, friends, family, and fiance. I might also do something fun with Ruby or Lisp. Mostly though I wont be working which is the best bit.
I started today in a great mood
Tuesday, December 18th, 2007But now I’m kind of bored and lackluster, and I think its from looking at ugly code. I don’t necessarily mean “poorly written” but I do mean “ugly” as in “not enjoyable to look at.” I think prettiness/ugliness can really make a difference when it comes to code.
Blogged with Flock
links for 2007-12-15
Saturday, December 15th, 2007-
glossy.js 1.4 allows you to add corners (and also shading and shadow) to images on your webpages through unobtrusive javascript
links for 2007-12-14
Friday, December 14th, 2007-
A survey of toolkits for Ruby that allow developers to create video games without a lot of graphics code.
-
Cool idea — using quicksilver to set your away message as well as twitter status…
Blogging with Flock
Thursday, December 13th, 2007I haven’t been blogging much this year, mostly because work has been so taxing and I have very little time in front of my computer to post anything. I’m actually just testing the new version of the Flock web-browser that has an integrated blogging client to see if it does a good job not ruining my posts with markup and also if it is easy to use.
If so, then this might be the first of many posts. If not, I will probably trash this site and start all over like I usually do.
Blogged with Flock