[I originally posted this to The Farm, but thought that it might be of general enough interest to post here.]
This one got pointed out to me by Alain Chesnais, Tucows’ new Director of Product Management. Google the following phone number:
There are nearly 19,000 results for this phone number at the time of this writing. That’s a little odd.
Also of note is the fact that although 214 is the area code for central Dallas and parts of northeast Texas, the first page of Google results also reports that the number for four cafes with free wi-fi in San Francsico, Santa Cruz and Fremont, all cities hundreds of miles to the west, in California. It’s also reported as the phone number for the Jackson County, Florida Chamber of Commerce. And an inn in Labrador.
What’s happening here?
I looked at the number on Friday morning, not thinking much about it until lunch, when it occured to me that I if I ignore the phone number formatting, it becomes:
2147483647
…which should look very, very familiar to most programmers. That’s the largest value for a signed integer that can be represented in 32 bits, or MAXINT for many programming languages…and databases.
These Google results for the MAXINT phone number are most likely coming from database-generated pages (and maybe a few static pages in which someone dutifully copied the number from a database-generated source) in which the phone number was stored as a signed 32-bit integer value.
This will work for phone numbers with the following area codes…
\
and some subset of numbers in the 214 (Central Dallas) area code.
The moral of the story: don’t store phone numbers — or for that matter, any number that has no actual value as a quantitative amount, such as social security numbers, serial numbers and so on — as integers!
How did I not know about the Joe Pesci Home Alone yule log stream until now?…
I’m enjoying exotic-to-me American cuisine (being Asian, I had a mashed-potato-deprived childhood) at Christmas dinner…
As the lyrics say, all is supposed to be merry and bright during the holidays,…
It’s not just another Sunday, but the Sunday leading up to Christmas! It’s that time…
Here’s wishing Alex Bruesewitz a speedy recovery — yes, he’s behind a racist lie that endangers…
View Comments
Great sleuthing! -Ry4an
ummm.....alain is actually vp of product development. :-)
Cheez it, the CEO!
That's just great. I suspect I'm going to be subjected to org chart pop quizzes for the next week.
I have a friend who's license plate is 7FFF, which is maxint in 16 bit signed notation. He got it because 32767 and MAXINT were both taken :^)
-robin