Freitag, November 18, 2005

What's smart?

Today's Dilbert is nice. :-)

Freitag, November 11, 2005

Ruby rocks

First, let me show some code:
require 'magic'

a = Person.new
a.first_name = "Daniel"
a.last_name = "Mitterdorfer"

puts "My name is #{a.first_name} #{a.last_name}."

Well, that's not that interesting, but what if I tell you that I have not defined #first_name and #last_name? To be honest, there is even no definition of Person at all.

How does it work? The code that makes this example work is in magic.rb. It utilizes Module#contant_missing to define a proxy for missing classes and Proxy#method_missing for the dynamic definition of methods. Unfortunately, magic.rb is, - hmm - let's say 'quite in progress' and not very sophisticated yet. However, with a more sophisticated version of magic.rb I could probably write a DSL for the insertion of arbitrary records into a database or an O/R mapping layer that does not need any classes. Stay tuned.

iTunes rant

Ever wanted to upload your (Swedish) course to your iPod? Well, could be time-consuming to copy more than 2.600 files to your iPod with iTunes. I had no time so far to figure out what's going on but the upload is definitely too slow yet.

Dienstag, November 01, 2005

Thanks Oracle

Recently, Oracle released an 'Express' version (Beta) of their database 10g for free. Maybe I'll give their 10g Express a try.