On SO 18 Joel mentioned an algorithm that would rank items based on their age and popularity and it's based on gravity. Could someone post this? C# would be lovely, but really any language (well, I can't do LISP) would be fine.
How is it calculated? As mentioned above, the popularity is based on view counts. In the formula, mostViewInCollection is simply the number of views on the most popular article in the Collection. If you have an article with 100 views, making it the most popular, it would have a popularity rating of 5.0.
Reddit ranks an item by calculating the number of votes a link has and then subtracting points based on how old that link is. This means that newer links generally rank higher than older links.
My understanding is that it is approximately the following from another Jeff Atwood post
t = (time of entry post) - (Dec 8, 2005)
x = upvotes - downvotes
y = {1 if x > 0, 0 if x = 0, -1 if x < 0)
z = {1 if x < 1, otherwise x}
log(z) + (y * t)/45000
alt text http://www.mt-soft.com.ar/wordpress/wp-content/plugins/wp-o-matic/cache/0ad4d_reddit_cf_algorithm.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With