12

Sometimes, when browsing a user's profile page, I see, instead of the Badges section:

This user has not earned any rare badges

And also some badges do not show up in rarest badges despite space for them.

This can happen even if they have earned bronze badges such as Editor.

What badges count as "rare" for this? Why does it not show them at the bottom of the Profile page?

Update: Found an example…

4
  • I wonder if it's site specific... on M&TV users with no badges have "This user has not earned any badges"... and users with bronze only don't have any text in that area. Also, confirming you mean on the profile page, not the activity page? On M&TV, there's no message at all on the profile page if the user has no badges. The message I see is on the Activity page.
    – Catija
    Commented Nov 19, 2016 at 0:06
  • 2
    It… seems to have stopped working (for me at least). I swear it was before. See this Google search.
    – Nissa
    Commented Nov 19, 2016 at 0:27
  • Related: meta.stackexchange.com/questions/269823/… Commented Nov 19, 2016 at 2:22
  • Just ran into this today, for a profile which only has the Student badge as of right now: i.sstatic.net/9eVzF.png
    – bobble
    Commented Aug 5, 2021 at 22:30

1 Answer 1

12
+350

It has been some time since this question as originally asked, but the logic has remained the same. It might be more accurate to think of this section as "my badges, ranked by rarity" instead of "my rare badges". Currently, the logic is as follows:

  1. Get all of the user's badges
  2. Rank each badge based on the total number awarded across the site
    • Note: These rankings are per-site, not across the network
    • The lower the overall badge award count, the more rare the badge is
  3. For each class of badge (gold, silver, bronze), take the top rarest badges
    • If a badge appears in multiple classes, it is only shown for the rarer class
    • e.g. badge XYZ exists in both gold and silver variants, it'll only show in the gold rare badge
    • If a badge is earned multiple times, then it is only shown once
9
  • 3
    When you say in point 3., "take the top rarest badges", is there a specific number of them that are taken? Because, it seems that even if you've earned some badges, those may not appear listed as rare badges. Commented Oct 27, 2021 at 8:01
  • 3
    @TheAmplitwist Looking at the code, we take the top 9 from each class, then filter out the dups and take the top 3 from there. The user in the screenshot in the comment you linked to doesn't have any badges on MSE, so the rare badges not showing at all is correct.
    – Ben Kelly StaffMod
    Commented Oct 27, 2021 at 15:24
  • @BenKelly so if an user’s 9 rarest bronze badges are all duplicates nothing will show up in that box? Commented Oct 29, 2021 at 14:13
  • 1
    @EkadhSingh-ReinstateMonica Yes, that is the case, but it should be pretty rare. It'll only be considered a "duplicate" if it matches one of the higher tier that is being shown. So if you have "gold badge1", but it isn't being shown due to three other gold badges being more rare, it'll still show as "silver badge1".
    – Ben Kelly StaffMod
    Commented Nov 1, 2021 at 14:17
  • @BenKelly thanks for the explanation. If I’m understanding the third point correctly, it would mean that a user with both the “Marshal” (500 helpful flags) and “Deputy” (80 helpful flags) badges, only one would show up, but that isn’t the case. Am I misunderstanding, or is this a bug? Commented Nov 1, 2021 at 14:33
  • 2
    @EkadhSingh-ReinstateMonica Those are different badges, so they'll both show. Looking at the list of badges to find an example, I'm starting to think this code might not actually do anything in practice since we don't seem to have any badges that you can earn in two different classes. For instance, if we offered e.g. "yearling" in bronze for years one through four, then silver for year five (we do not do this afaik, but imagine with me here), then we'd only show the silver copy. I wonder what exactly this logic is (was?) used for...
    – Ben Kelly StaffMod
    Commented Nov 1, 2021 at 14:49
  • 1
    Ben, one example: One dual group badge is "Reviewer (old)": "Proposed at two levels: silver at 1000 reviews/300 actions and bronze at 300/60. ...." - anytime a badge is changed it can exist (have been earned) in either group; tag badges with the same name as a non-tag badge can also be in any of the three groups. --- A few sites have unique badges not available on most sites, and a history that needs to be researched before determining that the code doesn't catch any historical case (and the user has neither earned or lost the other group)
    – Rob
    Commented Nov 1, 2021 at 18:27
  • 2
    @Rob Thanks for the info! The network is so vast and has so much history that I feel like I'm always learning something new. I don't have any plans on removing the de-duplication code. It's actually pretty succinct, localized and relatively optimized, so I don't see any harm in keeping it.
    – Ben Kelly StaffMod
    Commented Nov 1, 2021 at 18:43
  • 1
    Another fly for the ointment: meta.stackexchange.com/q/122458/282094 and meta.stackexchange.com/q/311670/282094 - current and historical merging code - it's possible to merge accounts with old badges and for a new badge to be calculated when the script runs. --- Not saying what's correct or wrong, just noting that "what is the behavior that is supposed to be presented" on that portion of the profile. --- If it's not broke, don't fix it. 😀
    – Rob
    Commented Nov 1, 2021 at 18:56

You must log in to answer this question.

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