Programming Collective Intelligence (sample code)