Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
How long does it take for badges to be awarded? How are they generated?

How do badges work, in terms of implementation and database structure? For example, how are the badges implemented in the database, and how does the algorithm know which badge to choose from when there can be a duplication of steps in order to get one of badges?

share|improve this question

migrated from Feb 7 '10 at 16:17

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Pops, AakashM, Toon Krijthe, jonsca, animuson Sep 21 '12 at 23:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Elves. It's all done by elves. The DB just records which badges the elves have conferred on which users.

share|improve this answer
Are the elves riding on unicorns and eating waffles? That would be awesome! – Donal Fellows May 3 '10 at 22:35

Screen 1 Screen 2 Then we have some queries to figure out who should get what. It's similar to the multi-use combinatorics problem

share|improve this answer
I can only upvote this after you have proven this is real. Give me a gold badge, and I believe you. – balpha Feb 7 '10 at 16:53
Awesome, thanks! +1 from me now -- although populist would have been enough :) – balpha Feb 7 '10 at 17:02
When would it be necessary to manually award someone a badge? Under what circumstances would the daily queries miss something? – Ether Feb 7 '10 at 17:44
@Ether: You might want to follow Tom's link about the multi-use combinatorics problem. – balpha Feb 7 '10 at 18:56
I don't believe this is true. As if there'd be a 'Be Careful!' warning. – glasnt Feb 7 '10 at 23:08
@balpha: links, schminks. – Ether Feb 8 '10 at 1:41

Each badge is going to have it's own set process.

For example, the "Tumbleweed" badge doesn't need to run a schedule more often than once daily.

But the "Good Answer" badge could easily be event-driven.

The real answer is: it depends.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .