- Kristian Köhntopp writes about common MySQL performance problems with Rails. He shows some ignorance of Rails, but most of the issues he raises are important. Every database has its gotchas so at some level, database abstractions like ActiveRecord fall over. Fortunately, as long as you’re aware of the issues Kristian raises, you can work around most of them. Calling attention to Rails’ default of using large varchars and
select *by default is especially important. - Patrick Reagan’s caches_constants plugin looks like a nice implementation of the common Java pattern of type-safe enumerations backed by the database. That means you can use constants in your code and foreign keys in your database to refer to a set of objects. With Patrick’s plug in, these objects are only queried for once when your Rails app starts up.
- I thought the Ruby documentation for Object#instance_variable_set was pretty funny:
Sets the instance variable names by symbol to object, thereby frustrating the efforts of the class‘s author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call.
- If you’re wondering why you can’t get Bugzilla working with Apache 2.2, the answer is that they’ve changed the default permissions. Raditha Dissanayake has information on how to fix this.
- Finding the intersection of two date ranges is annoying, but it has a simple solution if you’re clever about it. Ryan Farley visualizes the problem, but “Dithermaster” realized it’s a lot simpler to find out if two ranges don’t overlap, and negate that. His solution is nicely usable in SQL.
- During Ostrava on Rails I had the pleasure of meeting (and drinking a pivo or three) with Robert Cigán, developer for Czech Rails development shop Skvělý.CZ. He sent in a link to Skvělý.CZ’s latest application, sMoney.eu an easy to use personal accounting app for EU users. Check it out if you’re in the EU!

Luke – thanks for the kind words. The plugin code was developed along with a recipe I submitted for the upcoming Advanced Rails Recipes book. A word of warning – caching constants from the database doesn’t play very well with the standard testing facilities available in Rails applications. I’m putting the finishing touches on some custom Rake tasks that fix this problem – I may end up extracting these into a more generic plugin in the future.
I’d appreciate any feedback you have.
I must correct little missunderstanding, sMoney.EU isn’t only for EU users, but is available worldwide.