How to change Chrome's User-Agent string

Right now the top result when searching for changing chrome user agent string is terrifyingly bad and advocates editing chrome.dll with a hex editor. Don't do that, maybe it was required in the early days, but current builds support a --user-agent paramater. You can just run:

$ /path/to/chrome --user-agent="Googlebot/2.1 (+http://www.google.com/bot.html)"

... and impersonate any user agent you can think of. I mean yeah, running my browser from the command line isn't something I do a lot either, but it's a whole lot easier, and less likely to fail spectacularly, than editing a shared library with a hex-editor.

Masquerading as the iPhone

I set up a short cut (yes, I do use Windows at work), that put Chrome into pretending-to-be-the-iPhone-mode and gave it the yellow Chrome icon so that I can easily start up an appropriately configured Chrome session (Still easier than modifying a DLL with a hex-editor):

chrome.exe --user-agent="Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+
                         (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3"

... look-at-me, I'm the iPhone. Yay!

Visualizing Mortality

The Freakonomics blog posted a really cool video about visualizing the mortality rate over time. It's really cool. You should check it out.

A Personal Timeline

/blog/entries/2010/12/08/a_personal_timeline/by_month-3c606e2a54a3.min.png

Where I've lived and what I've worked on over the last three years in oh-god-my-eyes-they-bleed inducing freehand (It turns out that combining my not-particularly-good handwriting with a sub-par tablet is not a good idea).

die Frequenz der Blog

Post Frequency by Month

/blog/entries/2010/12/07/die_frequenz_der_blog/by_month-6c41c7b46f47.min.png

This nicely illustrates that my blogging attention span is kind of bursty. There is a cluster of posts during the first half of 2008, another one in the first half of 2009 and then a giant dead spot from the middle of 2009 until last month. It's actually kind of funny that pretty much all of my blog posts have been written in tree bursts of attention separated by big swaths of neglect.

Histogram of Post Frequency

/blog/entries/2010/12/07/die_frequenz_der_blog/by_count-103df219d0cf.min.png

... and the runaway winner is zero! Mostly explained by the fact that there have been streches of five or six months where I haven't posted a single thing (like, for instance, the first half of 2010). November 2010 deserves special mention as it is a crazy outlier on the the complete other end of the scale with four more posts then then next most prolific month.

Making Tufte Proud

I used flot to generate the histograms and while it does a good job at producing nice looking graphs it has the annoying habit of adding lots of stuff to your plots which reduces the percentage of pixels in your plot that convey data (data ink). It took a surprising amount of fiddling to turn off all of the exta stuff, most of which was accomplished by setting the color of the grid lines and frame to white:

$.plot($("#plot"), [data], {
    bars: {show: true},
    grid: {
        backgroundColor: "#ffffff",
        borderColor: "#ffffff",
        tickColor: "#ffffff"
    },
    yaxis: { ticks: 0 }
});

s/the Combine/the combine harvester/g

A combine harvester.

Image Credit: kenny_lex

I have come to the realization that Half-Life 2 is a whole lot funnier if you mentally add in "harvester" whenever anyone mentions "the Combine":

Alyx: Dr. Freeman I presume? We better hurry, the combine (harvester) can be slow to wake, but once it is up you will have a hard time taking it down.

A letter: Dear Dr. Breen. Why has the combine (harvester) seen fit to suppress our reproductive cycle? Sincerely, A Concerned Citizen.

Citizen: We better hurry, we have to tear down this camp before the combine (harvester) gets here.

Aylx: We know all about you and Breen. You have been a spy for the combine (harvester) the whole time.

Gordon Freeman, the MIT graduated theoretical physicist hero-protagonist, saving the world from enslavement by a piece of anthropomorphized farming equipment.