Gangnam Style Surpasses YouTube's 32-bit View Counter
First time accepted submitter neoritter writes "The Korean pop star PSY's viral music video "Gangnam Style" has reached the limit of YouTube's view counter. According to YouTube's Google+ account, "We never thought a video would be watched in numbers greater than a 32-bit integer (=2,147,483,647 views), but that was before we met PSY. 'Gangnam Style' has been viewed so many times we had to upgrade to a 64-bit integer (9,223,372,036,854,775,808)!"
I would have figured Rick Astley would have hit that count first!.
Why the hell was it signed?
who cares really?
The numbering should go 1.. 2.. 3.. etc.. thousands.. tens of thousands.. hundreds of thousands.. millions.. too many to give a fuck about.
I wonder how many people use it as their workout soundtrack. That could add up quite quickly.
Quite a lot of databases don't allow to specify a field as an unsigned integer. YouTube probably runs on one of them.
Months? Why, were views being added exponentially?
I would have thought that Google would have just used the device they have to selectively erase the memory of people who saw it. Then they could just let the counter roll over to 0.
It was originally intended to erase people's memory so they would have to look up everything, but they eventually found out that every one is doing that on their own with what Google already provides.
This is just a marketing gimmick. I find it weird that they wouldn't have used an unsigned int to begin with (or at least, would have upgraded when it appeared a video was approaching the limit).
Now they get a free news article all over the world about it! More ads for everyone!
Reminds me of good old pacman level counter: https://www.youtube.com/watch?...
Maybe Gangnam would be the one to exceed 2^32 in another 6 months, and maybe another video would. I assume YouTube's viewer base is being constantly increased, and that the "norm" for top viral video views is constantly rising.
Because they were following the Google C++ Style Guide?
"You should not use the unsigned integer types such as uint32_t, unless there is a valid reason such as representing a bit pattern rather than a number, or you need defined overflow modulo 2^N. In particular, do not use unsigned types to say a number will never be negative. Instead, use assertions for this."
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Stupidity, according to google, can now be measured as a 64-bit value.
"Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
Yes, in fact the view count will become self-aware on August 29, 2015. In a panic, they tried to pull the plug...
Don't blame me, I voted for Baltar.
If they'd used a 32 bit unsigned integer they might have bought another 6 months or something.
You could say the same of the unix time_t problem, which is a signed 32bit int. If it were unsigned, it'd go to 2106 instead of 2038. Either way, that's not not really the solution. The solution, as youtube has done, is to move to 64bit int.
Personally, I'm amazed at the hit count!
There are 2^31 seconds between 1970-01-01 and 2038-01-19.
If this video was watched once every second since 1970, it'd still have 24 years before it rolled over that counter.
By comparison, it hasn't been available very long. How many views a second is that thing getting? On average, more than 28 hits a second!!!
28 hits/sec may not seem outrageous for a very popular file on a very popular site, but that's averaged since July 2012 until today. That, IMO, is nuts.
Java doesn't have unsigned integers as a primitive type. (Speculative but I'd guess this is what's going on.)
Don't blame me, I voted for Baltar.
I assume they're gonna be calling this the Psy2K bug.
The song and video are a parody of the lifestyle of Koreans in the Gangnam District of Seoul.
I wish YouTube could implement negative view counts.
“Common sense is not so common.” — Voltaire
There is no hope for humanity. Hey Vlad, you Easter-Island-statue-faced midget, hit the big red button. Let somebeing else have a go.
I hope it's the meerkats.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Signed 32-bit oughta be.
According to some estimates, about 3 billion people have access to the internet. The stats would indicate that about 2/3 of the people with internet access have viewed this video, or more disturbingly that some people have watched it more than once.
As a man married to a Korean, I will admit to having started to watch it, but finishing it would have been a waste of valuable minutes of my life. Does that still count as a "hit"?
If you are not allowed to question your government then the government has answered your question.
Subject should have been "... for anybody" of course.
...that takes away my hope that the human race will survive and flourish.
Another reliably depressing indicator of the current state of humanity is Youtube's "Popular Right Now" category. Surely the Apocalypse is near....
Repent while you can, and, I for one welcome our eminent Tribulation Overlord...yadayada....
When the king heard the words of the Book of the Law he tore his robes.2Kings22:11
... for the successful rick-rolling goes to the "informative" mods...
Even though "beats the 64bit integer" was very obvious BS, I still clicked...
Violence is the last refuge of the incompetent. Polar Scope Align for iOS
Oh...right ...something with counters..it has 500 million. so yeah...2 billion isnt that far away.
Imagine how much bandwidth we wasted with that annoying song. :)
There can be good reasons to use it but there are also a couple of reasons to avoid it.
1: overflows are "hidden", with a signed number overflow will usually* result in a nonsensical (very large negative) number, with an unsigned number overflows will usually bring you back to zero which is much less likely to be noticed
2: the rules for operations (especially comparisions) involving a mixture of signed and unsigned types are seriously counter-intuitive.
* Yes I know the C standard doesn't actually require this and modern versions of gcc are being retarded about it in some cases but for the most part it holds true
note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
Why did they use a signed int? Can I magically negative view something?
Storage vs rendering. JDBC drivers usually use a long for unsigned int, so it wouldn't have been an issue.
Yeah, they should have just used 128 bit integers.
Comment removed based on user account deletion
The Korean peninsula continues its campaign-of-inconvenience against American computer networks.
that's not correct. it's signed so that if you subtract two epoch values, the result is positive iff the first is later than the second.
If the values are straight storage, well that's an extra 4 bytes per video for the count. Some quick googling turns up a couple of figures that aren't too terribly old, and which don't actually add up to much:
As of 2008, there were around 83M videos on YouTube, so that's 332 MB for storage for the counters, assuming every video's record were updated and the count data is stored uncompressed. I'd guess double that amount for 2014, but I couldn't find a reliable figure.
Currently, about 4 billion videos are watched per day (!), so allowing for four extra digits on the displayed "watched" count, that would add up to 16 GB of added bandwidth, were every one of those videos to significantly exceed the former 32-bit counter.
2^32 - 1 = 4,294,967,296 2,147,483,647 = 2^31 -1 ...so either they were using a 31-bit integer or they were using signed ints.
How exactly does one get a negative number of views?
2^32 - 1 != 4,294,967,296
Do you really think that the database that Youtube uses to store view counts is limiting that field to 32 bits? Ever? Or that it can't handle overflow in a graceful way that automatically upgrades the value? Or that Google didn't notice this YEARS ago and do a system-wide type change on that table column?
This is FUNNY, but not a technical problem. Of course, many of you may be making jokes in response, pretending to believe it's limited to 32 bits, when you realize it's not. But for those of you whose realities are limited to 32-bit chunks, I just though I'd clarify at the risk of possibly just destroying all the humor value.
As an aside, it amazes me when students first learning circuit design feel compelled to make registers and buses that are all in multiples of 8 bits. There's nothing preventing you from making a circuit component that is 47 bits wide.
Or they could just have interpreted the 32-bit integer as an unsigned 32-bit integer, and go on for a long long time.. As the # of views can never be negative..
Can't... it's unsigned.
Which has more power: the hammer, or the anvil?
You are not supposed to subtract two epoch values directly. The difftime() function returns a double, and works just fine with unsigned time_t.