<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Legends of the Sun Pig: Blog entries</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/" />
    <link rel="self" type="application/atom+xml" href="http://www.sunpig.com/martin/feeds/blog-atom.xml" />
    <id>tag:www.sunpig.com,2008-02-11:/martin//2</id>
    <updated>2010-08-11T22:02:09Z</updated>
    <subtitle>Legends of the Sun Pig:  Martin Sutherland&apos;s weblog</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.02</generator>

<entry>
    <title>Why each CSS property should have its own line</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/08/11/why-each-css-property-should-have-its-own-line.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2254</id>
    
    <published>2010-08-11T21:48:47Z</published>
    <updated>2010-08-11T22:02:09Z</updated>
    
    <summary>A few months ago, Arjan Eising (@arjaneising) tweeted a quick poll about CSS formatting: CSS Poll: do you place your CSS properties on one line per selector (compact), or do you use one line per CSS property (expanded)? To put it another way, expanded is: .monkey { background:#fff url(/images/monkey-bg.png) repeat-x...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>A few months ago, Arjan Eising (<a href="http://twitter.com/arjaneising">@arjaneising</a>) tweeted a quick poll about CSS formatting:</p>

<blockquote cite="http://twitter.com/arjaneising/status/13295633596"><p>CSS Poll: do you place your CSS properties on one line per selector (compact), or do you use one line per CSS property (expanded)?</p></blockquote>

<p>To put it another way, expanded is:</p>

<div style="overflow:scroll;width:100%">
    <code class="css"><pre style="whitespace:nowrap">
        .monkey {
            background:#fff url(/images/monkey-bg.png) repeat-x 0 0;
            border:1px solid #fde;
            display:block;
            font-size:123.1%;
            margin:1em;
            text-transform:uppercase;
        }
    </pre></code>
</div>

<p>compact is:</p>

<div style="overflow:scroll;width:100%">
    <code class="css"><pre style="whitespace:nowrap">
        .monkey {background:#fff url(/images/monkey-bg.png) repeat-x 0 0;border:1px solid #fde;display:block;font-size:123.1%;margin:1em;text-transform:uppercase;}
    </pre></code>
</div>

<p>I replied:</p>

<blockquote cite="http://twitter.com/sunpig/status/13318716982"><p>Expanded. Compact only works if you're the only person maintaining it &amp; don't use source control. Otherwise, it's stupid.</p></blockquote>

<p>Now, I feel the need to defend this statement, because "stupid" is an emotive word, and it's not one I use lightly. The nicest thing a colleague has ever said about me was that I "express strong opinions without threatening to break your fingers," and calling something "stupid" is about as close to violence as I get.  (Unless you get me started on RyanAir...but that's another story.)</p>

<p>The first thing to notice about my comment is that it's qualified:  <em>if</em> you are the only person working on your CSS code, <em>and</em> you don't use source control, then fine. Knock yourself out. Write the code however you want. Use single-letter class names for all I care. <i>(Because they're shorter and save bytes! But only lowercase single-letters because they <a href="http://www.websiteoptimization.com/speed/tweak/lowercase/">compress better</a>!)</i>  They key point is: you're not harming anyone else.</p>

<p>But: if you use source control, that shows you care about <em>before</em> and <em>after</em> and the ability to keep a history of what's going on with your code.  Source control is all about <em>changes</em> between once version and the next, and no matter whether you are using a side-by-side or inline viewer to see the differences between two revisions, a shorter line length makes it easier to visually identify those differences.</p>

<p>Viewing differences becomes even more important as soon as there is more than one person working on the code, because you will be looking at the changes that other people make.  The <em>change</em> between two revisions can often give you more information about the <em>reason</em> for a change than the new code can give you on its own. When it comes to maintaining a piece of software over a non-trivial lifetime, change tracking is <em>vital</em> to understanding both the codebase itself, and the underlying (business) requirements.</p>

<p>See, it's not the readability of long lines in themselves that I question (<a href="http://www.viget.com/advance/the-line-length-misconception/">research is vague</a>, but I'm comfortable saying that 200-character lines help no-one); I'm more concerned about the secondary problem of being able to <em>manage and understand changes</em> in those lines over the long term and/or in a coding environment where you're not the only contributor.</p>

<p>The best way to do this is to write each property on a single line.  Writing single-line CSS rules <em>harms maintainability</em>, which is a bad thing.  There is no <em>technical</em> reason to prefer compact CSS over expanded CSS (<a href="http://sunpig.com/martin/archives/2009/12/29/javascript-rule-1.html">rule 1</a> applies to CSS as well as JavaScript), so the reason for writing single-line CSS is a personal preference.  In my mind, it's up there with smoking.</p>

<p>Okay, maybe not that bad.  Most CSS won't give you cancer.  But I'm going to stick to my original assessment of "stupid".  I won't break your fingers, but I will swear a lot while reading your code.</p>

<p>That said, there is an <em>editability</em> (as opposed to readability) argument to be made against long lines as well.  This comes down to <a href="http://particletree.com/features/visualizing-fittss-law/">Fitts' Law</a>:  if each property is on its own separate line, when you want to hit that property with your mouse pointer, you're aiming for a much wider target than if the property is nestled somewhere in the middle of a single long line, as shown in the image below:</p>

<img src="http://sunpig.com/martin/images/2010/08/fitts-line.png" />

<p>And if you prefer to use the keyboard, it takes fewer keystrokes to navigate and manipulate multi-line CSS than the single line versions.  (Unless, of course, you use emacs, in which case <a href="http://xkcd.com/378/">there's probably already a command</a> to insert all those border-radius properties you wanted you to add.)</p>

<h4>Further reading:</h4>
<ul>
    <li>Yay! <a href="http://neutroncreations.com/blog/single-line-vs-multi-line-css-plus-textmate-tips/">Single-Line vs Multi-Line CSS, plus TextMate tips</a></li>
    <li>Boo! <a href="http://orderedlist.com/our-writing/blog/articles/single-line-css/">Single Line CSS</a></li>
</ul>]]>
        
    </content>
</entry>

<entry>
    <title>Radio Sunpig 2009: Thicker Ice</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/08/07/radio-sunpig-2009-thicker-ice.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2252</id>
    
    <published>2010-08-07T22:14:38Z</published>
    <updated>2010-08-07T22:36:08Z</updated>
    
    <summary>Reading about playlists this afternoon reminded me that I still hadn&apos;t posted Radio Sunpig 2009...and it&apos;s August of 2010 already. (Nothing new there, then.) But I can honestly say that I finalized the playlist itself at the beginning of January, and the artwork shortly thereafter. I even issued a couple...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>Reading about <a href="http://musicmachinery.com/2010/08/06/finding-a-path-through-the-jukebox-the-playlist-tutorial/">playlists</a> this afternoon reminded me that I still hadn't posted Radio Sunpig 2009...and it's August of 2010 already.  (<a href="http://sunpig.com/martin/archives/2009/08/23/radio-sunpig-2008-the-seeds-of-something-better.html">Nothing new there, then.</a>)  But I can honestly say that I finalized the playlist itself at the beginning of January, and the artwork shortly thereafter. I even issued a couple of prototype CDs at the end of February, but it never went to a full production run (of the usual 7 copies).  Oh well.</p>

<p class="center"><a href="http://sunpig.com/martin/images/2010/08/radio-sunpig-2009-insert.jpg"><img src="http://sunpig.com/martin/images/2010/08/radio-sunpig-2009-front.jpg" /></a></p>

<p>Radio Sunpig 2009 is subtitled "Thicker Ice" because it felt like in 2009 the Sutherland household was on a more solid footing than in 2008. It still had plenty of ups and downs, but the ups were upper and the downs were less down. A good foundation for 2010.  And musically, it saw me <a href="http://sunpig.com/martin/archives/2009/09/27/malcolm-middleton-at-paradiso-amsterdam-14-sep-2009.html">start going out to live gigs again</a>. Which is awesome.  And any year in which I can get to see the Tragically Hip <em>twice in the space of a single week</em> has got a hell of a lot going for it.</p>
 
<ol>
<li>Battles - <i>Atlas</i></li>
<li>Fight Like Apes - <i>Tie Me Up With Jackets</i></li>
<li>Frightened Rabbit - <i>The Greys</i></li>
<li>Phoenix - <i>1901</i></li>
<li>Apes & Androids - <i>Nights Of The Week</i></li>
<li>School Of Seven Bells - <i>Half Asleep</i></li>
<li>The Heavy - <i>How You Like Me Now?</i></li>
<li>Deastro - <i>Daniel Johnson Was Stabbed In The Heart With The Moondagger</i></li>
<li>Idlewild - <i>To Be Forgotten</i></li>
<li>The Gaslight Anthem - <i>The '59 Sound</i></li>
<li>Bleu - <i>Boy Meets Girl</i></li>
<li>The Temper Trap - <i>Sweet Disposition</i></li>
<li>Wintersleep - <i>Oblivion</i></li>
<li>Charlotte Hatherley - <i>White</i></li>
<li>The Tragically Hip - <i>Queen Of The Furrows</i></li>
<li>Cruiser - <i>A Gentle Press</i></li>
<li>The Decemberists - <i>The Hazards Of Love 4 (The Drowned)</i></li>
</ol>

<p>As usual, message me for a download. You can't get all of these tracks on Spotify :-)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Barenaked Ladies at the Mountain Winery (Saratoga), 19 July 2010</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/08/07/barenaked-ladies-at-the-mountain-winery-saratoga-19-july-2010.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2251</id>
    
    <published>2010-08-07T14:10:55Z</published>
    <updated>2010-08-07T19:41:29Z</updated>
    
    <summary>I&apos;m a big fan of the Barenaked Ladies. I love their music, the time I saw them live in 2001 was once of the best gigs I&apos;ve been to. They brought heaps of energy and enthusiasm to the stage, and it looked like they were really having fun. I was...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>I'm a big fan of the Barenaked Ladies. I love their music, the time I saw them live in <a href="http://www.sunpig.com/martin/archives/2001/04/06/yesterday-evenings-barenaked-ladies-concert.html">2001</a> was once of the best gigs I've been to.  They brought heaps of energy and enthusiasm to the stage, and it looked like they were really having <em>fun</em>.</p>

<p>I was disappointed when Steven Page left the band at the sart of 2009 -- his voice defined many of their songs, and I was sad that I wouldn't hear him if and when I next saw the BNL live.  (Martin's rule of live performances is: always take the opportunity to see your favourite bands and artists live, because you never know when they'll break up, or die.)  This disappointment was reinforced when the band released a truly dreadful live recording of their first gig without Page in July of last year.  Uh-oh, I thought.  Guess that's the end, then.</p>

<p>But no; their new album "All In Good Time" is pretty good.  Not a BNL <em>classic</em>, but pretty good nevertheless.  Ed Robertson sings most of the songs, but Jim Creeggan and Kevin Hearn both get more time on vocals (2 and 3 tracks respectively). And although I don't particularly like Kevin Hearn's voice <em>in the abstract</em>, somehow I do end up very fond of the tracks on which he takes the lead.  (<i>Watching The Northern Lights</i> is sweet and delightful.) Go figure.</p>

<p>But still... a live performance? With the crowd clamouring for favourites like <i>The Old Apartment</i> and <i>One Week</i> that Steven Page used to properly belt out?  My brother-in-law Mick mentioned to me a few months ago that the BNL happened to be  playing a few gigs in California while we were going to be there.  Despite my worries, it was too good an opportunity to pass by, especially because of the really cool-looking venues like the <a href="http://www.mountainwinery.com/">Mountain Winery</a>.  So tickets were bought.</p>

<p>Whoa, what a great evening.</p>

<p>First of all, the Mountain Winery is a lovely venue.  You drive a winding road through the Saratoga hills to get there, and once you hit the car park you have a fabulous view out over Silicon Valley below.  If you are willing to splash out the dough, you can have a gourmet dinner before the concert on one of the winery decks.  And the stage itself is placed nestled in an intimate open-air amphitheatre at the heart of the estate, with vine-speckled slopes in the background.  The seats have cup holders so you can enjoy a glass of the local wine with your music.  It is very much a <em>premium concert experience</em> rather than a mere <em>gig</em>.</p>

<p>Another thing that made the evening great was that we took Fiona with us -- this was her first concert!  Fiona loves <i>If I Had $1,000,000</i>, and the BNL struck me as a good band to see as her introduction to live music.  ("Daddy, will they be playing real instruments?")  She had a fantastic time, spending a good portion of the time dancing on her seat.  Every few minutes she would tug on my arm and shine a massive grin at me. I love to see her so happy.</p>

<p>And the music itself?  Wonderful.  The band looked happy and relaxed on stage, and just as when I saw them before, they looked like they were genuinely having <em>fun</em>, doing something they love.  Sure, the songs sound different without Steven Page's vocals, but they have clearly adapted, and found new treatments for the old songs in his absence.  But the band was in the groove, and the audience was thrilled.  The atmosphere was fantastic.  If, like me, you had any doubts about going to see them in the post-Page era, put them to rest.  They've still got it.</p>

<h4>Set list:</h4>

<ol>
<li>Who Needs Sleep?</li>
<li>The Old Apartment</li>
<li>Falling For The First Time</li>
<li>Every Subway Car</li>
<li>Easy</li>
<li>Maybe Katie</li>
<li>Another Heartbreak</li>
<li>Tonight Is The Night I Fell Asleep At The Wheel</li>
<li>Sound Of Your Voice</li>
<li>It's All Been Done</li>
<li>Pollywog In A Bog</li>
<li>You Run Away</li>
<li>Blame It On Me</li>
<li>Four Seconds</li>
<li>Big Bang Theory Theme</li>
<li>One Week</li>
<li>To Little Too Late</li>
<li>Pinch Me</li>
<li>If I Had $1000000</li>
</ol>

<p>Encore:</p>

<ol>
<li value="20">Ordinary</li>
<li>Watching The Northern Lights</li>
<li>Light Up My Room</li>
</ol>

<p>Finally, an amusing note about the set lists that I post to my gig reports. I don't take notes during the show; instead I memorize the set list using scenes and pictures I compose as the songs are played.  For example, the first three songs of this concert formed into an image of someone asleep in a bed (Who needs sleep?) in an apartment (The Old Apartment), with a burglar falling down as he climbs through an open window (Falling For The First Time).  It's a simple trick, but it only really works for bands whose songs and lyrics I know well.</p>

<p>Normally I hold the pictures in my head for a day or two, but unless I revisit them, they fade away quickly.  The curious thing about this concert was that I found myself remembering the images I had composed for the <a href="http://www.sunpig.com/martin/archives/2001/04/06/yesterday-evenings-barenaked-ladies-concert.html">BNL gig I attended back in 2001</a>.  For that one, the first picture was of someone showing up late for an date at a bar (Too Little Too Late), having a big drink (Alcohol), telling his life story to his date (Life, In a Nutshell), then falling off his bar stool (Falling For The First Time).</p>

<p>I hadn't recalled that picture for nine years, and then all of a sudden it's right there again. Funny how the mind works.</p>]]>
        
    </content>
</entry>

<entry>
    <title>The New Pornographers at The Fox (Oakland), 18 July 2010</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/07/21/the-new-pornographers-at-the-fox-oakland-18-july-2010.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2250</id>
    
    <published>2010-07-21T16:59:53Z</published>
    <updated>2010-07-21T18:11:22Z</updated>
    
    <summary>Disappointed and annoyed. First of all, I didn&apos;t book my ticket early enough, so I was stuck up on the balcony. The Fox theatre has a fabulously sumptuous interior, but the balcony seats are crappy nevertheless: cramped, uncomfortable, cold, and far too far away from the stage. Secondly, the ticket...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    <category term="music" label="music" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>Disappointed and annoyed.</p>

<p>First of all, I didn't book my ticket early enough, so I was stuck up on the balcony.  The Fox theatre has a fabulously sumptuous interior, but the balcony seats are crappy nevertheless: cramped, uncomfortable, cold, and far too far away from the stage.</p>

<p>Secondly, the ticket said 19:30 (7:30PM, actually, because we're in the US), but the New Pornographers weren't on stage until 21:45 because of the two support acts.  Imaad Wasif was on first, and produced an amiable blend of stoner prog rock with alt-country elements, but I was feeling impatient by the time the Dodos came on, and just plain <em>bored</em> after two hours of music I didn't come to see.  The Dodos' intensely drum and percussion-based music is something I would lap up under other circumstances; but as a second support act I would gladly have paid a higher ticket price to have them removed from the bill.</p>

<p>The worst thing, though, was the sound, which is the worst I have ever experienced at a gig. It was muddy and indistinct, and it sounded like they were playing at the bottom of a well.  Which was actually the case up on the balcony, I suppose.  The only thing I could hear clearly were Kurt Dahle's drums. I literally could not make out most of the words they were singing.  I don't know if this was an artifact of the New Pornographer's sound setup, or because of the acoustics at the Fox, but it was an <em>enormous</em> let-down.  I love their crisp melodies and bright voices, but I just couldn't <em>hear</em> them.  When they started playing "Sweet Talk" -- one of my favourite songs of theirs, and impossible <em>not</em> to include in the set, given the byzantine décor -- I almost wanted to cry at not being able to hear the layered vocals.</p>

<p>Finally, I'm annoyed at myself for not doing anything about this.  Throughout the concert, I noticed people getting up from their seats on the balcony, and walking out.  I suspect that these folk knew better, and were heading downstairs for the general access floor area, no matter what their tickets said.  I'm annoyed that I just sat there and didn't even <em>try</em> to blag my way past the ushers. What's the worst that could have happened? That they said no and sent me back to my seat? What's the best that could have happened? I might actually have <em>enjoyed</em> seeing one of my favourite bands.</p>

<p>Note to self: don't put up with shitty seats. Note to everyone else: avoid the balcony at the Fox.</p>

<h4>Set list:</h4>

<ol>
<li>Sing Me Spanish Techno (<i><abbr title="Twin Cinema">TC</abbr></i>)</li>
<li>Up In The Dark (<i><abbr title="Together">T</abbr></i>)</li>
<li>Myriad Harbour (<i><abbr title="Challengers">C</abbr></i>)</li>
<li>Crash Years (<i><abbr title="Together">T</abbr></i>)</li>
<li>The Laws Have Changed (<i><abbr title="Electric Version">EV</abbr></i>)</li>
<li>Jackie, Dressed In Cobras (<i><abbr title="Twin Cinema">TC</abbr></i>)</li>
<li>Adventures In Solitude (<i><abbr title="Challengers">C</abbr></i>)</li>
<li>Twin Cinemas (<i><abbr title="Twin Cinema">TC</abbr></i>)</li>
<li>Jackie (<i><abbr title="Mass Romantic">MR</abbr></i>)</li>
<li>All The Old Showstoppers (<i><abbr title="Challengers">C</abbr></i>)</li>
<li>Go Places (<i><abbr title="Challengers">C</abbr></i>)</li>
<li>Moves (<i><abbr title="Together">T</abbr></i>)</li>
<li>Your Hands (Together) (<i><abbr title="Together">T</abbr></i>)</li>
<li>My Shepherd (<i><abbr title="Together">T</abbr></i>)</li>
<li>Use It (<i><abbr title="Twin Cinema">TC</abbr></i>)</li>
<li>Silver Jenny Dollar (<i><abbr title="Together">T</abbr></i>)</li>
<li>Mass Romantic (<i><abbr title="Mass Romantic">MR</abbr></i>)</li>
<li>The Bleeding Heart Show (<i><abbr title="Twin Cinema">TC</abbr></i>)</li>
</ol>

<p>Encore:</p>

<ol>
<li value="19">Challengers (<i><abbr title="Challengers">C</abbr></i>)</li>
<li>The Slow Descent Into Alcoholism (<i><abbr title="Mass Romantic">MR</abbr></i>)</li>
<li>Testament To Youth In Verse (<i><abbr title="Electric Version">EV</abbr></i>)</li>
</ol>

<p><abbr title="Mass Romantic">MR</abbr> = <i>Mass Romantic</i>, <abbr title="Electric Version">EV</abbr> = <i>Electric Version</i>, <abbr title="Twin Cinema">TC</abbr> = <i>Twin Cinema</i>, <abbr title="Challengers">C</abbr> = <i>Challengers</i>, <abbr title="Together">T</abbr> = <i>Together</i></p>]]>
        
    </content>
</entry>

<entry>
    <title>Dan Le Sac vs. Scroobius Pip at Paradiso, Amsterdam, 1 Apr 2010</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/04/03/dan-le-sac-vs-scroobius-pip-at-paradiso-amsterdam-1-apr-2010.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2247</id>
    
    <published>2010-04-03T20:25:06Z</published>
    <updated>2010-04-03T20:27:07Z</updated>
    
    <summary> Sweet little gig. Dan Le Sac&apos;s big beats sounded awesome in the small Paradiso venue, and Pip&apos;s rhymes carried more weight in person than they do on disc. Watching him perform Angles live, putting on different hats and glasses as he switches points of view in the song, added...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p><a href="http://www.lesacvspip.co.uk/"><img class="left" src="http://sunpig.com/martin/images/2010/03/thelogicofchance_small.jpg" /></a> Sweet little gig. Dan Le Sac's big beats sounded awesome in the small Paradiso venue, and Pip's rhymes carried more weight in person than they do on disc. Watching him perform <i>Angles</i> live, putting on different hats and glasses as he switches points of view in the song, added even more emotional weight to the song, and left the audience subdued... but not for long.  The second part of the set built up to a huge finale that had the whole room jumping and getting "nice and sweaty."  The recorded version of <i>Letter From God To Man</i> has an enormous, spiky and angular outro, and Dan kept it spinning for a long time &mdash; just what the crowd wanted.</p>

<h4>Set list:</h4>

<ol>
<li>The Beat That My Heart Skipped (<i>Angles</i>)</li>
<li>Sick Tonight (<i>The Logic Of Chance</i>)</li>
<li>Magician's Assistant (<i>Angles</i>)</li>
<li>Look For The Woman (<i>Angles</i>)</li>
<li>Stake A Claim (<i>The Logic Of Chance</i>)</li>
<li>Angles (<i>Angles</i>)</li>
<li>Last Train Home (<i>The Logic Of Chance</i>)</li>
<li>Snob (<i>The Logic Of Chance</i>)</li>
<li>Get Better (<i>The Logic Of Chance</i>)</li>
<li>Thou Shalt Always Kill (<i>Angles</i>)</li>
<li>Great Britain (<i>The Logic Of Chance</i>)</li>
<li>Letter From God To Man (<i>Angles</i>)</li>
</ol>
<p>Encore:</p>
<ol>
<li value="13">Back From Hell (<i>Angles</i>)</li>
</ol>]]>
        
    </content>
</entry>

<entry>
    <title>Play, work, communicate</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/03/31/play-work-communicate.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2246</id>
    
    <published>2010-03-31T16:40:27Z</published>
    <updated>2010-03-31T16:44:48Z</updated>
    
    <summary> My brain reads it as &quot;Plorky.&quot;...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
        <category term="Ramblings" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<img src="http://sunpig.com/martin/images/2010/03/plorky.jpg" alt="Play, work, communicate" />

<p>My brain reads it as "Plorky."</p>]]>
        
    </content>
</entry>

<entry>
    <title>Dutch politics is awesome</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/03/07/dutch-politics-is-awesome.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2245</id>
    
    <published>2010-03-07T10:54:51Z</published>
    <updated>2010-03-07T11:37:29Z</updated>
    
    <summary>To people in the UK and US, Dutch politics can look like a confusing mess, but fortunately we have Peter-Paul Koch to explain it all. In the web development world, ppk is well-known for his web browser compatibility tables, founding Fronteers (the Dutch professional organisation for front-end developers), and more...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>To people in the UK and US, Dutch politics can look like a confusing mess, but fortunately we have <a href="http://www.quirksmode.org/about/">Peter-Paul Koch</a> to explain it all.</p>

<p>In the web development world, ppk is well-known for his <a href="http://quirksmode.org/compatibility.html">web browser compatibility tables</a>, founding <a href="http://fronteers.nl/">Fronteers</a> (the Dutch professional organisation for front-end developers), and more recently his work on <a href="http://www.quirksmode.org/blog/archives/mobile/index.html">mobile browsers</a>.   But he is also a historian, which shows in articles like his <a href="http://www.quirksmode.org/blog/archives/2009/04/making_time_saf.html">amazing dissection of the new <code>&lt;time&gt;</code> element in HTML5</a>, and the <a href="http://www.quirksmode.org/politics/rules.html">introductions to Dutch politics</a> he has written over the last couple of years.</p>

<p>Since the <a href="http://news.bbc.co.uk/2/hi/8525742.stm">fall of the Dutch government</a> two weeks ago, ppk has created a separate <a href="http://www.quirksmode.org/politics/blog/">blog</a> in which he is writing lots of great stuff about <a href="http://www.quirksmode.org/politics/kuyper.html">Dutch political history</a>, the political parties in play for the upcoming general election (there are many), and the ups and downs of the race itself, such as last week's <a href="http://www.quirksmode.org/politics/blog/archives/2010/03/the_local_elect.html">local elections</a>.</p>

<p>If your Dutch isn't good enough to read the native news sources, ppk is definitely the best source of background on this <em>highly</em> entertaining political contest:</p>

<ul>
<li><a href="http://www.quirksmode.org/politics/">Dutch politics — a primer for foreigners</a> (ppk Dutch politics home page)</li>
<li><a href="http://www.quirksmode.org/politics/blog/">Political Quirks</a> (ppk Dutch politics blog)</li>
</ul>]]>
        
    </content>
</entry>

<entry>
    <title>Moving forward</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/03/04/moving-forward.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2243</id>
    
    <published>2010-03-04T01:18:50Z</published>
    <updated>2010-03-04T01:27:43Z</updated>
    
    <summary> &quot;The arrows. What they mean is, you control who you are by moving forward, never back; you move forward. That&apos;s what I do. That&apos;s what we&apos;re going to do.&quot; When we moved to the Netherlands in 2007, I regularly had to explain to people that I wasn&apos;t moving back....</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<blockquote style="margin-top:1em">
<p>"The arrows. What they mean is, you control who you are by moving forward, never back; you move forward. That's what I do. That's what we're going to do."</p>
</blockquote>

<p>When we moved to the Netherlands in 2007, I regularly had to explain to people that I wasn't moving <em>back</em>.  Our decision to emigrate to the Netherlands was influenced by my childhood in Limburg, but only in the sense that it had given us knowledge and experience of many desirable aspects of Dutch culture and lifestyle &mdash; not in the sense that I was trying to return to a "home" with which I had some kind of preternatural affinity.</p>

<p>We didn't sell our house in Edinburgh immediately when we moved.  We had intentions of renting it out, but nothing ever came of that; we ended up selling it just a few months later.  But in those months, I stayed there whenever I went back to Scotland as part of my job at <a href="http://skyscanner.net/">Skyscanner</a>.</p>

<p>My first trip back was <a href="http://www.sunpig.com/martin/archives/2007/08/22/worst-feeling-in-the-world.html">horrible</a>. The house felt hollow and joyless: stripped of our presence, but haunted by our old furniture. When I visited the Mother Goose Nursery, that bright and happy place where Alex and Fiona had spent much of their early years, I found that most of the staff we had known and chatted with almost every day were gone. Some had moved to different nurseries, others had quit the profession altogether. It was like someone had cut out its heart, and, by association, also a piece of mine. When I went out for pizza with my friends, the city centre of Edinburgh itself felt oppressive and threatening.  Everything had changed. And by everything, I mean me.</p>

<p>I have continued to work remotely for Skyscanner for the last two and a half years.  I have been back to Scotland regularly, and fortunately none of the trips have been as bad as that first one.  Most of them have been great, in fact.  Despite not being a very sociable person, I do thrive on contact with my most excellent colleagues.  Spending a couple of days in the office, swimming in <a href="http://www.randsinrepose.com/archives/2009/04/15/the_pond.html">the pond</a>, always energizes me.  But I miss Abi, Alex, and Fiona when I'm away, and the days leading up to a trip are distorted by anxiety about leaving them.  (I'm not good with departures.)  Also, although remote working can be peaceful and distraction-free, it can also be lonely and impersonal.  Over time, the lack of day-to-day contact was building up and making me feel invisible and ineffective.</p> 

<p>So this is my last trip back to Edinburgh for Skyscanner.  I'm starting a new job with <a href="http://sogeocompany.com/">Sogeo Company</a> on Monday.</p>

<p>But just as my first trip back to Edinburgh after moving away was bad, this last one is difficult, too.  I think it's because although I am still employed by Skyscanner, I have <em>moved forward</em> already, and being here is being <em>back</em>.  It isn't the energizing experience it used to be, because I'm not trying to carry that energy back with me.  Conversations with friends and colleagues feel strained, because I'm ending my involvement with something they are still right in the middle of.  I'm an outsider already.  Everything had changed.  And by everything, I mean me, again.</p>

<p>Going back is not what I do.  Most of the time this manifests itself in little ways, such as the being more interested in hearing my favourite artists' new albums than in listening to their back catalogues; or a lack of inclination to scour social networks for people I haven't spoken to in years.  Other times &mdash; like now &mdash; it emerges as the feeling of alienation I've described above.</p>

<p>The quote at the top of this entry is from <a href="http://www.robertcrais.com/books/book_the_watchman.htm"><i>The Watchman</i></a> by Robert Crais, and is spoken by the taciturn Joe Pike.  Pike defines himself by his forward motion, and has <a href="http://www.robertcrais.com/getpikeon/readers.htm">red arrows tattooed on his deltoids</a> as a symbol of this commitment.  I don't like needles, but I've never felt a stronger urge to get some ink than I do right now.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Back from Brooklyn</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/02/25/back-from-brooklyn.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2242</id>
    
    <published>2010-02-25T19:20:53Z</published>
    <updated>2010-02-25T23:56:58Z</updated>
    
    <summary>We are back from spending a wonderful long weekend with Patrick and Teresa. Abi and I had been to New York before, but (apart from travelling to and from the airport) we had never been out of Manhattan. This time we mostly hung out in Brooklyn, but on Monday we...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    <category term="brooklyn" label="brooklyn" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="newyork" label="new york" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="travel" label="travel" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>We are back from spending a <em>wonderful</em> long weekend with <a href="http://nielsenhayden.com/makinglight/">Patrick and Teresa</a>.  Abi and I had been to New York before, but (apart from travelling to and from the airport) we had never been out of Manhattan.  This time we mostly hung out in Brooklyn, but on Monday we also zipped through Queens and the Bronx.  On our way back South into Manhattan along the Henry Hudson Parkway, we were both struck by features that made us think of Lyon in France.</p>

<p>We ate burgers at the <a href="http://shakeshack.com/">Shake Shack</a> in Madison Square Park; cheesecake at <a href="http://www.juniorscheesecake.com/">Junior's</a> on Flatbush; clam chowder at Tony's on City Island; and yet more burgers at the <a href="http://www.oldtownbar.com/">Old Town Bar</a> on East 18th St.  Patrick introduced me to <i>Negra Modelo</i> and <i lang="es">tacos al pastor</i>, and we got along famously.  We visited the <a href="http://us.macmillan.com/TorForge.aspx">Tor</a> offices in the Flatiron building; watched Avatar; hung out with <a href="http://www.deselbybowen.com/">Scraps and Velma</a> Saturday evening, and the <a href="http://nielsenhayden.com/makinglight/">Making Light</a>/<a href="http://tor.com">Tor.com</a> crowd Tuesday lunchtime.</p>

<p>Patrick and Teresa: thank you ever so much for having us. We had a blast.</p>

<p>I've just uploaded a bunch of photos to flickr: <a href="http://www.flickr.com/photos/sunpig/sets/72157623384259335/">Mostly Manhattan, Saturday 20 Feb 2010</a>, and <a href="http://www.flickr.com/photos/sunpig/sets/72157623384527533/">Brooklyn, 21 Feb 2010</a>.  Here are some of my favourites:</p>

<a href="http://www.flickr.com/photos/sunpig/4387654745/in/set-72157623384259335/"><img src="http://sunpig.com/martin/images/2010/02/shakeshack.jpg" title="Shake Shack" alt="Shake Shack" /></a>

<a href="http://www.flickr.com/photos/sunpig/4387756141/in/set-72157623384527533/"><img src="http://sunpig.com/martin/images/2010/02/homelandsecurity.jpg" title="Flag and skyscraper; fence and camera #1" alt="Flag and skyscraper; fence and camera #1" /></a>

<a href="http://www.flickr.com/photos/sunpig/4387759027/in/set-72157623384527533/"><img src="http://sunpig.com/martin/images/2010/02/demolition.jpg" title="Demolition" alt="Demolition" /></a>

<a href="http://www.flickr.com/photos/sunpig/4387764241/in/set-72157623384527533/"><img src="http://sunpig.com/martin/images/2010/02/rainbowsplash.jpg" title="Rainbow splash" alt="Rainbow splash" /></a>

<a href="http://www.flickr.com/photos/sunpig/4388527736/in/set-72157623384527533/"><img src="http://sunpig.com/martin/images/2010/02/istillloveher.jpg" title="I still love her" alt="I still love her" /></a>]]>
        
    </content>
</entry>

<entry>
    <title>Marching ants in CSS</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/02/10/marching-ants-in-css.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2240</id>
    
    <published>2010-02-10T19:55:58Z</published>
    <updated>2010-02-10T22:02:54Z</updated>
    
    <summary>A couple of days ago I noticed that Goooogle uses a marching ants effect on their new mini-calendar event view. It highlights the target time frame for the event you&apos;re editing, and it indicates a draggable and expandable area. (It&apos;s probably been there for ages, but I&apos;m slow like that.)...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
        <category term="Techie" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="css" label="css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="marchingants" label="marching ants" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="standardmoduleformat" label="standard module format" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ui" label="ui" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ux" label="ux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>A couple of days ago I noticed that Goooogle uses a <a href="http://en.wikipedia.org/wiki/Marching_ants"><b>marching ants</b></a> effect on their new mini-calendar event view.  It highlights the target time frame for the event you're editing, and it indicates a draggable and expandable area.  (It's probably been there for ages, but I'm slow like that.)</p>

<a href="http://sunpig.com/martin/images/2010/02/googlecalendar.avi" title="Marching ants effect in Google Calendar (AVI video, 346 KB)"><img src="http://sunpig.com/martin/images/2010/02/googlecalendar.jpg" alt="Marching ants effect in Google Calendar." /></a>

<p>Being a colossal geek, the first thing I did was run up Firebug to see how they're doing it, because there is no "<code>border-style: marchingants</code>" in CSS.  It looks like Google is doing it with JavaScript.  The area in question is bounded by four long but thin <code>div</code> elements (tall and narrow for the vertical borders, short and wide for the horizontal borders).</p>

<code class="html"><pre>
&lt;div class="sc-ants sc-ants-top"&gt;&lt;/div&gt;
&lt;div class="sc-ants sc-ants-left"&gt;&lt;/div&gt;
&lt;div class="sc-ants sc-ants-right"&gt;&lt;/div&gt;
...
&lt;div class="sc-ants sc-ants-bottom"&gt;&lt;/div&gt;
</pre></code>

<p>These divs sit inside a parent container with <code>overflow:hidden</code>, so you only see a small slice of their full extent.  The border divs themselves have size, but no content.  Their entire area is taken up by a 2px-wide dashed border:</p>

<code class="css"><pre>
.sc-ants-top  {
    border-top:2px dashed #6688EE;
    height:0;
    top:0;
    width:10000px;
}
</pre></code>

<p>Finally, there is a JavaScript timer that changes the position of these divs, moving them a pixel at a time to achieve the marching ants effect.</p>

<img src="http://sunpig.com/martin/images/2010/02/googlecalendar-schematic.png" />

<p>Even in native applications, marching ants are not all that common, and I think this is the first time I've seen them in a web application.  Given that draggable/resizeable areas are <em>also</em> not all that common in web apps, I think it's a clever and elegant way of highlighting that there is something different an unusual about that area.</p>

<p>On the other hand, I'm not mad keen on keeping JavaScript timers running just to keep screen elements in their appropriate position, so I wondered if there was a way of doing this with just CSS instead.  And of course there is: <a href="http://sunpig.com/martin/code/2010/marchingants/marchingants.html">have a look at the demo page</a>.</p>

<p>I started with a block of HTML in the <a href="http://wiki.github.com/stubbornella/oocss/standard-module-format">standard module format</a>, because it's a good basis for isolating areas of content.  The <code>div.bd</code> holds the actual content to be highlighted, and the other parts of the module are used for creating the borders, as follows:</p>

<ul>
<li>The outermost <code>div</code> is given a left-hand pseudo-border by using a background image with <code>repeat-y</code> only, positioned slightly to the <em>left</em> of the left edge, so that only the rightmost two pixels of the image are visible.</li>
<li>Likewise, the <code>.inner</code> container is given a top pseudo-border.</li>
<li>The <code>.hd</code> block makes the right-hand border.  It is positioned absolutely on the right edge of the module, 2px wide and 100% tall, and has a background image with repeat-y.</li>
<li>The <code>.ft</code> block makes the bottom border.  It is 2px tall and 100% wide, and also has a background image.</li>
</ul>

<p>Here's how it looks inline:</p>

<style>
.marchingants {
	background:url(http://sunpig.com/martin/code/2010/marchingants/ants-vertical.gif) repeat-y -6px 0;
	overflow:hidden;
	padding:0 2px;
	position:relative;
}
	.marchingants .inner {
		background:url(http://sunpig.com/martin/code/2010/marchingants/ants-horizontal.gif) repeat-x 0 -6px;
		padding:2px 0 0 0;
	}
	.marchingants .hd {
		background:url(http://sunpig.com/martin/code/2010/marchingants/ants-vertical.gif) repeat-y 0 0;
		height:100%;
		margin-bottom:4px;
		position:absolute;
		right:0;
		width:2px;
	}
	.marchingants .ft {
		background:url(http://sunpig.com/martin/code/2010/marchingants/ants-horizontal.gif) repeat-x 0 0;
		height:2px;
	}
	.marchingants .bd {
		font-size:1.5em;
		text-align:center;
	}
	.marchingants .bd p {
		margin:0;
		padding:0.5em;
	}
</style>
<div class="mod marchingants">
	<div class="inner">
		<div class="hd"></div>
		<div class="bd">
			<p>Marching ants!</p>
		</div>
		<div class="ft"></div>
	</div>
</div>

<p>The actual animation is achieved with a couple of old-skool animated GIFs, <a href="http://sunpig.com/martin/code/2010/marchingants/ants-horizontal.gif">ants-horizontal.gif</a> and <a href="http://sunpig.com/martin/code/2010/marchingants/ants-vertical.gif">ants-vertical.gif</a>.  The horizontal GIF contains two checkerboard patterns, one moving to the left, and one moving to the right; the vertical GIF has the checkerboard patterns moving up and down.  Each border only uses half of one of the GIFs, which is you only need two images rather than four.</p>

<img src="http://sunpig.com/martin/code/2010/marchingants/ants-horizontal.gif" /> <img src="http://sunpig.com/martin/code/2010/marchingants/ants-vertical.gif" /> 

<p>If you are content with the border being a single pixel thick, and the ants flowing from one corner to the opposite, then you could get away with just <em>one</em> animated GIF &mdash; see the <a href="http://en.wikipedia.org/wiki/Marching_ants">wikipedia article on marching ants</a> for an illustration.  Personally, I prefer the animation to flow round the border in a continuous pattern.</p>

<p>Of course, this is far from the only way you could implement the marching ants effect.  You could use <a href="http://webkit.org/blog/138/css-animation/">webkit's CSS animations</a> instead.  The <a href="http://sunpig.com/martin/code/2010/marchingants/marchingants.html">demo page</a> includes an example of how to do this as well.  The basic principles are exactly the same: set up a standard module, and use GIF images to form the necessary borders.  But instead of using animated GIFs, you can use just a <a href="http://sunpig.com/martin/code/2010/marchingants/ants-horizontal.gif">single static checkerboard image</a>, and use up/down/left/right animations to move around the background instead:</p>

<img src="http://sunpig.com/martin/code/2010/marchingants/ants.gif" />

<code><pre>
.marchingants {
	-webkit-animation-name: march-up;
	-webkit-animation-duration: 0.3s;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
}
@-webkit-keyframes march-up {
	from {
		background-position-y: 8px;
	}
	to {
		background-position-y: 0;
	}
}
</pre></code>

<p>One neat thing about the CSS animation version is that you can vary the speed of the animation without having to edit the GIF file.  The obvious drawback is that it (for now) only webkit browsers support CSS animations.  But given how easy it is to implement this in a cross-browser compatible manner, right now I'd suggest sticking to the animated GIF version.</p>
]]>
        
    </content>
</entry>

<entry>
    <title>Second-hand 80s</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/02/06/second-hand-80s.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2239</id>
    
    <published>2010-02-06T19:58:17Z</published>
    <updated>2010-02-06T21:21:16Z</updated>
    
    <summary>Alex and Fiona were both singing Harold Faltermeyer&apos;s Axel F in in their shower and bath this evening. The funny thing about this is that they had probably never heard the original. They picked it up from watching Monsters vs. Aliens on DVD, in which there is a scene where...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    <category term="80s" label="80s" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="alex" label="alex" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="axelf" label="axel f" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="family" label="family" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fiona" label="fiona" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="music" label="music" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>Alex and Fiona were both singing <a href="http://www.youtube.com/watch?v=Cu9jFLM6lec">Harold Faltermeyer's Axel F</a> in in their shower and bath this evening. The funny thing about this is that they had probably never heard the original.  <em>They</em> picked it up from watching <i><a href="http://www.imdb.com/title/tt0892782/">Monsters vs. Aliens</a></i> on DVD, in which there is a scene where the President of the USA (Stephen Colbert) tries to make contact with the aliens by playing the <a href="http://www.youtube.com/watch?v=MjlLJzESN8w">five note message</a> from <i><a href="http://www.imdb.com/title/tt0075860/">Close Encounters of the Third Kind</a></i>. He doesn't quite manage it, so he breaks into a spontaneous rendition of <i>Axel F</i> instead.</p>

<p>Although I listen to a <a href="http://www.last.fm/user/sunpig">lot</a> of music when I'm alone, we don't listen to much in the family spaces around the house.  The kids both have stereos on their rooms, but they don't listen to the radio on their own.  Yet they are constantly exposed to musical and cultural references in the films and TV they watch, and the games they play.  I always find it fun to see how they react when I connect something they've just heard or seen to the "original" from twenty years ago (which itself generally has roots in a still earlier era).</p>

<p>In this case, their interest turned into dance.  While they were still getting clean and ready for bed, I burned a selection of 80s hits onto CDs for them.  The playlist opens with Axel F, of course, but there's some Michael Jackson on there, a bit of ABC, a bit of Human League, a bit of Boomtown Rats.  They eagerly stuck the discs into their players, and just minutes later Alex was breakdancing to Axel F, and Fiona had put together a short ballet to the sounds of "Girls Just Wanna Have Fun."  I was completely enchanted.</p>

<p>Music is so important to me that I'm always delighted whenever they take any kind of interest in it.  I need to work on getting more of it into their lives.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Grandma</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/01/25/grandma.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2237</id>
    
    <published>2010-01-25T20:17:06Z</published>
    <updated>2010-01-25T20:20:03Z</updated>
    
    <summary>After a long, full, and happy life, my grandmother Florence McLean died peacefully this morning. We miss her a lot....</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>After a long, full, and happy life, my grandmother Florence McLean died peacefully this morning.</p>

<img src="http://sunpig.com/martin/images/2010/01/grandma_mclean_with_alex_20010429.jpg" title="Grandma McLean with Alex, 29 April 2001" alt="Grandma McLean with Alex, 29 April 2001" /> 

<p>We miss her a lot.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Leaving Facebook</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/01/23/leaving-facebook.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2236</id>
    
    <published>2010-01-23T13:32:29Z</published>
    <updated>2010-01-23T18:46:07Z</updated>
    
    <summary>I don&apos;t make a secret of the fact that I don&apos;t like Facebook. Where others find it playful, I find it intrusive and annoyingly attention-seeking. I don&apos;t like its attitudes towards content ownership and privacy. I particularly don&apos;t like its sense of self-importance, and the greedy way it tries to...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>I don't make a secret of the fact that I don't like Facebook.  Where others find it playful, I find it intrusive and annoyingly attention-seeking.  I don't like its attitudes towards <a href="http://consumerist.com/2009/02/facebooks-new-terms-of-service-we-can-do-anything-we-want-with-your-content-forever.html" title="Facebook's New Terms Of Service: "We Can Do Anything We Want With Your Content. Forever." - The Consumerist">content ownership</a> and <a href="http://www.eff.org/deeplinks/2009/12/facebooks-new-privacy-changes-good-bad-and-ugly" title="Facebook&#039;s New Privacy Changes: The Good, The Bad, and The Ugly | Electronic Frontier Foundation">privacy</a>. I particularly don't like its sense of self-importance, and the greedy way it tries to assume control of my social graph.  It's not that I don't want to connect with my friends over social networks, but I want it to be on <em>my</em> terms, not <em>theirs</em>.</p>

<p>Additionally, whenever you're dealing with a company that handles anything of value to you (with banks it's money, with Facebook and Google it's personal data), you have to weigh up the trust you have to place in them against the benefit you expect to receive.  Google passes that test for me (<em>for now</em>), but I don't trust Facebook not to try and screw me over.</p>

<p>What happens when you try to <em>leave</em> Facebook is emblematic of this.  Here's the page you get when you try to disable your account:</p>

<img src="http://sunpig.com/martin/images/2010/01/leavingfacebook.jpg" alt="Facebook's disable account page" />

<p>Asking me to confirm that I want to deactivate my account is appropriate.  Using my social connections in a clear attempt to trigger an emotional response that will keep me on the service is <strong>absolutely not</strong>.</p>

<p>"Your 32 friends will no longer be able to keep in touch with you" is nonsense.  I assume that since they know how to use a web browser, they're reasonably familiar with a computer, and probably have an email account they can use to reach me.</p>

<p>Below that, they display a random selection of my Facebook contacts with above each one the text "XXX will miss you".  Not only are these statements factually incorrect &mdash; they won't miss me because I never used Facebook to communicate with them in the first place &mdash; but Facebook is almost literally putting words in the mouths of these people.  Facebook has not asked them if they will miss me; it is using them as sock puppets to push its own message, which is "don't go."  By using the emotional "miss you" phrase, Facebook is using its knowledge of my social connections to <em>make me feel bad about leaving</em>.</p>

<p>They are <em>abusing my social graph</em> for their own ends.  It's manipulative, unethical, and downright slimy.</p>

<p>Furthermore, if they are using <em>my contacts</em> to try to make <em>me</em> stay, it follows that if my friends have tried to leave Facebook, then Facebook may have used <em>me</em>, or at least my photo, to try to make <em>them</em> stay &mdash; something that I myself would absolutely not do.</p>

<p>Goodbye, Facebook.  Martin will not miss you.</p>]]>
        
    </content>
</entry>

<entry>
    <title>On refusing to be terrorized</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/01/16/on-refusing-to-be-terrorized.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2235</id>
    
    <published>2010-01-16T19:32:22Z</published>
    <updated>2010-01-16T19:33:54Z</updated>
    
    <summary>When it comes to security, I&apos;m firmly in Bruce Schneier&apos;s &quot;refuse to be terrorized&quot; camp. I&apos;m sick of the &quot;we must do something&quot; panic reaction that follows even minimal terrorist threats, and the security theatre it leads to. It&apos;s not about the inconvenience it causes me and other passengers; it&apos;s...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>When it comes to security, I'm firmly in Bruce Schneier's "<a href="http://www.schneier.com/essay-124.html" title="Refuse to be Terrorized">refuse to be terrorized</a>" camp.  I'm sick of the "we must do something" panic reaction that follows even minimal terrorist threats, and the <a href="http://en.wikipedia.org/wiki/Security_theater" title="Security theater - Wikipedia, the free encyclopedia">security theatre</a> it leads to. It's not about the inconvenience it causes me and other passengers; it's not even about the ridiculous costs that have to be borne by companies and taxpayers in order to implement measures that will do nothing to prevent a determined terrorist carrying out a attack &mdash; all they have to do, after all, is change their target.</p>

<p><a href="http://www.schneier.com/blog/archives/2010/01/airport_securit_12.html" title="Schneier on Security: Post-Underwear-Bomber Airport Security">Bruce Schneier</a>:</p>
<blockquote cite="http://www.schneier.com/blog/archives/2010/01/airport_securit_12.html"><p>It's magical thinking: If we defend against what the terrorists did last time, we'll somehow defend against what they do next time. Of course this doesn't work. We take away guns and bombs, so the terrorists use box cutters. We take away box cutters and corkscrews, and the terrorists hide explosives in their shoes. We screen shoes, they use liquids. We limit liquids, they sew PETN into their underwear. We implement full-body scanners, and they're going to do something else. This is a stupid game; we should stop playing it.</p></blockquote>

<p><a href="http://www.papersplease.org/wp/2010/01/08/lessons-from-the-case-of-the-man-who-set-his-underpants-on-fire/" title="Papers, Please!  &raquo; Blog Archive   &raquo; Lessons from the case of the man who set his underpants on fire">Edward Hasbrouck</a>:</p>
<blockquote cite="http://www.papersplease.org/wp/2010/01/08/lessons-from-the-case-of-the-man-who-set-his-underpants-on-fire/"><p>What’s most striking about the government’s response to this unsuccessful bombing attempt is the complete lack of any rational relationship between the actions that have been taken and are being proposed, any analysis of which of these and similar tactics did or did not contribute to the success or failure of the Christmas Day attack on Northwest Airlines flight 253, and any likelihood that they would make future attempts at terrorism less likely to succeed.</p></blockquote>

<p>No, what bothers me is the fact that distorting public policy, removing individual liberties, and instituting a culture of irrationality and fear is <a href="http://www.schneier.com/blog/archives/2006/08/what_the_terror.html" title="Schneier on Security: What the Terrorists Want">exactly what the terrorists wanted in the first place</a>.</p>

<blockquote cite="http://www.schneier.com/blog/archives/2006/08/what_the_terror.html"><p>Our job is to think critically and rationally, and to ignore the cacophony of other interests trying to use terrorism to advance political careers or increase a television show's viewership.</p></blockquote>

<p>So what can I personally do to refuse to be terrorized?  Unfortunately, airlines and airports have a monopoly on air travel, and national governments have a monopoly on border control, so I can't refuse to play the security game whenever I go abroad.  I would if I could, because personally I feel more <a href="http://boingboing.net/2009/12/11/dr-peter-watts-canad.html" title="Dr Peter Watts, Canadian science fiction writer, beaten and arrested at US border Boing Boing">at risk from the security measures</a> than I do from terrorist action.  The risk of being subject of an <em>attempted</em> terrorist attack (much less a sucessful one) is, after all, <a href="http://www.fivethirtyeight.com/2009/12/odds-of-airborne-terror.html" title="FiveThirtyEight: Politics Done Right: The Odds of Airborne Terror">less than being struck by lightning</a>.</p>

<p>For one thing, I can help point out when people take the right approach.  For example, <a href="http://www.theregister.co.uk/2010/01/08/mutallab_comment/" title="Trouser-bomb clown attacks - how much should we laugh? • The Register">The Register</a>:</p>

<blockquote cite="http://www.theregister.co.uk/2010/01/08/mutallab_comment/"><p>First: It is completely impossible to prevent terrorists from attacking airliners.<p>

<p>Second: This does not matter. There is no need for greater efforts on security.</p>

<p>Third: A terrorist set fire to his own trousers, suffering eyewateringly painful burns to what Australian cricket commentators sometimes refer to as the "groinal area", and nobody seems to be laughing. What's wrong with us?</p></blockquote>

<p>I can also call bullshit on articles like <a href="http://www.travolution.co.uk/articles/2010/01/15/3157/skyscanner-poll-backs-body-scanners.html" title="Skyscanner poll backs body scanners - Travolution.co.uk">this one on Travolution</a> in which a tiny, poorly worded sidebar poll on a <em>travel industry</em> blog gets blown up to represent that a majority of all <em>travellers</em> are in favour of body scanners that <a href="http://www.independent.co.uk/news/uk/home-news/are-planned-airport-scanners-just-a-scam-1856175.html" title="Are planned airport scanners just a scam? - Home News, UK - The Independent">would not have flagged the completely pants bomber in the first place</a>.</p>

<p>But ranting about this stuff on my blog reminds me of the depressing inevitability of the war in Iraq in late 2002 and early 2003.  No matter how much we, the people, protested &mdash; and the lead-up to the war we saw the <a href="http://en.wikipedia.org/wiki/February_15,_2003_anti-war_protest" title="February 15, 2003 anti-war protest - Wikipedia, the free encyclopedia">biggest anti-war protests in history</a> &mdash; our governments still went blithely ahead.  I may have high hopes for the decade ahead, but an end to the ridiculous security theatre that plagues us is beyond even my wildest dreams.</p>]]>
        
    </content>
</entry>

<entry>
    <title>How to detect a page request from Safari 4&apos;s Top Sites feature</title>
    <link rel="alternate" type="text/html" href="http://www.sunpig.com/martin/archives/2010/01/08/how-to-detect-a-page-request-from-safari-4s-top-sites-feature.html" />
    <id>tag:www.sunpig.com,2010:/martin//2.2234</id>
    
    <published>2010-01-08T22:30:23Z</published>
    <updated>2010-01-08T21:50:51Z</updated>
    
    <summary>While reading Jeremy Keith&apos;s blog entry &quot;Safari Askew&quot; I remembered that I had looked at this just before Christmas, and found an answer. The problem is to do with Safari 4&apos;s &quot;Top Sites&quot; feature, which shows you a pretty grid of thumbnails for the sites you visit most regularly (or...</summary>
    <author>
        <name>Martin</name>
        <uri>http://www.sunpig.com/martin/</uri>
    </author>
    
        <category term="Techie" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="The Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.sunpig.com/martin/">
        <![CDATA[<p>While reading Jeremy Keith's blog entry "<a href="http://adactio.com/journal/1636/" title="Adactio: Journal&mdash;Safari askew">Safari Askew</a>" I remembered that I had looked at this just before Christmas, and found an answer.</p>

<p>The problem is to do with Safari 4's "Top Sites" feature, which shows you a pretty grid of thumbnails for the sites you visit most regularly (or that you have pinned in place).  The interesting thing is that these thumbnails are live (ish) previews of what those pages <em>currently</em> look like.  If you don't happen to have a Top Sites page open in a tab, and if Safari considers that the current thumbnail is sufficiently out of date, it will automatically go and retrieve the latest version.</p>

<img src="http://sunpig.com/martin/images/2010/01/topsites.jpg" alt="Safari 4's Top Sites feature" />

<p>This can cause headaches for site owners, because in order to show the <em>actual</em> state of the page, Safari relies on <em>full page requests</em>: it downloads all the HTML, CSS, images, and JavaScript for the page, and then displays everything exactly as if the user were viewing the page in a standard tab.  Adverts are rendered, page tracking scripts are executed, and to the server it looks just like a regular page hit.  This can lead to the site <a href="http://meta.stackoverflow.com/questions/13727/did-safaris-top-sites-feature-earn-my-enthusiast-badge" title="Did Safari's top sites feature earn my enthusiast badge? - Meta Stack Overflow">recording unnecessary actions</a>, and your <a href="http://www.digitalangels.co.uk/blog/2009/04/safari-4-how-its-top-sites-view-can-mess-up-your-stats/" title="Safari 4 &#8211; how its Top Sites view can mess up your stats | Digital Angels">site analytics being all messed up</a>.</p>

<p>At <a href="http://www.skyscanner.net/">Skyscanner</a>, for example, we noticed this because Google Analytics was showing an unusually high number of Safari users (8.5%) with an abnormally high bounce rate (the proportion of sessions where users view a single page, then walk away with no further interaction):  Safari 4 users were twice as likely to bounce as other browsers.  Useless sessions generated by Top Sites were the problem.</p>

<p>As Jeremy noted, the user agent that Safari 4 reports for a Top Sites request is exactly the same as for a normal page request.  Fortunately, there is a way to distinguish the two types of request: in the current version of Safari 4 (4.0.4) the Top Sites request for the <em>base</em> page (but not its JS/CSS/image resources) carries an additional HTTP header, namely "<code>X-Purpose: preview</code>".</p>

<p>An easy way to verify this is to use an HTTP debugging proxy like <a href="http://www.fiddler2.com/" title="Fiddler Web Debugger - A free web debugging tool">Fiddler</a> or <a href="http://www.charlesproxy.com/" title="Charles Web Debugging Proxy &bull; HTTP Monitor / HTTP Proxy / HTTPS &amp; SSL Proxy / Reverse Proxy">Charles</a> to watch what happens when Top Sites makes a request &mdash; see the screen grabs below:</p>

<img src="http://sunpig.com/martin/images/2010/01/safari4requests.png" alt="Normal and Top Sites HTTP requests from Safari 4" />

<p>If your pages are dynamically generated, you can adjust your server-side code to examine the HTTP headers of the incoming request, and take appropriate action if this is a "preview" request.  Here's some sample PHP code:</p>

<pre><code>
&lt;?php
if ($_SERVER["HTTP_X_PURPOSE"] == "preview") {
	echo "preview";
} else {
	echo "normal";
}
?&gt;
</code></pre>

<p>(<code>"X-Purpose"</code> is not a standard HTTP header, and you won't find "HTTP_X_PURPOSE" in the PHP documentation.  It's the <a href="http://hoohoo.ncsa.illinois.edu/cgi/env.html" title="CGI Environment Variables">CGI specification</a> that specifies how HTTP headers should be handled: they should be made into an environment variable with an "HTTP_" prefix followed by the header name, with dashes replaced by underscores.  Hence, the value of the <code>"X-Purpose"</code> header is placed in the <code>"HTTP_X_PURPOSE"</code> environment variable, and retrieved as <code>$_SERVER["HTTP_X_PURPOSE"]</code>.)</p>

<p>If all you're looking to do it fix your site stats in Google Analytics, then you should just make sure that you don't write out the GA tracking code for preview requests.  If you are concerned about excessive load on your servers, unwanted user actions, or spurious advert impressions, you can take more aggressive action, perhaps by rendering a lightweight version of the page.  An extreme possibility I considered was generating a <em>completely</em> different version of the page, specifically designed to look good in the thumbnail format of the Top Sites preview page:</p>

<img src="http://sunpig.com/martin/images/2010/01/topsitessubverted.jpg" alt="Safari 4 Top Sites with custom preview thumbnail: PROBABLY A BAD IDEA" />

<p>However, doing this runs counter to the notion that these thumbnails represent <em>previews</em>, and I don't know how your users would react.  More importantly, Google might consider this <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=66355">cloaking</a>, and come round your house in the middle of the night with a baseball bat.  Just because it's possible, doesn't mean it's a good idea...</p>]]>
        
    </content>
</entry>

</feed>