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/PG : Why are comments ordered like this?

32 pointsby pigover 14 years ago
See http://news.ycombinator.com/item?id=1162965<p>pg's comment, with just 17 points, is placed above brh's comment, which has 110 points. Both the comments are from 262 days ago.<p>Why is this so?

9 comments

zckover 14 years ago
Looking at the arc 3.1 source, I'm not sure why that's the case.<p>The real work here is done by * frontpage-rank* . It's implemented as follows:<p><pre><code> (def frontpage-rank (s (o scorefn realscore) (o gravity gravity* )) (* (/ (let base (- (scorefn s) 1) (if (&#62; base 0) (expt base .8) base)) (expt (/ (+ (item-age s) timebase* ) 60) gravity)) (if (no (in s!type 'story 'poll)) .5 (blank s!url) nourl-factor* (lightweight s) (min lightweight-factor* (contro-factor s)) (contro-factor s)))) </code></pre> <i>realscore</i> subtracts any votes that are noted as "sockvotes" from the item's raw score.<p>The first few lines here won't change too much here for either comment. Obviously, the 110 point comment will have a higher base score than the 17 point comment. They're about the same age, so (expt (/ (+ (item-age s) timebase* ) 60) gravity) will be about the same for each of them. So the division will come up with a number that's a few times higher for brh's comment.<p>The interesting part is the multiplication here. I don't think either would be considered a story, so neither is being multiplied by .5; neither has a blank url, so they're not getting hit by nourl-factor<i>.<p>It comes down to the final part, whether one is considered "lightweight", and what the </i>contro-factor* of each is. It takes into account the number of children of the comment (the <i>visible-family</i> call). It shouldn't make a difference, though -- neither of the posts has more than 20 children, so contro-factor for both should be 1. I think I'm missing something, as what I've said wouldn't explain the ordering.<p>Notably, though, it doesn't take into either account karma or average karma of the poster to determine rank.<p>Edit: as ChaosMachine pointed out, it does take into account users' average karma: <a href="http://news.ycombinator.com/item?id=1923716" rel="nofollow">http://news.ycombinator.com/item?id=1923716</a> . Ey pointed out that pg's post is here: <a href="http://news.ycombinator.com/item?id=1398764" rel="nofollow">http://news.ycombinator.com/item?id=1398764</a>
评论 #1923991 未加载
评论 #1924462 未加载
mericover 14 years ago
Interestingly, the author of the 110 point comment has no submissions and only one comment - that one.
评论 #1923815 未加载
chaosmachineover 14 years ago
Average comment karma of the poster plays a significant role in determining comment order.
评论 #1923819 未加载
评论 #1923826 未加载
dkokelleyover 14 years ago
Possibly still due to the time decay function. I don't know exactly when each comment was created, but pg's comment may have been more recent (within 24 hours). I haven't looked at the inner workings, but I imagine that upvotes might also be weighted more for how recent they are. Example: pg's comment may have received 17 upvotes within a minute of posting, and his post was 4 hours after brh's, and brh's upvotes happened slower, or before pg's comment.<p>This is all speculation. Maybe someone who has looked at the code could confirm or debunk this.
评论 #1923779 未加载
pigover 14 years ago
Link for easy clicking : <a href="http://news.ycombinator.com/item?id=1162965" rel="nofollow">http://news.ycombinator.com/item?id=1162965</a>
JoeCortopassiover 14 years ago
The karma points are probably weighted by user, so that users with higher karma carry more weight per point.
blasdelover 14 years ago
Note that pg can do whatever he wants in the REPL.<p>I haven't noticed any thread ordering tomfoolery before, but he's definitely hidden posts from the index pages before without [dead]-ing them.
评论 #1924079 未加载
evanrmurphyover 14 years ago
Is it because pg's comment has a more developed (and karmaful) subthread?
评论 #1923699 未加载
austonover 14 years ago
More comments on pg's thread.<p>As an experiment; let's upvote chaosmachines comment to 5 add 1 comment, leave mine get mine to 3 &#38; add 3 comments.
评论 #1923957 未加载