Damon Clinkscales, of Austin on Rails fame, has created a one-day workshop to take your Rails skills from 0-60 in 8 hours. While this might be abysmally slow for a car, it’s a rocket sled for software engineering! I’ll be there, teaching about ActiveRecord and how to bend the database to your will. [...]
Entries Tagged as 'Rails'
Rails Bootup
June 30th, 2008 · No Comments
The MVC Song
June 4th, 2008 · No Comments
MVC Song by Laura Balch
The FiveRuns crew have been humming this ditty under our collective breath for the last two days. Kudos to Laura for an addictive little tune!
Tags: Rails
MySQL lock debugging
May 28th, 2008 · No Comments
I submitted my first Rails patch this weekend. We’ve been seeing occasional lock contention, timeout and deadlock in our mysql database but without SHOW INNODB STATUS at the time of the error, it’s difficult to track down the cause of the contention. So I added lock error logging to ActiveRecord’s MysqlAdapter class. [...]
Tags: Rails
ActiveRecord 2.1 Performance (Part 1)
May 3rd, 2008 · No Comments
I’ve been playing with the upcoming ActiveRecord 2.1 release in order to gauge any performance concerns. First let me explain the scenario being tested here: we load a lot of data into a database (both inserts and updates) so my testing mostly concerns optimizing bulk loading. This is definitely not the common case [...]
Tags: Rails
Java Developers moving to Ruby and Rails
February 15th, 2008 · No Comments
I’ve mentioned here in the past that I’m one example of the flow of career software developers from Java and .Net to Ruby. What I didn’t know is that DHH himself quoted my blog as a perfect example of this in his State of Rails 2005 presentation!
Wow, Check out slide 3.
Tuning ActiveRecord
February 6th, 2008 · 3 Comments
We’re in the process of building a very database-heavy system to store lots of metric data for our FiveRuns RM-Manage product. We looked at using tools like RRDTool and Berkeley DB but eventually came to the conclusion that a well-tuned mysql instance will work better for the flexibility and ease of maintenance we would [...]
Tags: Rails
Austin jumping on Rails
January 28th, 2008 · No Comments
Great article with an overview of Rails and how it is slowly changing software development. Obviously I’m one example of the “attracting developers to the latest, greatest framework” point they make in the article.
Austin jumping on Rails
ActiveSupport Dependency arcanery
January 16th, 2008 · No Comments
I was getting the following error when running some Ruby code and a Google search did not clarify what the problem was. ‘to_constant_name’: Anonymous modules have no name to be referenced by (ArgumentError)
Essentially the problem was dependency load order. The error was due to this line:
ActiveRecord::Base.send(:include, AttributeMapper)
The problem was that I had not required [...]
Tags: Rails
Performance and ActiveRecord::Base.establish_connection
January 7th, 2008 · No Comments
I’ve got a library which requires its own database so I’m using a shared superclass for my models which uses establish_connection to point to a different database than the default one used by ActiveRecord::Base.connection. The problem is performance. I’m inserting and updating a large amount of data in a single unit test method and finding [...]
Tags: Rails
Creating a counter_cache column
December 17th, 2007 · 4 Comments
A counter_cache provides a reasonable way to speed up code which faults in a collection just to get the size. In my experience, the most painful part is initializing the column with the first value. Traditionally the Rails blogs use Ruby code to iterate through every instance, calculating the value by performing an individual query [...]
Tags: Rails
