Programming Collective Intelligence:Building Smart Web 2.0 Applications