Ask EchoJS: How is the rank of a submission determined?
▼2 up and 0 down, posted by
2 up and 0 down, posted by
I don't understand how recent (1 day old), upvoted links cannot be on the front page while 2 months old, not upvoted links are still there. I just upvoted a few submissions and they were immediately removed from the front page. Did I miss something?
Agreed, it's totally broken :( The rankings somehow worked at the beginning but then started to become totally irrelevant, as the compute_news_score function does not take time in consideration. Not sure what to do about it at the moment : sadly, Lamer News development is stalled, nothing has been pulled since early November. Will try to look into it next week. From Lamer News source code : # Given the news compute its score. # No side effects. def compute_news_score(news) upvotes = $r.zrange("news.up:#{news["id"]}",0,-1,:withscores => true) downvotes = $r.zrange("news.down:#{news["id"]}",0,-1,:withscores => true) # FIXME: For now we are doing a naive sum of votes, without time-based # filtering, nor IP filtering. # We could use just ZCARD here of course, but I'm using ZRANGE already # since this is what is needed in the long term for vote analysis. score = (upvotes.length/2) - (downvotes.length/2) # Now let's add the logarithm of the sum of all the votes, since # something with 5 up and 5 down is less interesting than something # with 50 up and 50 donw. votes = upvotes.length/2+downvotes.length/2 if votes > NewsScoreLogStart score += Math.log(votes-NewsScoreLogStart)*NewsScoreLogBooster end score end # Given the news compute its rank, that is function of time and score. # # The general forumla is RANK = SCORE / (AGE ^ AGING_FACTOR) def compute_news_rank(news) age = (Time.now.to_i - news["ctime"].to_i)+NewsAgePadding return (news["score"].to_f)/((age/3600)**RankAgingFactor) end