Post History
The leaderboard that shows below a code golf challenge can either sort the answers to show the winner for each language separately (if "Group by language" is ticked) or it can show all the answers ...
#1: Initial revision
Leaderboard sorting bug
The leaderboard that shows below a code golf challenge can either sort the answers to show the winner for each language separately (if "Group by language" is ticked) or it can show all the answers from all the languages sorted as a single list, to give an overall winner. There seems to be a bug in sorting, for at least the single list format. This can be seen in the challenge [Make $2 + 2 = 5$](https://codegolf.codidact.com/posts/283770), where a recent answer with a score of 6 shows above previous answers with a score of 5, with "Group by language" not ticked: ![Leaderboard showing 6, "undefined", and 5 as joint 1st place](https://codegolf.codidact.com/uploads/f4444ero98u7qirycjlb4jmvi8mx) There is also an answer that did not provide a score, which shows in the leaderboard with a score of "undefined" and is also sorted above the answers with score 5, but below the answer with score 6. The right hand side of the leaderboard shows the ranking for each answer, with answers with the same score showing the same ranking. Notice that the top 4 answers all show as a joint 1st place (indicated by a picture of a trophy instead of "#1"). This suggests that 6 and "undefined" are not being treated as better scores than 5, but as equivalent scores. The rest of the leaderboard appears to be sorted correctly, with rankings only being the same where scores are the same. ## To decide - How do we fix the sorting bug that puts (in this particular case) a score of 6 above a score of 5? - What should be the leaderboard behaviour for answers that do not provide a score (or in general provide an invalid entry format)? - Omit from the leaderboard? - Sort to the bottom to avoid distraction? - Sort to the top to draw attention to what needs to be fixed? - Display with distinctive formatting? Whether people should be permitted to post non-competing answers that do not have a score can be raised as a separate Meta discussion if anyone wishes to. Here we just need to decide how an invalid entry format should be treated in the leaderboard code.