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: How are comments ordered?

3 pointsby JDGMabout 12 years ago
Let me preface this by saying that I am aware the <i>submission</i> ranking algorithm is something of a trade secret and I trust this thread about <i>comment</i> ranking will be removed as appropriate if inappropriate. Likewise if there is already a topic on this with the goods then please link it, and feel free to insult my Google Fu while you're about it.<p>Here's what I have so far:<p>1.) Karma is used to rank comments.<p>2.) New comments have only 1 initial karma point, yet enter the thread quite high (if not at the top?) then, assuming they are insufficiently upvoted, sink.<p>3.) I don't know how important to a comment's ranking its descendants are, nor the extent to which a reply's karma affects its ancestors.<p>4.) The 1 initial karma does not contribute to the poster's total, so seems to me like a way to +1 some part of the ancestors' ranking score calculation to represent that it has inspired one new comment of discussion.<p>5.) I have no idea what happens in a "tie-break" situation.<p>This thread is motivated almost entirely by a comment I made today which has been upvoted a lot more than I am used to being upvoted. It is a first reply to another comment and at the time I replied, that comment was near the bottom of the thread. I chose to reply to it because the poster was making enough of the same point I wanted to make that I could just say "Indeed" and then post my own comment without having to establish context. Given that the parent is now the second highest ranked un-nested comment in the thread, and I've got a lot more karma than I'm used to, I rather wonder on whose coattails who is riding, or if the two of us are sailing some kind of slowish coattail catamaran.

2 comments

nigglerabout 12 years ago
A few years ago PG commented with the code:<p><a href="https://news.ycombinator.com/item?id=1781417" rel="nofollow">https://news.ycombinator.com/item?id=1781417</a><p>But I don't think that's what's used now. The news code is available (written in arc) but I imagine the YC code is slightly different
rozapabout 12 years ago
Not sure how HN does it, but reddit sorts by the wilson score. It seems like a logical way to sort these sorts of things.<p><a href="http://www.evanmiller.org/how-not-to-sort-by-average-rating.html" rel="nofollow">http://www.evanmiller.org/how-not-to-sort-by-average-rating....</a>