The subreddit has become a sort of game for thousands of people, who eagerly speculate about what will happen when inevitably, the button hits zero. In fact, the frenzy has separated redditors into two camps: those who wish to keep the joke alive as long as possible, pressing the button to prolong the agony of others, and the non-pressers, who await the moment who the clock hits zero. The speculation is almost laughable over something so simple. In this blog post, I'll be examining the technology behind the button that has captured the time of so many people.
Everything is captured in these few lines of code.
The three integral parts of the page are the button, the counter, and the chart. The button itself is coded simply as a div, "thebutton-container locked active". The script tags below it are responsible for the chart and the count down, they link to google's visualization apis which allow reddit to display their tantalizing counters and the count down chart. Nothing really new there. The html code of the site is actually being updated in real time as more and more people are clicking on the button: the span "thebutton-participants" is changing in real time as people click the button. Here, I've come to a conclusion. Nothing special will happen at 0 seconds. The code simply shows that at 0 seconds, the site will hang, waiting for unsuspecting prey to click the button once more.
PS: During the course of research for this article, the author quite unfortunately (and by accident) clicked the button...at 58 seconds.
No comments:
Post a Comment