Home > Blog > xkcd 715

xkcd 715
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

March 26th, 2010 Leave a comment Go to comments

I was playing with the idea to write an application inspired by xkcd comics 715 since it was released, but today I finally found time to whip it up! The whole source code is a single webpage (HTML+Javascript/jQuery) around 100 lines long. It basically forms the query by replacing hash sign “#” with the particular number from loop and then asks Google via its Search API. Resulting data are shown via Google Visualization API. It doesn’t have much eye-candy yet, but it works and that’s what counts. :-) I put the presets Randall came up with and also added some of my own. I will now describe the first three in detail:

The first one was "xkcd #", which easily showed that the most popular issues were: 10, 12, 244, 385, 427, 449, 452, 505, 701, 705 and 714.

I continued with "# czechoslovakia", which of course spotted the most important years of the 20th century for this country (1918, 1938, 1945, 1948, 1968, 1989 and 1993).

The last one, "favorite number is #", shows the distribution of favorite numbers. Three, seven, eight and thirteen were expected, but I was surprised to see peak also at 42. I guess you know why. :-)

Bear in mind that there are still some outstanding issues and also if you have any ideas for interesting presets to add, I’d be more than happy to include them!

Ah, I almost forgot the link, so here it is: http://gk2.sk/xkcd715.html. Enjoy!

Tags: , ,
  1. Keff
    March 26th, 2010 at 02:56 | #1 | SRWare Iron 4.0.280.0Windows 7

    Nice :)

    Zajimave dotazy co jsem zkousel:

    “# 000 000 000 usd”
    “# 000 000 usd”
    “# 000 usd”
    “# usd”
    “# thousand usd”
    “# milion usd”
    “# bilion usd”
    “# trilion usd”

  2. tom
    March 26th, 2010 at 12:40 | #2 | Firefox 3.6openSUSE

    ‘opensuse #’ shows a clear preference for 11 :-)

  3. TheBlackCat
    March 26th, 2010 at 18:11 | #3 | Firefox 3.6.2openSUSE

    “slept # hours last night” (0-24)
    “every # years” (0-50)
    “have # pets” (0-30)
    “have # __insert random pet here__” (0-30 for cats, 0-15 for dogs, chinchillas has a weird two-peak distribution)
    “# mb” (0-1000, probably logarithmic)
    “# out of 100″ (0-110, this one is really interesting)
    “#%” (0-300 logarithmic, this is nearly a straight line on a logarithmic scale)
    “the fish weighed # pounds” (0-100)
    “# cars” (0-55)
    “# bikes” (0-30)
    “score of #” (logarithmic, this can go as high as you want)
    “# times” (0-300, logarithmic, with interesting spikes at increments of 50 and larger spikes at increments of 100)
    “#-core processor” (0-100, just to see the random spike at 80)
    “# iterations” (0-100)
    “# laps” (0-100)
    “# donuts” (0-110)
    “# megatons” (0-110, interestingly 50 is the biggest spike here, which corresponds to the size of the czar bomb, the largest ever detonated)
    “behind door number #” (0-15)

    As for the code, there should be an option for handling singular numbers. Like “have # cars(car)”, where for 1 you use the word in parenthesis, so “have 1 car”. If it doesn’t already, it would also be nice if it converted numbers to words and searched for those as well, so 25 to twenty five.

  4. March 27th, 2010 at 09:29 | #4 | Konqueror 4.4openSUSE

    Your page doesnt support konqueror. :/

  5. March 27th, 2010 at 16:01 | #5 | Google Chrome 5.0.360.0openSUSE

    @TheBlackCat
    Thanks for suggestions.

    @Robert Riemann
    No, it’s the other way around: Konqueror does not support the page :-)

  1. September 3rd, 2011 at 00:59 | #1 | XML-RPC
or