Last week, Google stated that the video "Gangnam Style" by Psy has overcome 2 billions of visits or 2,147,483,647 (that is 231-1) to be precise. This is the highest number that can be represented with a 32 bits signed integer variable. Once that value is reached, if you add one, you get a negative number. As you can understand, this can be a problem for a counter. But now let's do a step behind to see the whole picture.

First Thing First: Who Is Psy?

Why a South Korean artist that sings in his own native language should be so popular worldwide? Well, the song is really catchy and the video is funny, you may say. These two reasons can explain the success after the video became quite popular. But the starting point had nothing to do with music.

It all begun when someone at 4Chan noticed that Psy was very similar to Kim Jong Un, the North Korean dictator. In addition, Psy was the perfect nemesis of the Justin Bieber, a Canadian singer quite hated by 4Chan guys.

(4Chan is an anonymous community where every kind of ideas [mostly not safe for work] are spread daily. Just as an example, many of the internet memes that you can see have an ancestor in 4Chan. And Psy is just one of those memes.)

You can find the whole story here (in Italian).

The Tech Side

According to TechTimes, Google engineers noticed that the counter was close to the limit some weeks ago, so they could fix it by simply double the size of the variable. In this way, it will take some centuries to reach the new limit of 9,223,372,036,854,775,807 (please note that this is the maximum value that can be represented with a 64 bits signed integer).

Now you may want to ask why using a signed integer? Unsigned counters can double the number of numbers represented with a signed variable of the same size. This would have been quicker to implement. Since the size remains the same, database structure should not be changed. Only the front-end will be affected.

My assumption is that negative values are used internally for some other purpose, so it would have been probably most impacting to change this behavior instead of double the size of a field in the DB.

It's Marketing, After All

The thing, from a technical point of view, could have passed without much clamor. But the number is something that can be considered unreachable for any other video sharing platform. In addition, this is also a goal the classic television channels cannot easily reach.

So this claim around a number is also a demonstration of power that Google spreads worldwide. And the competitors aren't just other online platforms but TV companies, too.

Conclusions

Behind a simple counter there can be several stories. And when we speak about a great company, such as Google, computer science and marketing always mix together.

Update July 2017

According to BBC, Psy's Gangnam Style is no longer the most-watched video on YouTube.