# Ordering for next tag badge options

I wonder how the "next badge" options for tag badges are sorted. In the screen shot below, the tag is recommended, and shown first, even though I'm closer to getting the badge:

I need write another 3 x 9 answers for , expecting the same number of votes, to get that badge, whereas I need to write almost 4 x 12 answers for , again expecting the same number of votes, to get the that badge.

This means: I need 3x what I have for , but almost 4x what I have for . I am much closer to the badge.

A correct algorithm to see how far along you are for each tag would be:

``````min(p_score, p_answers)
``````

This accounts for the fact that both bars need to be filled in, the slower one to be filled in is the one that determines how long it will take to get the badge.

I suspect that what currently is used is:

``````( p_score + p_answers ) / 2
``````

This latter leads to the numbers:

``````( 21/100 + 12/20) / 2 = 0.4050
( 25/100 +  9/20) / 2 = 0.3500
( 17/100 +  9/20) / 2 = 0.3100
( 21/100 +  7/20) / 2 = 0.2800
(104/400 + 23/80) / 2 = 0.2737
( 22/100 +  4/20) / 2 = 0.2100
``````

which is consistent with the order they are shown in. Using the `min` method you get a different view:

``````min( 21/100, 12/20) = 0.2100
min( 25/100,  9/20) = 0.2500
min( 17/100,  9/20) = 0.1700
min( 21/100,  7/20) = 0.2100
min(104/400, 23/80) = 0.2600
min( 22/100,  4/20) = 0.2000
``````

Now we see that actually I'm likely to first get the silver C++ badge, then the bronze algorithm badge, and I'm as far ahead in the C++11 tag as in the MATLAB tag.