back to article Gangnam Style BREAKS YouTube

YouTube has admitted that Psy's 2012 hit song Gangnam Style broke it. Or at least broke its counter that records how many times a video has been viewed. The breakage occurred because the video's been viewed more than 2,147,483,647 times. As YouTube explains, that's larger than a 32-bit integer, which mean the hit's hit-counter …

  1. Scott Earle
    FAIL

    unsigned int, anybody?

    Just over 2E09 is the maximum value that can be represented by a SIGNED 32-bit integer. Why would they not use an UNSIGNED integer (cos -1 views makes no sense, right?) and they could have delayed this by another couple of years, which would have given them plenty of time to increase it to a 64-bit unsigned integer instead.

    1. Lyle Dietz

      Re: unsigned int, anybody?

      I think a better idea would be using an arbitrary precision integer. No need to worry about overflow, as long as you have memory to store it.

    2. Chris 155

      Re: unsigned int, anybody?

      Because, and this is the answer to the question about the arbitrary precision comment below you, it's not actually the programmatic type that's causing the problem, it's the type in the database which is the issue.

      For a number of reasons most db's don't have a unit type and an arbitrary precision integer is a binary blob which can't be indexed.

    3. Anonymous Coward
      Anonymous Coward

      Re: unsigned int, anybody?

      Aside from the point other's have made maybe youtube is implemented in a language that doesn't have unsigned types...

    4. Piro

      Re: unsigned int, anybody?

      That was my very first thought.

    5. Hans Neeson-Bumpsadese Silver badge

      Re: unsigned int, anybody?

      Agreed, although "-1" is the number of times I wish I'd seen that bloody K-pop video

      1. Simon Harris Silver badge
        Thumb Up

        More importantly...

        Surely, the most important question that nobody has asked is..

        how many up-votes (or down-votes) does it take to break El Reg?

        1. Toltec

          Re: More importantly...

          Along with the film ET this is something which I hope I can avoid watching, ever.

          @Simon, have an upvote just for trying.

  2. Sampler

    2,147,483,647 views / 872 days = 2,462,711 views per day (102,613 per hour, 1,710 per second)

    4m12s * 2,147,483,647 views = 9,019,431,317 minutes (150,323,855 hours, 6,263,494 days, 17,160 years)

    Assigning this to cumulative time wasted assumes the user watched the video in its entirety and did nothing else whilst viewing, which is a poor assumption to make given anecdotal evidence witnessed amongst contemporarys..

    [EDIT]

    These figures are for guidance only as the initial view figure from the article is now 4,412,786 less than the number of views at the time of writing (or, another 35 years of viewing)

    1. Eddy Ito Silver badge

      If I had a nickel for every... hell, if I had a penny for each view I could retire in, well, Gangnam style. But I get the point, the dollar value even at minimum wage is almost obscene and if viewed by different people that's over a quarter of all people on the planet. Clearly this is what Apple should have pushed out to iTuners instead of U2.

      1. Horridbloke

        @Eddy

        The dollar value is large, sure, but what price can you put on happiness?

        1. Michael Habel

          Re: @Eddy

          The dollar value is large, sure, but what price can you put on happiness?

          Lol I dono, what does a TRULY UNLIMITED high speed 4G LTE Connection with Nationwide coverage go for these days?

          As the song goes: Just give me Money!

    2. MassiveBob

      4m12s * 2,147,483,647 views = 9,019,431,317 minutes (150,323,855 hours, 6,263,494 days, 17,160 years)

      Are you sure this is correct?

      I thought everyone just watched the first 10 seconds and realised that they clicked on the wrong video?

      1. James 47

        If they don't already, YouTube will only increment the view count on completed plays. Numberphile/SixySymbols did a video on it. There's also an 'off-by-one' bug where the view count is listed as 301 for a while instead of 300 until YT do their number crunching to determine the real view count

    3. Lamont Cranston

      "did nothing else whilst viewing"

      You call jumping around like a hyperactive idiot "nothing"?

    4. sisk

      Assigning this to cumulative time wasted assumes the user watched the video in its entirety and did nothing else whilst viewing

      You mean like saying "AHHH! NO! MERCY! I DIDN'T MEAN TO CLICK THIS LINK AGAIN!"?

    5. Mussie (Ed)

      Thanks

      I knew one of my geeky brethren would do the math :)

  3. Anthony Hegedus Silver badge
    Coat

    I watched the video

    What about Charlie Bit My Finger? Surely that'll break the entire universe. Because it's soooo funny watching a baby bit someone's finger.

  4. Anonymous Coward
    Anonymous Coward

    That someone went to the effort to make that animation shows they had plenty of time you address the issue, and were just making a joke. As for why not an unsigned integer? Google's coding standards are public and make good arguments for almost never using them.

    1. mccp

      I've just looked at a Google coding standards document for C++ in which the arguments for not using unsigned integers are incomprehensible.

      http://google-styleguide.googlecode.com/svn/trunk/cppguide.html

      At one point it states this:

      "Consider:

      for (unsigned int i = foo.Length()-1; i >= 0; --i) ...

      This code will never terminate!"

      The fact that you can write stupid code which includes the type 'unsigned' does not seem to me to be a good reason not to use 'unsigned'. I can write stupid code using any C type you like.

      Perhaps you could point to the good arguments that you found.

  5. MJI Silver badge

    I will have to tell some one at work

    Their son broke youtube!

  6. ravenviz
    Trollface

    If the hit counter breaks then surely that means it's time for everyone to move on and look at something else and the video be removed and never be allowed to be uploaded again. Ever.

  7. Anonymous Coward
    Anonymous Coward

    Gawd, that EMC clip was awful!

    Watched the first 10 seconds or so. But I find myself wishing I had some EMC gear so I could trash it in anger and switch vendors...

    1. MondoMan
      Facepalm

      Everyone knows that F5 makes better parodies:

      https://www.youtube.com/watch?v=8jo12LH5NqI

  8. Zap

    Better Parody

    I get the IT link ot EMC but I think there are better parodies.

    Kim Jong Style https://www.youtube.com/watch?v=_cG7ZVBXQII

    Lego Style https://www.youtube.com/watch?v=i2CZBBM7zBw

    Obama Style https://www.youtube.com/watch?v=Xwh8kWuire8

    Eton Style https://www.youtube.com/watch?v=9FtZkVRkusQ Featuring Cameron Crew

    Eastern Europe Style https://www.youtube.com/watch?v=zY1MVQeeStY

    1. Billa Bong

      Re: Better Parody

      Don't forget:

      Penketh High School style: https://www.youtube.com/watch?v=ntkjTbUG_QE (skip first 45 seconds)

      (Not really a parody, but pretty cool how close they got)

  9. Anonymous Coward
    Anonymous Coward

    Yes but

    what's the point

    1. Mark 85 Silver badge

      Re: Yes but

      The point is: there is no point.

  10. The Vociferous Time Waster

    17 thousand years

    that's about 250 lifetimes

    Convict him for mass murder

  11. Mike Flugennock

    Hell, YouTube was already broken

    Between the Google copyright nazis and rancid comment sections, and all the schlocky music videos, twerking chicks, plane crash porn, people throwing dry ice into swimming pools and dumping buckets of ice onto each others' heads -- I got fed up and started posting my stuff to Vimeo, where there's a better chance of actual quality content being seen.

    Granted, YouTube has always been kinda' lowbrow, but in the past few years it's gotten to be a complete shithole.

  12. -tim
    WTF?

    Numeric limits in my databases? Never

    Years ago one of the Berkshire Hathaway sub stocks hit 32,767 1/2 and wouldn't go any higher. I mentioned that to a friend who worked at a stock market data company and went into a database, fiddled with a flag and a few minutes the stock price went up.

  13. HippyChippy

    Why the Merkin?

    "...do the math"? Surely you mean maths?

  14. DaveTheWalker

    Frequency

    http://www.wolframalpha.com/input/?i=2^32+%2F+%28number+of+seconds+since+july+15th+2012%29

    57 times a second...roughly(!)

    Faster than the UK mains frequency...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2020