How to Avoid Hanging Yourself with Rails

12 February, 2008

The law of unintended consequences. Evidently people are searching on figuring out how to leave this earth in Google and getting to this page because of the title with alarming regularity. If you're one of these people PLEASE see a psychiatrist, talk to someone you love, take a deep breath, realise that you've got your whole life ahead of you, whatever it takes. This evening I presented at the monthly TSOT Toronto Rails Project Nite. As promised here's the presentation and links to resources mentioned. Big thanks to TSOT, everyone who came, everyone else who presented and the spirit in the T. Ruby/Rails community. Presentation - How to Avoid Hanging Yourself with Rails Faker - faker.rubyforge.org 'mrj's ActiveRecord select/include patch - http://dev.rubyonrails.org/attachment/ticket/7147/init.5.rb include preloading optimisation - http://blog.codefront.net/2008/01/30/living-on-the-edge-of-rails-5-better-eager-loading-and-more/ Some points following on from this: - YMMV, times were produced using a consistent dataset, results are going to be all over the place dependent on columns, table size, indexes, ordering etc etc. - By testing with real (/faked) data, you can avoid (to some degree) the premature optimisation problem, you'll see what your app is going to perform like closer to a real world production environment. - Word on the street is Datamapper + Merb is wickedly fast, I'm going to run a test with the same dataset just to see what the difference is like - There were no MySQL optimisations preformed, just a vanilla MySQL install. - I'm not being negative on the core team about the select/include problem, it's a hard problem to fix, I'm just making people aware of it so you can save the banging-of-head-on-desk problem others of us have suffered. - If the presentation bored you to tears, you know it all already, live in Toronto, and are bored in your job - we may have a position for you. Talk to me... If you're in T. make sure you get yourself along to the Rails pub and Rails project nites, well worth it for networking and learning respectively. I hope to see every developer in T. putting forward a presentation on their projects, by collaborating and sharing we all learn immensely. Personally I've found every presentation exceedingly interesting - keep it up !

Read More

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.