<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Posts tagged tools  - Entropy and Ecstasy</title><link>http://aaron.maenpaa.ca/blog/tags/tools/</link><description>The most recent ranting and ravings of a madman.</description><lastBuildDate>Sun, 22 May 2016 05:32:35 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>How to change Chrome's User-Agent string (redux)</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/28/how_to_change_chrome_s_user_agent_string_redux/</link><description>&lt;p&gt;As another brief addendum  to a different post (the one about &lt;a class="reference external" href="http://aaron.maenpaa.ca/blog/entries/2010/12/09/how_to_change_chrome_s_user_agent_string/"&gt;changing Chrome's user-agent string&lt;/a&gt;), if you use &lt;a class="reference external" href="http://portableapps.com/apps/internet/google_chrome_portable"&gt;Google Chrome Portable&lt;/a&gt; to masquerade as an iPhone then you can have both a fake-iphone-chrome and a normal-chrome. This is handy for when you want to be able to use the non-iPhone versions of various websites while you're testing.&lt;/p&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/28/how_to_change_chrome_s_user_agent_string_redux/</guid><pubDate>Tue, 28 Dec 2010 13:24:47 GMT</pubDate></item><item><title>Don't Try to Reminplement HTML in your Rectangle of Joy (redux)</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/28/don_t_try_to_reminplement_html_in_your_rectangle_of_joy_redux/</link><description>&lt;p&gt;As a brief addendum to my previous &lt;a class="reference external" href="http://aaron.maenpaa.ca/blog/entries/2010/12/15/don_t_try_to_reminplement_html_in_your_rectangle_of_joy/"&gt;post about HTML&lt;/a&gt;, I just thought I'd point out that &lt;a class="reference external" href="https://www.google.com/webmasters/tools"&gt;Google's Webmaster Tools&lt;/a&gt; work on my phone while Bing's do not.&lt;/p&gt;
&lt;p&gt;Obviously, checking on your website from your phone may not be a core use case (after all, the only reason I know it works on my phone is that I've been travelling and just happened to try it out while away from my &amp;quot;real&amp;quot; computer) but phones and other mobile devices are an increasingly important way people use web applications. Consequently, if your web app lives inside a Flash or Silverlight rectangle you're cutting off an entire class of uses.&lt;/p&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/28/don_t_try_to_reminplement_html_in_your_rectangle_of_joy_redux/</guid><pubDate>Tue, 28 Dec 2010 13:21:11 GMT</pubDate></item><item><title>Don't Try to Reminplement HTML in your Rectangle of Joy</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/15/don_t_try_to_reminplement_html_in_your_rectangle_of_joy/</link><description>&lt;p&gt;I recently signed up for the &lt;a class="reference external" href="http://www.bing.com/toolbox/webmasters/"&gt;Bing Webmaster Tools&lt;/a&gt; and it prompted me to install Silverlight. I thought: &amp;quot;That's kind of weird... I'm pretty sure I've got Silverlight... I mean Netflix...&amp;quot; but I installed it, restarted my browser and... it prompted me to install Silverlight again. Okay, Silverlight doesn't work with the Firefox 4 beta, duely noted. It not working with a Firefox beta is legitimate legitimate. Even if someone in the depths of the bat-cave in Redmond has Silverlight binaries that work against the current Firefox betas, I can see not releasing them until it RC's. I get it, but it's still a lame user-experiance.&lt;/p&gt;
&lt;p&gt;I switched to Chrome, and then the real page actually rendered. Good. I started pokeing around and land on a page with a scroll bar so I tried to scroll down... and nothing happened. I tried again, nothing. I looked closer. The scroll bars are wrong, text selection doesn't work, neither does Ctrl+Click, and the text is just wrong. It's kind of &lt;em&gt;noisy&lt;/em&gt;. At this point that I realize that the whole page is Silverlight rather than just the graphs and fancy bits.&lt;/p&gt;
&lt;div class="section" id="the-take-home-lesson"&gt;
&lt;h3&gt;The Take Home Lesson&lt;/h3&gt;
&lt;blockquote&gt;
Don't try to make you're alien rectangle of joy do what HTML does.&lt;/blockquote&gt;
&lt;p&gt;The second you notice that you're headed down the road of implementing browser features in JavaScript, Flash, Silverlight or whatever, stop, turn around and start heading back, because &lt;strong&gt;here be dragons&lt;/strong&gt;. Don't try to make this work. You're not going to get it right. Microsoft didn't get it right, and they have &lt;strong&gt;way&lt;/strong&gt; more dudes than you. I'll grant you that HTML+CSS+JS might not be the most powerful client-app toolset ever imagined, I mean even getting certain things to even just line up can be a pain, and the siren song of a single place for documentation/tools must be alluring, but you're not going to get it right. Browsers do so much. They are huge pieces of software that that do all kinds of stuff and you're not going to be able to copy the behaviour people care about in any meaningful way (especially since there are ways that the browsers legitimately differ when it comes to things like &amp;quot;What happens when I right-click on a link?&amp;quot;).&lt;/p&gt;
&lt;p&gt;Play to the browsers' strengths. Laying out text? Linking pages togther? Use HTML. Save shelling out to your magical rectangle for things that browser's don't already do well (like rendering interactive 3-D environments :-). Even shelling out to Silverlight to draw graphs is kind of boarderline at this point because &lt;a class="reference external" href="http://code.google.com/p/flot/"&gt;there are&lt;/a&gt; &lt;a class="reference external" href="http://solutoire.com/flotr/"&gt;lots of&lt;/a&gt; &lt;a class="reference external" href="http://www.highcharts.com/"&gt;tools&lt;/a&gt; for drawing charts with JavaScript+HTML at this point and they will almost certainly give you a better result.&lt;/p&gt;
&lt;p&gt;Embrace your platform. Don't try to build around it, lest you end up &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule"&gt;re-implementing it poorly&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/15/don_t_try_to_reminplement_html_in_your_rectangle_of_joy/</guid><pubDate>Wed, 15 Dec 2010 21:22:03 GMT</pubDate></item><item><title>Autotesting QUnit</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/12/autotesting_qunit/</link><description>&lt;p&gt;I was watching a video on &lt;a class="reference external" href="http://blog.envylabs.com/2009/08/corey-haines-performance-kata/"&gt;performance code kata&lt;/a&gt; and I was intrigued by the use of &lt;a class="reference external" href="http://www.zenspider.com/ZSS/Products/ZenTest/"&gt;autotest&lt;/a&gt;. Basically, it's just a tool that watches the filesystem for changes and re-runs your test-suite when stuff changes. I thought it was a neat idea and wanted to try it out, but I don't really write any Ruby. Instead I turned to the world's most popular dynamic language: JavaScript. I've used &lt;a class="reference external" href="http://docs.jquery.com/Qunit"&gt;QUnit&lt;/a&gt; to do some test driven development in JavScript, so tried the simplest thing that could possibly work, a meta-refresh:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;refresh&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;5&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... and that kind of worked. It was kind of cool, but the constant refreshing gets in the way of of using the JavaScript console to poke at things. Which, when you're writing JavaScript, is kind of an important thing to do. So... meta-refresh with a pause button?&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;startPaused&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;autotest=true&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;enable&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;removeAttr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;unbind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;mousemove&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;enable&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;startPaused&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;{title}&amp;quot; id=&amp;quot;auto-refresh&amp;quot;&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;{title}&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;autotest&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;pause&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;prepend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;paused&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paused&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;resume&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;pause&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paused&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;mousemove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;enable&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;


    &lt;span class="nx"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;paused&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;#autotest=true&amp;quot;&lt;/span&gt;
            &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nf"&gt;#auto-refresh&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;float&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;right&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#D2E0E6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="k"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#2B81AF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#2B81AF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;margin-right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;margin-top&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;radius&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;#auto-refresh&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;disabled&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;opacity&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="m"&gt;75&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There you go. Thirty-odd lines to implement meta-refresh a pause button &lt;em&gt;sigh&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It is actually pretty neat. If I used QUnit more and was in a better position to judge the actually usefulness of such a feature I might try hacking this into core QUnit and seeing if I could get it merged upstream. I mean, there are &lt;a class="reference external" href="https://github.com/thatch/autonose"&gt;entire projects&lt;/a&gt; built around adding this kind of functionality to other tools, and it's so easy to do in a browser. I'm not planning on it though, because I've only actually used QUnit for fun-zies, and can't really judge how useful this kind of functionality would be on an actual test suite.&lt;/p&gt;
&lt;div class="section" id="may-i-bring-your-attention-to"&gt;
&lt;h3&gt;May I Bring Your Attention To...&lt;/h3&gt;
&lt;p&gt;One of the cool things I ended up implementing was Chrome-style disable-enable behaviour for the pause/resume button. Basically, as part of the click handler, it disabled the button and attached a &lt;tt class="docutils literal"&gt;mousemove&lt;/tt&gt; event handler on the &lt;tt class="docutils literal"&gt;body&lt;/tt&gt;. The handler then enables the button and &lt;tt class="docutils literal"&gt;unbinds&lt;/tt&gt; itself when a &lt;tt class="docutils literal"&gt;mousemove&lt;/tt&gt; event fires. The cool part is that while the button is disabled and your cursor is over it, moving your mouse doesn't fire any &lt;tt class="docutils literal"&gt;mousemove&lt;/tt&gt; events, but the second your cursor leaves the button, a &lt;tt class="docutils literal"&gt;mousemove&lt;/tt&gt; event fires and the button gets enabled. You get to safely reuse the pause/resume button without worrying about double clicks doing the wrong thing. Pretty spiffy, huh?&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/12/autotesting_qunit/</guid><pubDate>Sun, 12 Dec 2010 09:29:07 GMT</pubDate></item><item><title>How to change Chrome's User-Agent string</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/09/how_to_change_chrome_s_user_agent_string/</link><description>&lt;p&gt;Right now the top result when searching for &lt;a class="reference external" href="http://www.google.com/search?q=changing+chrome+user+agent+string"&gt;changing chrome user agent string&lt;/a&gt; is terrifyingly bad and advocates editing chrome.dll with a hex editor. Don't do that, &lt;em&gt;maybe&lt;/em&gt; it was required in the early days, but current builds support a &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--user-agent&lt;/span&gt;&lt;/tt&gt; paramater. You can just run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;/path/to/chrome --user-agent&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Googlebot/2.1 (+http://www.google.com/bot.html)&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... 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.&lt;/p&gt;
&lt;div class="section" id="masquerading-as-the-iphone"&gt;
&lt;h3&gt;Masquerading as the iPhone&lt;/h3&gt;
&lt;p&gt;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):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;chrome.exe --user-agent&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+&lt;/span&gt;
&lt;span class="s2"&gt;                         (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... look-at-me, I'm the iPhone. Yay!&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/09/how_to_change_chrome_s_user_agent_string/</guid><pubDate>Thu, 09 Dec 2010 19:55:57 GMT</pubDate></item><item><title>die Frequenz der Blog</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/07/die_frequenz_der_blog/</link><description>&lt;div class="section" id="post-frequency-by-month"&gt;
&lt;h3&gt;Post Frequency by Month&lt;/h3&gt;
&lt;img alt="/blog/entries/2010/12/07/die_frequenz_der_blog/by_month-6c41c7b46f47.min.png" src="/blog/entries/2010/12/07/die_frequenz_der_blog/by_month-6c41c7b46f47.min.png"/&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="histogram-of-post-frequency"&gt;
&lt;h3&gt;Histogram of Post Frequency&lt;/h3&gt;
&lt;img alt="/blog/entries/2010/12/07/die_frequenz_der_blog/by_count-103df219d0cf.min.png" src="/blog/entries/2010/12/07/die_frequenz_der_blog/by_count-103df219d0cf.min.png"/&gt;
&lt;p&gt;... 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.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="making-tufte-proud"&gt;
&lt;h3&gt;Making Tufte Proud&lt;/h3&gt;
&lt;p&gt;I used &lt;a class="reference external" href="http://code.google.com/p/flot/"&gt;flot&lt;/a&gt; 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 &lt;em&gt;stuff&lt;/em&gt; to your plots which reduces the percentage of pixels in your plot that convey data (&lt;a class="reference external" href="http://www.amazon.com/Visual-Display-Quantitative-Information-2nd/dp/0961392142/"&gt;data ink&lt;/a&gt;). 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:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;#plot&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;bars&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;show&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;grid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;backgroundColor&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;#ffffff&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;borderColor&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;#ffffff&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;tickColor&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;#ffffff&amp;quot;&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;yaxis&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ticks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/07/die_frequenz_der_blog/</guid><pubDate>Tue, 07 Dec 2010 21:44:28 GMT</pubDate></item><item><title>New Computer, New Tools (GCC on Mac OS X)</title><link>http://aaron.maenpaa.ca/blog/entries/2010/11/11/new_computer_new_tools/</link><description>&lt;p&gt;I recently traded in my two-and-a-half year old MacBook for a sexy new 13.1 inch MacBook Pro. It's pretty much the base model plus a 128 SSD, 'cause I read somewhere that SSDs are &lt;a class="reference external" href="http://www.codinghorror.com/blog/2010/09/revisiting-solid-state-hard-drives.html"&gt;&amp;quot;... the most cost effective performance increase you can buy... &amp;quot;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have to say, it's pretty awesome. Thanks to the migration assistant Chrome and Firefox were already there, Pandora and Gmail already knew who I was: It was pretty much a drop-in replacement for my old computer, except faster an shinier. &amp;quot;Pretty much&amp;quot; is kind of the operative phrase there. I did have to reinstall GCC, and that was a pain. Y'see, the entire reason I use a MacBook is because Mac OS X is a *nix with a pretty, consistent, GUI. I'm a build-from-source kind of guy, so I need a C compiler on my laptop, and getting that compiler onto my MacBook was way harder than it ought to be.&lt;/p&gt;
&lt;p&gt;Here's what setting up a build environment on Ubuntu (my other *nix of choice) looks like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;sudo apt-get install build-essential
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;One command that I can type from memory&lt;a class="footnote-reference" href="#id2" id="id1"&gt;1&lt;/a&gt; and a little bit of waiting. Contrast that with what you need to do to get GCC on Mac OS X:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Register as a developer at &lt;a class="reference external" href="http://developer.apple.com/"&gt;http://developer.apple.com/&lt;/a&gt; which includes explaining whether your interested in building iPhone apps, iPad apps or iPhone apps.&lt;/li&gt;
&lt;li&gt;Download Xcode, which is like 3 Gigs (keep in mind, I have an SSD, it's teeny). This took all. Frigging. Day. I don't know if it was Verzion, or Apple or both, but some router, somewhere was conspiring to keep me from getting my C compiler in a timely fashion.&lt;/li&gt;
&lt;li&gt;Install Xcode and remembering to not install the iOS environment which takes up like 8 Gigs (SSD!). You can't just install GCC, you &lt;em&gt;have&lt;/em&gt; to install Xcode (a development environment I will never use, I have Vim after all) so there goes 2 Gigs I'll never get back.&lt;/li&gt;
&lt;li&gt;You now have a C compiler, and can now checkout and build &lt;a class="reference external" href="http://clang.llvm.org/"&gt;clang&lt;/a&gt; from source.&lt;/li&gt;
&lt;li&gt;You now have not one, but two C compilers. All is right in the world. (Okay, so that last step is superfluous, but, who doesn't want a C compiler they built themselves from source?)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So that's only a days worth of downloading and a multi-gigabyte install so that I can compile &amp;quot;Hello World&amp;quot;: &lt;a class="reference external" href="http://www.imdb.com/title/tt0367279/quotes?qt0386330"&gt;Come on!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now the reality is, the last time I had to do this was two and a half years ago, and if my computer only annoys me enough to write about it once every couple of years, I'm doing pretty good.&lt;/p&gt;
&lt;table class="docutils footnote" frame="void" id="id2" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label"/&gt;&lt;col/&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#id1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;The package might actually be named build-essentials, but since Ubuntu's apt-get auto-completes package names, you just have to type build-^TAB and you get the right thing.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/11/11/new_computer_new_tools/</guid><pubDate>Thu, 11 Nov 2010 23:28:09 GMT</pubDate></item><item><title>New Location, New Tools (redux)</title><link>http://aaron.maenpaa.ca/blog/entries/2010/11/03/new_location_new_tools_redux/</link><description>&lt;p&gt;Two years ago I posted that I had &lt;a class="reference external" href="http://aaron.maenpaa.ca/blog/entries/2007/12/09/new-location-new-tools/"&gt;moved my blog from Blogger to some django based thing&lt;/a&gt;. Recently, I've moved to a different, even more custom, system. In the intervening time, I've written precisely fourteen and one-half blog posts. You may be thinking to yourself: &amp;quot;Surely, that means you spend more time working on your blog's software than actually, y'know, blogging&amp;quot;. You would be right, it just turns out that I happen to like it that way.&lt;/p&gt;
&lt;p&gt;The new engine is based around the idea of having all of the blog posts stored as &lt;a class="reference external" href="http://docutils.sourceforge.net/rst.html"&gt;reStructuredText&lt;/a&gt; documents and then generating all of the indexes/feeds/etc. as a build step producing a bunch of static HTML. This has a couple of neat effects:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;The entire state of my blog can be stored in &lt;a class="reference external" href="http://mercurial.selenic.com/"&gt;version control&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I can do all of my editing using my favourite &lt;a class="reference external" href="http://www.vim.org/"&gt;text editor&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I can do silly things like running &lt;a class="reference external" href="http://optipng.sourceforge.net/"&gt;OptiPNG&lt;/a&gt; over every single image as a build step.&lt;/li&gt;
&lt;li&gt;I can say: &amp;quot;My blog software is &lt;a class="reference external" href="http://nginx.org/"&gt;nginx&lt;/a&gt;&lt;a class="footnote-reference" href="#id2" id="id1"&gt;1&lt;/a&gt;.&amp;quot;&lt;/li&gt;
&lt;li&gt;It has the highest &lt;a class="reference external" href="http://developer.yahoo.com/yslow/"&gt;YSlow&lt;/a&gt; score of anything I have ever worked on.&lt;/li&gt;
&lt;li&gt;It has a development server (for realz).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those might sound like the sort of the features that only a programmer could love, well it just so happens that I an one. Sure, this probably only works because (including the post about changing tools) I've only got something like fifteen and two-thirds blog posts, but it all makes more sense if you think of the blog posts I write as cleverly disguised unit tests for whatever blog software I'm working on at the time &lt;tt class="docutils literal"&gt;;)&lt;/tt&gt;&lt;/p&gt;
&lt;table class="docutils footnote" frame="void" id="id2" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label"/&gt;&lt;col/&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#id1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;It isn't actually. I use &lt;a class="reference external" href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt; just like everybody else. nginx just sounds cooler.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/11/03/new_location_new_tools_redux/</guid><pubDate>Wed, 03 Nov 2010 21:40:33 GMT</pubDate></item><item><title>New Location, New Tools</title><link>http://aaron.maenpaa.ca/blog/entries/2007/12/09/new-location-new-tools/</link><description>&lt;p&gt;I have moved &lt;a class="reference external" href="http://entropy.crimzon.ath.cx/"&gt;Entropy and Ecstasy&lt;/a&gt; from it's
previous home on blogger to a new custom blogging application written using
&lt;a class="reference external" href="http://www.djangoproject.com/"&gt;django&lt;/a&gt; and &lt;a class="reference external" href="http://code.google.com/p/coltrane-blog/"&gt;coltrane&lt;/a&gt; the undocumented and unsupported blogging application for django.&lt;/p&gt;
&lt;p&gt;The new application provides one key benefit: It allows me to mark up articles
using &lt;a class="reference external" href="http://docutils.sourceforge.net/rst.html"&gt;reStructuredText&lt;/a&gt;. I was getting really fed up with the rich text editor (RTE) that blogger uses. I kept finding myself needing to switch into html mode to achieve the effects that I wanted, but when I switched back to using the RTE, it would freak out.&lt;/p&gt;
&lt;p&gt;Additionally, using this custom application gives me a great deal more control over the layout of the blog than was possible using blogger.  Granted, I lose some of the ready made functionality available to blogger users, but many of the cool things that blogger offers are implemented and just need to be plugged in. For example, I have already started tagging my posts, but I haven't decided how to display the tags just yet.&lt;/p&gt;
&lt;p&gt;Finally, (while this may seem like a disadvantage to those who just want to sit down and start publishing) the new tool chain let's me hack the pieces that don't work quite right.  I like tools that let me fool around with the internals, so even if the tools are not polished to perfection just yet, with time I will be able to make them fit my work-flow.&lt;/p&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2007/12/09/new-location-new-tools/</guid><pubDate>Sun, 09 Dec 2007 13:48:10 GMT</pubDate></item></channel></rss>