Hacker News new | past | comments | ask | show | jobs | submit login
Frequency (xkcd.com)
274 points by jaimebuelta on Feb 17, 2014 | hide | past | web | favorite | 82 comments

Almost two years ago the "The Pulse of Spain" was made, based on the same idea (disclaimer: the designers of this are also designers for our product (and dear friends)).

It's in Spanish, unfortunately. You have to click on the tiles to activate them and they'll start pulsating. If you have Flash, there'll be sound.

The link is:


The use of the sound is very interesting, since it seems to allow to create loops.

This is awesome. It came up with some cool rhythms as well. Nicely done, kudos to your friends.

Thus far I have seen every gif blink except, for someone hits a hole-in-one, earthquake 4 and old faithful erupts.

I'm tempted to open the gifs and check the frequency.


I have looked at GIF format: http://www.onicos.com/staff/iz/formats/gif.html

Then I opened the image with fhread and found the offset for the delay time. Look for: Delay Time (1/100ths of a second). ( Since the delay time has only 2 bytes reserved that means the max delay would be 65535. That is why some gifs have more frames than the other, when by logic all would need to have the same count )

Then I opened the image with photoshop which shows every frame on a separate layer.

Then you just multiply the delay with the number of frames.

I got the ratio of 3786.72 to 1 for earthquake-1 to earthquake-4. e1 is about ~3s so that would make e4 occur every ~3 hours.

The ratio should be correct. But my seconds calculation was off by a factor of 4 for some reason. Maybe I missed some format specific stuff. You can try it for the rest of the GIFs if you want.


A very quick estimate, looking in the other files:

hole-in-one: ~50 minutes

old faithful erupts: ~4 hours

Wiki says 45 to 125 minutes. http://en.wikipedia.org/wiki/Old_Faithful

  for i in *.gif; do eval "print -f '%-21s %7.2fs\n' $i \$(($(gifsicle --info $i | sed -n -e 's/.*delay \(.*\)s/\1/p' | tr '\n' +)0))"; done
Assumes a shell that does floats, i.e. not bash.

  amelia.gif               7.79s
  bieber.gif               4.73s
  bike.gif                24.93s
  birth.gif                0.24s
  book_mockingbird.gif    42.05s
  bottles.gif              1.27s
  car_china.gif            1.89s
  car_elsewhere.gif        1.03s
  car_germany.gif          5.80s
  car_japan.gif            4.01s
  car_us.gif               6.95s
  cat.gif                 21.30s
  cat_mockingbird.gif      1.82s
  death.gif                0.56s
  denverpizza.gif          1.27s
  dog.gif                 15.60s
  dogbite.gif              7.01s
  domain.gif               0.64s
  eagle.gif                2.69s
  earthquake1.gif          2.43s
  earthquake2.gif         24.26s
  earthquake3.gif        242.60s
  earthquake4.gif       2426.00s
  facebook.gif             4.32s
  fire_dept.gif           23.00s
  flight.gif               0.93s
  heartbeat.gif            0.86s
  holeinone.gif          180.00s
  house.gif                6.22s
  iphone.gif               0.93s
  keys.gif                 2.43s
  kiss.gif                 5.53s
  littleleague.gif         1.23s
  meteor.gif               1.15s
  ndsex.gif                1.38s
  oldfaithful.gif       5640.00s
  parliament_toilet.gif   10.06s
  phoenix.gif              2.05s
  phoenixshoes.gif         1.08s
  pulsar.gif               1.40s
  recycled.gif             4.64s
  shark.gif                0.83s
  tattoo.gif               2.06s
  turnsignal1.gif          0.94s
  turnsignal2.gif          0.90s
  us_cancer.gif           18.99s
  us_cancer_death.gif     54.34s
  vibrator.gif             2.99s
  wedding.gif              0.75s
  wikipedia.gif            0.67s

Here is the relative frequency:

    oldfaithful.gif           1
    earthquake4.gif           2.3
    earthquake3.gif          23.2
    holeinone.gif            31.3
    us_cancer_death.gif     104
    book_mockingbird.gif    134
    bike.gif                226
    earthquake2.gif         232
    fire_dept.gif           245
    cat.gif                 265
    us_cancer.gif           297
    dog.gif                 362
    parliament_toilet.gif   561
    amelia.gif              724
    dogbite.gif             805
    car_us.gif              812
    house.gif               907
    car_germany.gif         972
    kiss.gif               1020
    bieber.gif             1192
    recycled.gif           1216
    facebook.gif           1306
    car_japan.gif          1406
    vibrator.gif           1886
    eagle.gif              2097
    earthquake1.gif        2321
    keys.gif               2321
    tattoo.gif             2738
    phoenix.gif            2751
    car_china.gif          2984
    cat_mockingbird.gif    3099
    pulsar.gif             4029
    ndsex.gif              4087
    bottles.gif            4441
    denverpizza.gif        4441
    littleleague.gif       4585
    meteor.gif             4904
    phoenixshoes.gif       5222
    car_elsewhere.gif      5476
    turnsignal1.gif        6000
    flight.gif             6065
    iphone.gif             6065
    turnsignal2.gif        6267
    heartbeat.gif          6558
    shark.gif              6795
    wedding.gif            7520
    wikipedia.gif          8418
    domain.gif             8813
    death.gif             10071
    birth.gif             23500

You can take any tool that can process .gif.

The fun part is doing it yourself and learning something in the progress. I downloaded a .gif editor, but decided to not use it.

So simple, so unreadable, but so perfect.

Or you could just cheat and go to http://www.explainxkcd.com/wiki/index.php/1331 but yes that takes away some of the fun :-)

The GIMP (http://gimp.org) is very handy for editing animated GIFs. Each frame is loaded as a layer, with the frame's duration appended to the layer name.

oldfaithful.gif has a 93.9 minute delay (8 655 second frames, plus a 392 second one). Which is about right.

(ImageMagick's identify program outputs the frame delays when you give it -verbose. Units are hundreths of seconds.)

Yeah, how do you do that? I saved the gif and opened it in apple preview which show the frames but not the frame rate. Photoshop perhaps?

On the Mac, GraphicConverter[0] has been my go-to app for this kind of random graphic stuff since the mid-90's (wow, it's a 22 year old app now!). "Movie Information" in the windows menu says there's a 300 second period on the Old Faithful GIF.

[0] http://www.lemkesoft.de/en/products/

That would be far too high a rate. Old Faithful erupts approximately every 90 minutes, or 5400 seconds (though it can vary quite a bit -- 45 - 125 minutes):


I love how this XKCD guy has always new and interesting views on the world.

He must have a really rich inner life.

And I'd like to thank him for sharing his insights with us regularly.

I was lucky enough to see Randall Munroe speak at the OreDev conference last year. The video is online, highly recommended for XKCD fans:


The audio appear to be subtly broken, with audio moving between left and right channels. Somebody should convert the audio to mono, and upload the video again. :-)

Set your speakers to mono.

Thank you for the link. I wonder if Tinker Tots is now having a surge of traffic.

Surprised me that he hadn't been to Europe before then.

That was brilliant, thank you!

I'm struck by the PSR J1748-2446ad...

How can something with twice the mass of the sun spin a thousand times a second. An equator speed of 24% light speed...

The Universe is so strange...

Once upon a time it was a giant star that rotated once every dozen or two hours. Eventually it ran out of fusible material, and gravity pulled it all in until it became solid neutronium.

Most of the angular momentum stayed with the core, and there you are.

And sufficiently dense that the composition of matter inside is fundamentally different, consisting mainly of neutrons, unstable at ordinary pressure.

The radius of neutron stars is measured in small multiples of the Swarzschild radius for the mass of the star. That is, the radius at which the star would become a black hole.

I highly recommend Dragon's Egg, a hard sci fi novel by Robert L. Forward, as well as its sequel, Starquake, for anyone wanting to expand their mind with a fascinating portrayal of neutron star physics, dealing with the hypothetical possibility of life on their surfaces. The relative physical scales of time, space, velocities and forces are mind-boggling compared to our normal intuition.


Because preservation of angular momentum and gravity plus sub atomic forces and centrifugal force plus mass increases due to relativistic effects balance out roughly there for this star. Much more mass would create a black hole.

Without further inquiry I will assume your answer as correct. That said, I do believe her/his question was more of affordance and less about the particular mechanism. At least that is the way I took. A sort of "How peculiar of a place our universe is to allow such phenomenon."

well, obviously...


It should be noted how it's done, they are a bunch of individual gifs with different cyclic times. Genius.

I actually viewed the comic on a feed reader, and didn't know about the flashing images 'til I read this comment. So, thanks!

See my response to gkya's complaint about his feed reader. Firefox includes an odd feed reader called Live Bookmarks. It almost certainly works differently from your feed reader, and implies a different "workflow."

One thing it does nicely is display things properly, because it (the "reader") doesn't display anything at all, it just points to an updated feed. When you follow the link, it just goes to the page and displays it like any other page.

I haven't seen a single comment about the turn lights gifs.

that's something that always intrigued me. why mine and the one from the car in front of me never matches? I wonder if there's a reasonable explanation other then "by chance".

It's chance.

Even two cars of the same type never seem to match up. They will often sync for a while, but then gradually get out of synch until they are 180 degrees different.

I suppose it is down to minute differences in lighting circuits, bulbs and all sorts of other things.

Somewhere out there is a population of cars with the same exact turn signal frequency as yours. But the chances of you stopping behind it at a set of lights while you are both signalling to turn and noticing are very, very small.

I believe it's by design. Differing indicator frequencies make the signals more noticeable.

Back in the old days, turn signals were actuated by bimetallic thermal relays - a simple and highly reliable device. They were constructed with a range of frequencies by manufacturers and sold mixed together, so cars might receive the same part number but with an essentially random on/off period. This part would also mechanically create the familiar clicking sound of a turn signal actuating.

These days indicators are controlled electronically and I assume the randomness is programmed in.

That's interesting and kinda funny since you still get the familiar clicking sound when your turn signal is on I can only assume that this sound is made artificially. It immediately reminded me of the fact that computer keyboards are naturally silent but they engineer in "clicky" sounds. This was very important in the old days when people were transitioning away from type writers and were accustomed to the audio feedback. Now we still have this, but keyboards are a lot quieter these days.

There are keyswitches that do click naturally, e.g. buckling spring keyswitches [1]. And it might be subjective, but I type faster with audible feedback, even though it can drive other people in the flat nuts.

[1] http://en.wikipedia.org/wiki/Buckling_spring

They are intentionally made to be different, even on the same kind of car. I think the circuits used to be made with high-tolerance (high-variability) capacitors to make sure they would come out differently. But now it's all computerized, and in fact I think they are programmed to drift a bit faster and a bit slower as they run!

Old hazard lights, like the ones in rows along construction sites, used to blink more-or-less in time despite not being manually synced. The lightbulb itself would act as a weak photo-diode, so when a neighboring light was on, it took a minutely smaller time to charge the circuit. Eventually they would sync up :)

I think the sync is based on firefly physiology. Logo simulation: http://education.mit.edu/starlogo/samples/firefly.htm

I don't really know, but I guess it's because they used to use mechanical switches with bimetallic strips, that vary their time with temperature. Nowadays computers probably control all those aspects, so I think new cars' frequencies will match, especially if they're the same model.

In my opinion, that is a joke on the apparent Doppler effect. The car in front of you is making a turn, and thus you are ( probably )moving towards it. The real difference is much lower.

It's a reference to this: http://xkcd.com/165/

The first time I loaded the page each of the gifs would appear spaced a few seconds apart. So the table kept loading and adding rows and I could read each one as it was added. The requests are still being initiated 1m after initial page load.

That was a great effect, prolonging the initial experience. Its important in UI to pay attention to the time element - how the experience progresses for the user as they explore.

Now they are all in the cache so they appear right away. You have to clear cache to get the initial effect again.

Thanks, I thought that was just my slooooow network.

I looked at the code but still didn't find anything that deliberately schedules them like that. but they are just IMG tags.

Best xkcd in ages, really interesting, and just beautiful to watch.

My stupid RSS reader showed this to me as a single, static image. I wouldn't see it in animation if it wasn't posted here, so thanks a lot for posting!

It's not your reader. The feed just contains a single, static PNG image.

Firefox has an odd RSS reader, called Live Bookmarks, which leverages the browser's bookmarks feature. I use it to access my tab categories in pinboard; each tab has an RSS feed, and each combination of tabs has an RSS feed.

When you click on a feed to subscribe, it places the feed in the bookmark system and when you see it in your bookmarks it shows an RSS icon.

To see what happens with this XKCD, I cleared my cache and history and everything, then subscribed to the feed, then clicked on the latest entry in that feed, Frequency.

It was interesting to watch it develop. It starts as a grid of elements, each displaying the word FREQUENCY. (You can see the same effect by forcing a reload of the page, but I wanted to see how Live Bookmarks would display the page, hence the tedious trip report to this point).

Each element's gif gets turned on row by row and (I think) column by colum. The first row is turned on immediately, the second soon after, and the rest of the FREQUENCY elements are transformed into animated gifs little by little, row by row.

If I close the tab and come back to it, they're all animating right away.

So that's how Firefox Live Bookmarks RSS reader handles this page.

Side note: some of you will have seen the effect of transforming from a grid of FREQUENCY elements to animated GIFS right away when you viewed the page. Others, like me, might never have seen it. I'm one of those people who queues up a handful of tabs to read, and then goes through the tabs one by one. By the time I got to my Frequency tab it had already gone through its transformation.

Can't help but feel that those damn North Dakotans should get out of bed and go adopt a Dog.

Alternatively... Amelia - Put away the Pepsi Max, and save a kitty.

I just realized that comic 1337 is near. :)

That's a lot of babies. And a disconcerting number of deaths as well. I'm also surprised the number of mocking birds getting killed by cats isn't that far from the number of humans dying.

The birth gif blinking faster than the death gif encompasses most of the problems in the world.


Some huge war, plague, or famine is your most likely bet for getting the death rate up. I don't think anyone's pining for that though.

Despite having more people than it's ever had, there is less poverty and disease in the world than at any other time since we started keeping track.

http://annualletter.gatesfoundation.org/ does a good job debunking the myth that things are always getting worse all the time.

There has never been a better time to be alive.

Who's talking about getting the death rate up? What about lowering the birth rate?

And don't get me started on Bill Gates' bullshit arguments. These are long-term trends, his recent "it's been getting better! (for the last 40 years)" cannot be extrapolated over the next centuries.

Bill Gates' "bullshit" is backed by research which you could rebut if you cared to do so.

The world currently produces enough food for 11 bn people. World population is expected to expand to about 9 bn in the middle of this century. This is using current production techniques.

I don't think overpopulation is responsible for most of the world's problems and in fact I think death is the biggest problem we have. The increase in population over the last few hundred years correlates with our massive increase in technology and industry.

Those iPhone screens are pretty fragile, it seems.

There are quite many of them which also raises the frequency of one breaking.

I'm having some trouble with this. The blinks look to be about 1 per second. If that's accurate, it means 31.5 million/year.

In 2013, Apple sold ~150 million iPhones. 21% rate of screen breakage?

The divisor should probably be the total installed base, i.e. all active iPhones in use, rather than one year's sales.

That doesn't seem unreasonable. I find it rare to see an iPhone with its screen intact.

Every little league player that strikes out has a parent that breaks their phone in anger? Would account for 2/3 of them..

Until you compare to, say, a Nexus 4 backside.

Reminds me of this Usenet Oracle response from 1990: http://cgi.cs.indiana.edu/~oracle/bestof.cgi?N=101-125#102-0...

I'd love to know where he's getting the data for these.

I think a lot of the data for these is in Wikipedia.

That star must be dizzy!

I have always been amazed by the fact that the 2004 tsunami in Indian Ocean (227'000 deaths) cancelled the global human growth of one day...

Enlightening link, thank you for posting.

reading this in my RSS reader i didn't understand it all. Seems like it couldn't show the GIFs correctly. On the web site I finally understand it.

Properly displaying animated GIFs seems to be an "advanced feature". I have seen a lot of apps that are not able to do it properly. I guess it depends on the render engine they use to display images...

In this case it's the RSS feed itself, not the reader. The image in the feed is just a static PNG:


Which did somewhat confuse me as well until I looked at the actual website.

Some people who started browsing the web back in the days of GeoCities also reflexively disable GIF animation in their browser preferences.

As far as I'm concerned, displaying animated GIFs is a bug not a feature (its use here notwithstanding), and I'd report it as one if I thought the Chrome team would take bug reports from the likes of me, so if your viewer doesn't have that bug, be happy!

Lots of apps implicitly put images in a "never changes after the initial render" category. Retrofitting what is effectively a movie format into that can be interesting.

Its not HTML5 video. Shame.

Does anyone know enough about I-frame frequency limits in H.264 or WebM to tell us weather Randall could have included the pitch drop experiment?

Now, that is fun. Made the morning a bit more thoughtful.

Somehow it gives me the (obviously mistaken) impressions that people have sex in North Dakota in the time it takes the gif to blink and that people in Phoenix put condoms on but aren't then having sex but are perhaps doing something with those new shoes.

Looks like there's scope for a startup or two around vibrators with the size of that market.

average frequency

Insightful as always, XKCD.

I'm a little surprised at the number of sharks being caught.

Watching this while listening to electronic music is priceless btw.

Someone's pet cat kills a mockingbird with a rate around 1/3.5 of "one death".

I don't think we nearly have enough mockingbirds (or pet cats) on our planet by three orders of magnitude.

Or is the birth rate of mockingbirds substantially higher than you suspect?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact