We all remember the Y2K bug back in the millennium when the clocks changed from ’99 to ’00. The Y2K bug (although it never did really materialise) resulted from computer programmers storing years as two-digit numbers. 99 was the biggest possible value, and after that, the year reset itself to 00.
A similar bug is the Year 2038 bug. In computing, times are often stored as the number of seconds which have passed since midnight on the 1st January 1970. This allows time to be stored as a single integer in computers. At the moment, times tend to be stored as 32-bit integers. For signed 32-bit integers, only values between −2,147,483,648 to +2,147,483,647 can be stored. Hence, computers with 32-bit times cannot store any date more than 2,147,483,647 seconds after 1st January 1970. That occurs on Tuesday, 19 January 2038. We’ve still got 29 years to prepare for that eventuality, but we’re going to see a bit of a taste of the 32-bit integer bug with Facebook soon.
Facebook user IDs are often stored as 32-bit integers – thats a problem when there are more than 2.1 billion users on Facebook. In a message to Facebook Application developers, Facebook wrote on their platform status page:
With the addition of features like internationalization and Facebook Connect, we have seen a significant increase in user growth and engagement. As a result of this growth, we’ll start to issue uids greater than 2^32 in a few months. We wanted to remind developers that uids should be stored using 64-bit integers, as documented at http://wiki.developers.facebook.com/index.php/User_id. Since all current uids passed to applications are less than 2^32, developers may have inferred a 32-bit uid format. We are making this announcement so that any such developers have time to migrate code and databases before the first 64-bit uid is sent to applications.
Essentially, we’re being warned that users who sign up to Facebook after the date which Facebook hits 2.1 billion could find themselves running into issues accessing sites and applications which integrate with Facebook. I’m not sure how close to 2.1 billion Facebook are – one of my friends who signed up a month or two ago had a user ID of 1.64 billion. I’m not sure how quickly Facebook is gaining users and when they’ll hit 2.1 billion but Facebook have told us developers that we need to upgrade our applications now to ensure that they work for everybody.
My User ID is in the range of 710 million which is still larger than 84% of my friends; indicating I was a bit late to Facebook. I don’t know of anybody with a user ID smaller than 500 million. I wonder if small Facebook IDs will become one of those future status symbols.