tags:

views:

51

answers:

2

Reddit uses a time decay algorithm. That would mean the sort order is subject to change. When a user goes to page 2, is there a mechanism to prevent them from seeing a post that was on page 1 but was bumped down to page 2 before they paged over? Is it just an acceptable flaw of the sort method? Or are the first couple of pages cached for the user so this doesn't happen?

Side note: It's my understand that Digg cannot suffer from this issue but that HackerNews and Reddit can.

A: 

It might be using the last ID as opposed to limiting from. Take these two examples of SQL:

SELECT * FROM Stories WHERE StoryID>$LastStoryID;

rather than

SELECT * FROM Stories LIMIT 20, 10;

Aaron Jackson
So you can miss some stories in the process if the sort order has changed and the $LastStoryID would not be on Page 2.
Jared Brown
+1  A: 

From the next URL you see: http://www.reddit.com/?count=25&after=t3_dj7xt

So clearly the next page ensures that the page2 starts at the post after t3_dj7xt - whatever that translated to. This could be accomplished using IDs so you'd pass after=188 then the next page starts at 189 thus ensuring you don't see the same post if a time delay occured

methodin
I noticed that. Though that leaves the possibility that you are missing posts that in that time were promoted to appear on Page 1. You are essentially skipping to after post t3_dj7xt, even if at this point that post would be on the second page.
Jared Brown
But technically that is the correct way to handle it. I would expect that page 2 will always show the page 2 at the time I requested the original page. If I want to see the most recent I just refresh or hopefully press the "2 more posts" button akin to Twitter etc... I never liked pressing page 2 and have it appear to be page 1 since I never refreshed the page ;)
methodin