+2  A: 

You might try creating a metric relating the age of an item to the number of votes it has received, and using that to rank the items; that is, new items cannot be expected to have a large number of votes, so they get weighted higher because of their novelty; similarly, older items that have a lot of votes can be considered to be "well-received", and can have a high ranking. You'd probably want to look at time on a logarithmic scale, because the number of votes that get received will "flatten out" over time.

In this way, a new item may rank highly; if it doesn't receive many votes, however, it will sink over time lower in your list. If it does, however, it will rise; yet, only the older items with a significant number of votes remain high on the list.

The whole topic is complicated; you may need to twiddle with algorithms for a while before finding one that works well for your needs.

McWafflestix
A: 

I suggest to make the scoring function time dependent - for example a exponential fall off.

score = sum(vote.value * exp(-vote.age))

vote.value is assumed to be +1 or -1. This will make the influence of old votes to fall off and still preserve the ordering of votes with the same age. If you don't have the age of all votes, you can just use the age of the comment.

Further you could add a value that falls of with growing number of votes. This will bring comments with few votes to the front of the list.

score = c1 * sum(vote.value * exp(-vote.age)) + c2 * exp(-comment.votes.count)

c1 and c2 are constants for tuning the function.

Daniel Brückner
A: 

Sort by the total score, and give bonus points for items that are new.

e.g.

  • Less than 30 minutes, +3 points
  • 30 mintutes - 1 hour, +2 points
  • 1 - 3 hours, + 1 point
Patrick McElhaney
or upvotes - downvotes + age_coefficient/log(age)
Patrick McElhaney
A: 

Seems to me you need to invent a scoring system that gives weights to each factor -- absolute up vs down, percentage up vs down, and age -- and then juggle the weights until you get the results you want. Something like

score = ABS_WEIGHT * (up_votes - down_votes) + PCT_WEIGHT * (up_votes*100/down_votes) - AGE_WEIGHT * days_since_created

Jay
A: 

My first idea was to create a hybrid score, so that you'll see both newest and best comments on top. You'll probably be better trying some random parameters in real life (try using them on SO's questions list, for example) then designing from first principles.

My second idea was to have two sections: top-5 + all-newest-first. You can change 5 to be something else, I'd say, like 2*sqrt (total_number).

Now my best suggestion is to display:

  • Best comment
  • Second place comment
  • Third place comment
  • [link] "click to see more top comments"
  • [space]
  • [link] "click to see more new comments"
  • Newest comment #10
  • Newest comment #9
  • Newest comment #8
  • Newest comment #7
  • Newest comment #6
  • Newest comment #5
  • Newest comment #4
  • Newest comment #3
  • Newest comment #2
  • Newest comment
  • [add new comments textarea]

This corresponds to the intuition that:

  • the first thing you see is the best one and it can be downvoted down if it isn't
  • new comments appear at the bottom, at the place where you enter them to a textarea.
  • upvotes always try to move the comment up
  • best and newest comments don't mix
  • clicking the [link] inserts more without modifying page struture

As you see, you can literally use up and down arrows for up/downvoting :)

Separately, give the ability to change this by placing "default view | sort by votes | time ascending | time descending | poster's rating | upvotes | downvotes | whatever" tabs somewhere (I think SO does this well).

It appears to me that my solution satisfies #1-#3 quite easily!

ilya n.