some codes in Programming Collective Intelligence