TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Algorithm for ranking comments in a post

7 pointsby manidoraisamyabout 10 years ago
I like the way HN displays comments based on how recent it is and its upvotes. I am building a leaderboard that ranks people and looking for a similar algorithm. Can you explain the algorithm?

4 comments

ohashiabout 10 years ago
The other post mentions wilson confidence interval&#x27;s. Here&#x27;s the post I learned it from: <a href="http://www.evanmiller.org/how-not-to-sort-by-average-rating.html" rel="nofollow">http:&#x2F;&#x2F;www.evanmiller.org&#x2F;how-not-to-sort-by-average-rating....</a>
评论 #9196481 未加载
luggabout 10 years ago
<a href="https://news.ycombinator.com/item?id=1781013" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1781013</a><p><a href="http://amix.dk/blog/post/19574" rel="nofollow">http:&#x2F;&#x2F;amix.dk&#x2F;blog&#x2F;post&#x2F;19574</a>
manidoraisamyabout 10 years ago
Here is my current algorithm:<p>DiffInDays = Today - Date_1970_1_1; &#x2F;&#x2F; Number of days between Today and Jan 1, 1970.<p>Rank = DiffInDays + (Score&#x2F;1000); &#x2F;&#x2F; Score is the equivalent of upvotes.<p>&#x2F;&#x2F; Sort by Rank
avargasabout 10 years ago
You could create something based off reddit&#x27;s <a href="http://amix.dk/blog/post/19588" rel="nofollow">http:&#x2F;&#x2F;amix.dk&#x2F;blog&#x2F;post&#x2F;19588</a>