TrueBadges TrueBadges

I've worked on this website since beginning of 2014 in my spare time. The initial goal was to have fun with lot of data.

The idea is to count StackExchange badges of an user in the same way as TrueAchievements does. This project has no practical use, you can view it as a fun website in order to have an overview of the efforts you put in StackExchange websites.


TrueAchievements (TA)

TrueAchievements is a website dedicated to Xbox and Windows games' achievements. Achievements are rewards given to players for realizing specific actions (complete a game, win 20 rounds in online game, etc.). Each achievement is associated with a score from 0 to 300 (or more). The idea behind TrueAchievements is that the score can be corrected by the percentage of players having unlocked an achievement compared to the numbers of players who own a game. For example, it's easier to get 5 points by starting the game GTA IV than meeting all the random characters. So the first achievement is worth 5 TA score and the second one is worth 13 TA score.

StackExchange Badges (SEB)

Badges are very similar to achievements, but they are only associated to bronze, silver or gold rank, they have no value in points.


I want to use the same calculation in order to calculate a score based on the SEB earned by an user in all of the StackExchange websites. Note that this score is different from the reputation, even if the two scores are more or less correlated (eg. good answers give reputation and badges).

The value of each badge is calculated from the number of times a badge has been earned divided by the number of times the most earned badge has been earner. In other words, the rarest badges will be worth more points. The formula is still not perfect, I have to decide if I should cap score of each badge. Some badges are awarded only once, their value can be huge.

For each site, the website (TrueBadges) need to grab all the badges and the number of times they are awarded. Then the score of each badge can be calculated. Edit: the formula has been designed with the help of Mathematics (Stack Exchange).

Once a user register to TrueBadges (the only required data is the id of the user on StackExchange), the website has to make several requests:

  1. Get the websites where the user logged in (StackOverflow, Arqade, etc.)
  2. Get all the badges from the user on each site
  3. Calculate the score for each badge of the user (a badge can be earned multiple times, so the value of a badge can be multiplied)
  4. Calculate the score for each site
  5. Calculate the total score of the user


I use Symfony2 (a PHP framework) and Doctrine2 (an abstraction layer for MySQL).

Here is the current database schema:

MySQL schema


The website is online since beginning of 2014. Registration is opened and takes less than a minute.

1 Answer 1


I am confused. Is that site each has a different id, there is no stackexchange id as such. Each site has its own id. That is, ids for stackoverflow.com, stackapps.com and diy.stackexchange are all different.

  • “there is no stackexchange id as such” could you please explain further or add an example? Commented Jun 19, 2023 at 11:07
  • 1
    You can access it by clicking your user icon at stackexchange.com, I just had a look and yours is 6128339
    – PeterJ
    Commented Jul 25, 2023 at 5:46

You must log in to answer this question.

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