Right now the front page Popular tab is fairly broken -- it's a simple descending sort by views. As Joel said in podcast #18, it is "a self-fulfilling prophecy." But this is not intentional, it's only because we haven't had time to improve it yet!
As I sit down to write a better algorithm, I thought you guys might have some insight into what would make a good formula to determine the "hot" questions -- over the last 24 hours, the last week, the last month, and all time.
Here are the variables we have to work with:
- Votes [aka Score]
- Views
- Answers
- Answer Votes [aka Score]
- Whether the question has an accepted answer or not
- Time question was originally asked
- Time of last activity on question
- Reputation of asker
- Reputation(s) of answerers
Joel cited the reddit formula as an example, but I think our site is a little different than just a basic link submission site. Plus, we have more variables and data to work with.
I found a blog post describing a few formulas:
Y Combinator Hacker News
(p - 1) / (t + 2)^1.5
p = votes (points) from users
t = time since submission in hours
t = (time of entry post) - (Dec 8, 2005)
x = upvotes - downvotesy = {1 if x > 0, 0 if x = 0, -1 if x < 0)
z = {1 if x < 0, otherwise x}log(z) + (y * t)/45000
Thoughts? Ideas? I don't want to overthink this; I just want the "hot" questions to be relevant and useful to us. So the simpler the algorithm the better!
Based on my analysis of the above and the comments so far, here's the second version of what I have implemented so far. This might suck. I don't know:
(log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores) -------------------------------------------------------- ((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5
Note that accepted answers weight not at all in hotness. This is intentional, as I feel accepted answers are a fine social contract, but not a good data point for question or answer quality.
This algorithm will heavily favor questions with LOTS of answers, as the sum(Ascores) are now included -- one assumes if there are lots of answers, there will be a lot more voting on the answers, too.
Update: Note that this formula is what is used on the hot tab linked from the homepage of each site. It is not the formula used to determine the network hot list. See What are the criteria for questions to be selected for Hot Network Questions?.