codes from reading Programming Collective Intelligence