sample code of <Programming Collective Intelligence>