For All The Redditors Out There

On Reddit.com, there’s a phenomenon known as the “Cake Day“, which is the yearly anniversary of a member’s original sign-up date. When this magical day rolls around, a little cake icon appears next to your name, and people usually tend to be more generous with their up-votes towards your content.

Unfortunately, if you are a member of Reddit.com, you will probably notice that it’s actually rather difficult to determine the exact date of your “Cake Day” (unless you actually marked your calendar when you created your account). Instead of showing your actual, exact sign-up date on your profile, Reddit just tells you a vague figure something along the lines of, “you’ve been a member for 10 months”. The actual day is hidden, which means that the only way to know if it’s your cake day is to log in every single day that month, post a comment on something, and look for the cake icon to show up.

I got to thinking, and I realized there had to be a better way! Surely the sign-up information for a member could be found somewhere and exposed?

Sure enough, I tracked down a dynamic JSON file on the Reddit servers which could be accessed remotely. The JSON file path is: http://www.reddit.com/user/johnsmith/about.json (where you can replace “johnsmith” in the URL with whatever user you were trying to look up).

This JSON file contains a number of information items about the particular user, one of which is titled “created_utc” and happens to be a Unix timestamp (a date format which uses the number of seconds since the Unix “epoch”, or January 1, 1970, to represent an exact point in time). PHP has a number of built-in functions which can easily translate Unix timestamps into human readable formats (such as Sunday, October 31, 2010, at 22:54:24 UTC), and PHP also has some nice built-in functions for grabbing and parsing remote JSON files.

Using all of this knowledge, I whipped together a quick tool for looking up reddit user information (including their exact Cake Day). This web-based tool is free to use and can be found at http://www.redditcakeday.com.

2 comments

Leave a Reply to Tom Chapin Cancel reply

Your email address will not be published. Required fields are marked *

Are you a real person? *