January 6, 2006
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.
1 Comment |
Home |
Permalink
Posted by jamieorc
January 1, 2006
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.
Leave a Comment » |
Home |
Permalink
Posted by jamieorc