I just noticed that when you sort questions by votes, the questions with the same amount of votes are not ordered randomly.

I am not saying that this is bad or wrong, I just want to know what is the criteria to put one above the other(s)?

Also I am a bit curious on why they didn't apply the same feature that is being used to sort answers with the same amount of votes, is there a particular reason or did they just forgot to apply it on questions too?

  • 4
    Given all the irritations that random answer sorting has caused on (rare) questions with multiple pages of answers, I shudder to imagine the horrors that would result from applying it to questions... – Shog9 Aug 5 '12 at 5:07
  • Good catch, couldn't see any pattern as well. Appears to be "fixed random", lol! – Shadow Wizard Wearing Mask Aug 5 '12 at 7:22
  • 1
    I'd expect it to be random, but cached. – Oded Aug 5 '12 at 9:31
  • @Oded good point, this fits exactly. – Shadow Wizard Wearing Mask Aug 5 '12 at 10:45

Here's the code from Marc's amazing tag engine when sorting by votes, where x and y are questions:

// question score desc
int delta = y.Score.CompareTo(x.Score);

// tie? then by aggregate answer score desc
if (delta == 0) delta = y.AnswerScore.CompareTo(x.AnswerScore);

// tie? fallback to question creation date desc
return delta == 0 ? y.Id.CompareTo(x.Id) : delta;
| improve this answer | |

You must log in to answer this question.

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