Archive for January, 2006

Rails Migration Class

I was just poking around in ActiveRecord::Migration. It’s a slick little class:

1
2
3
4
5
6
7
8
9
10
11
12
class Migration
  class << self
    def up() end
    def down() end

    private
      def method_missing(method, *arguments, &block)
        arguments[0] = Migrator.proper_table_name(arguments.first) unless arguments.empty?
        ActiveRecord::Base.connection.send(method, *arguments, &block)
      end
  end
end

What I find so cool about it is that it just uses method\_missing and send to send along the method to ActiveRecord::Base.connection rather than mixing in or subclassing.

Advertisements

Ajaxified Kayak

If you haven’t used kayak.com to book a flight, hotel, car, etc yet, then you’ll want to check it out. It’s a heavily ajaxified aggregator in a really nice UI that uses a lot of AJAX and DHTML to give a great experience. It works better in Firefox than Safari at the moment.

A Conversation with Alan Kay

A Conversation with Alan Kay, who is always worth reading. I like this quote from the interview:

If you look at software today, through the lens of the history of engineering, it’s certainly engineering of a sort—but it’s the kind of engineering that people without the concept of the arch did. Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.

This might be my favorite quote from the whole interview:

Even if you’re designing for professional programmers, in the end your programming language is basically a user-interface design. You will get much better results regardless of what you’re trying to do if you think of it as a user-interface design.


Pages

Categories

Copyright ©2008-2013 James E Orchard-Hays, All Rights Reserved