~learn.

Gangnam Style "broke" YouTube's view counter, except YouTube said it had fixed it months before.

Headlines said a music video broke YouTube's view counter at 2,147,483,647 views. YouTube later said it had widened it months before.

YouTube · 2014 · 1 min read · a true story, sources below

Every number a computer stores has a size. A signed 32-bit integer, a very common size, can hold whole numbers up to 2,147,483,647. Go one past that and, in many programs, the number wraps around to a large negative value. A view counter is a number like any other.

On 1 December 2014, YouTube posted this on its Google+ page:

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 have to upgrade!

It invited people to "hover over the counter in PSY's video to see a little math magic". News sites, the Washington Post among them, wrote it up: a music video had broken YouTube's view counter.

Except it hadn't. Days later, The A.V. Club reported that a YouTube representative had told Variety the post was an "easter egg" and that "we updated the counter to 64-bit months ago." A signed 64-bit integer goes up to about 9.2 quintillion.

So the real story, by YouTube's account, is the less dramatic one. The counter was widened before the video reached the limit, and the post was a joke about a problem that had already been fixed. By 5 December, the video had 2,158,505,118 views, and the counter kept counting.

The numbers
  • 2,147,483,647: the largest signed 32-bit integer
  • 2,158,505,118 views by 5 December 2014
  • 32 bits to 64 bits, "months" before the milestone
  • About 9.2 quintillion: the new ceiling

Why it matters: Every counter, ID and timestamp has a ceiling. Find yours, watch how fast you're climbing, and widen it while it's still a quiet change, not an emergency.

Sources

the idea behind it · W10 · DAY 04Capacity Planningread the lesson →