in-the-media

"This Video Has X Views" Creator Reveals How His YouTube Magic Works

Tom Scott at the dover cliffs and the corresponding view count and title.
Tom Scott at the dover cliffs and the corresponding view count and title.

8451 views
Published 4 years ago

Published 4 years ago

In less than two days, Tom Scott's viral video about coding and the fun of Web 2.0 has more than 5.8 million views. Don't believe me? Just check the title, which updates with the view count.

Using a bit of code, Tom Scott has developed a system to update the title of the video so that it corresponds to the view count. When a view is tallied, YouTube's servers receive a message to change the title. That sounds easy enough.

He explains:

When I want my code to change a video title, I don't ask it to open up a web browser. Instead, it sends a single request to YouTube: Here's the video ID; here's the stuff to change; here's my credentials to prove that I'm allowed to do that. Bundle that all up, send it over. And YouTube sends back a single answer -- hopefully it's a response code of 200, which means OK, with confirmation of what the video's data has changed to.

But this isn't just some neat trick of web developing wizardry. Scott uses his title to tell the story of Web 2.0 and the magic of shared data before it all fell apart a few years ago. He details the history of the last 15 years of coding in 10 minutes, highlighting the power that bots had before they were just used to annoy, spy and ruin your web experience; how little tweaks to code could make the internet a nicer, warmer place before the practice became corrupted.

Scott's video goes to deeper places than you'd expect. He argues that this history still matters today and is part of a lifecycle that we're all stuck in, turning this simple piece of coding magic into a metaphor for the universe.

H/T Mashable

Tags: youtube, this video has, viral videos, the cliffs of dover, coding,



Comments ( 2 )

Sorry, but you must activate your account to post a comment.