Programming Collective Intelligence examples, in Ruby and with tests