News for hackers. Stuff that matters.
Re:Ask HN: How do you determine "hot" or "popular" user-gene... by mindcrime on Tuesday February 15, 2011 @12:57PM (#2222329)
The most straightforward way is to start with some default value for "hotness" and then decay the hotness by time (a logarithmic basis is popular for this), and increase hotness based on activity (votes, comments, etc.)

For a real-world example (albeit one from code that's not much beyond "prototype" status) feel free to look at what we do in Neddick:

https://github.com/fogbeam/Neddick/blob/master/grails-app/se...

look at the calculateScore() and calculateHotness() methods in particular.

What we do there is basically just use 0 as the default, count each upvote as +1 to score and each downvote as -1 to score, then use the score as the hotness, before decaying by age. It's simple and not optimized at all, but it gives the general effect we're looking for.

Re:Ask HN: How do you determine "hot" or "popular" user-gene... by epe on Tuesday February 15, 2011 @02:44PM (#2222877)
The clearest explanation I've ever seen of this method is here:

http://www.evanmiller.org/rank-hotness-with-newtons-law-of-c...

Re:Ask HN: How do you determine "hot" or "popular" user-gene... by mindcrime on Tuesday February 15, 2011 @02:57PM (#2222955)
Heh, yeah, I think that's the same page I originally used to come up with an approach to doing this. There are also some discussions of this same topic on StackExchange and some other sites.