Programming  Collective Intelligence