Open ahmads opened 11 years ago
There are a couple of ways that I could think of for this:
((Total Number of Upvotes) / (The number of days since the post was published))
. Posts with higher AUPD are shown first. There are two ways to calculate AUPD:
@posts
and order them to AUPD, through calculating AUPD for each post, then sort them. <- Really bad O()
((Total Number of Upvotes)/(Total post views))
. You can get the number of upvotes from post_votes
and for the views, you can either have a counter to each post or a Visit model. Visit model would help in cases like number 4. ((Total views)/(Number of days since the post was published))
Lets be real. A hot post means that it's attracting lots of visitors. Moreover, it's getting lots of upvotes. So, I guess the second approach Average upvotes per view would be the one. Kaman, It would be even cooler if it's something like (Average upvotes per views) in the last week = ((Total Upvotes in the past week)/(Total views in the past week))
you can build many different ways to order the posts daily or weekly or both & overall ordering
look at stackoverflow options http://stackoverflow.com/ they have usefully listing ways for the questions (( http://meta.stackoverflow.com/ ))
Thanks all for the interesting discussion. I agree with you, a ranking algorithm would make the website much more useful.
I'm planing to implement an algorithm that's very similar to the one that's used by HackerNews. Here's the algorithm with a good discussion: http://news.ycombinator.com/item?id=1781013 It's most likely to be released with the next major version of Progmr, which's due sometime within the next week.
The current way of ordering the posts (by date or votes) has no way to surface the “hottest” posts; a raking algorithm would help solve that problem and greatly improve the user experience.