How to implement a reputation based system with badges in Drupal similar to StackExchange sites? Earning badges on StackExchange is, well, fun. But aside from that it promotes quality interaction from users and helps weed out spam (I have never seen a spam post on the site).

I have a community website with about 500 active users, but the spammers are starting to become more prolific.

I would like a way to make the site more engaging while promoting the same quality of interactivity.

How would you recommend to put in a good reputation system, as well as a goal achievement system?
There's the User Points module and the User Badges module, though the 7.x version of User Badges is not suitable for production yet (as of June 4, 2012).

Thankfully, User Points integrates with the Rules module, which allows you to greatly customize the ways users gain (or possibly lose) points.

There's also a collection of contributed modules for userpoints of varying stability.  You can certainly set up some amazing stuff with these modules, but make sure to carefully test your implementation-- though the modules are well written and fairly stable, there's still a lot that can go wrong so make sure to verify everything works properly.