<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>My name is Jay. I am an American living in Australia where I develop software and manage servers.</description><title>The Practice of Code</title><generator>Tumblr (3.0; @practiceofcode)</generator><link>http://www.practiceofcode.com/</link><item><title>Review of Waterfield Designs Muzetto for 11" MacBook Air</title><description>&lt;p&gt;I’ve always had a bit of a bag fetish, especially when it came to bags to store my technology in. In addition to loving the most portable pieces of technology (perfectly exemplified in the 11” MacBook Air being my computer of course), I’ve always loved the smallest and most minimal bags to support them. Whenever I get a new laptop, I always buy a second power adapter for it, so I can leave one at home, and one at work, and thus, not have to worry about making space for it in my bag.&lt;/p&gt;

&lt;p&gt;I had always been a big fan of Crumpler bags, and up until the point that Apple stopped making 12” laptops in favor of 13” widescreen laptops, getting a minimal Crumpler bag to support my laptop was always the best choice. But when Apple switched form factors, it was as if Crumpler was frustrated or annoyed, as it took them years to make a small, snug, form-fitting shoulder bag for the 13” Apple form factor. Instead of having such an offering, whenever I periodically checked into a Crumpler shop to see if they had woken up, they would push a 15” bag on me with extra bits of removal padding on the sides. No, thank you.&lt;/p&gt;

&lt;p&gt;So, when Apple released their latest return to the ultra-portable form factor with the 11” MacBook Air, I knew I had to have one, and I knew it deserved an equally impressive and portable bag. Luckily, with only a temporary and mild bit of stretching, my previously retired 12” Crumpler Skinny (S) actually suited it well at first, but I knew it wasn’t purpose-made; I was ready for something of a different style, and I was no longer interested in touting the Crumpler brand due to their abandonment of the Apple ultra-portable, so the search began.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;On and off for a year, I cruised various bag manufacturer websites trying to find the perfect bag. My criteria was simple:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;I wanted a shoulder bag.&lt;/li&gt;
&lt;li&gt;I wanted it to store the laptop on its side (portrait orientation as opposed to landscape).&lt;/li&gt;
&lt;li&gt;I wanted it to be as small as possible.&lt;/li&gt;
&lt;li&gt;And I really didn’t want it to look like a laptop bag.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;A year later, I &lt;em&gt;finally&lt;/em&gt; decided on the &lt;a href="http://www.sfbags.com/products/muzetto/muzetto.php" target="_blank"&gt;Muzetto&lt;/a&gt;, made by Waterfield Designs in San Francisco.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl97x4HC1qazoo2.jpg" alt="Official Muzetto product image"/&gt;&lt;/p&gt;

&lt;p&gt;Here it is hanging off the back of my chair:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfkxeOhHm1qazoo2.jpg" alt="Muzetto hanging on chair"/&gt;&lt;/p&gt;

&lt;p&gt;And here’s the inside:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfkxzbSaK1qazoo2.jpg" alt="Muzetto with flap open, with SleeveCase and Air sliding out"/&gt;&lt;/p&gt;

&lt;p&gt;So, inside, the MacBook Air is stored inside a padded sleeve, which fits perfectly inside the Muzetto. There’s even enough room to also store an iPad:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfkz6GZjW1qazoo2.jpg" alt="Muzetto with flap open, with SleeveCase, Air, and iPad sliding out"/&gt;&lt;/p&gt;

&lt;p&gt;Now, while the bag is &lt;em&gt;designed&lt;/em&gt; to hold a laptop, the Muzetto by itself is not padded. Rather, I also purchased a &lt;a href="http://www.sfbags.com/products/sleevecases/sleevecases.php" target="_blank"&gt;SleeveCase&lt;/a&gt; from Waterfield, available in a variety of sizes and options, including, but not limited to horizontal vs. vertical laptop entry, a flap or a Velcro strap, and more. Here’s the SleeveCase by itself:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl0uHHzC1qazoo2.jpg" alt="SleeveCase"/&gt;&lt;/p&gt;

&lt;p&gt;Now, one of the benefits of the Muzetto over its Crumpler predecessor is that the Muzetto’s flap is simply weighted. There is no fastener; no Velcro. The Crumpler strap used Velcro, which sort of sucked, because if I was in a quiet environment and wanted to take my laptop out, I had to get past the Velcro first, and that’s far from a quiet operation. Similarly to the Crumpler though, the SleeveCase strap that holds in the laptop also uses Velcro. Luckily, it’s easy enough to store the strap in the back of the SleeveCase:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl2xfDWe1qazoo2.jpg" alt="SleeveCase strap tucked in the back"/&gt;&lt;/p&gt;

&lt;p&gt;The laptop is held snuggly enough in the SleeveCase for me to not worry about not using the strap, and of course the outer Muzetto flap adds an extra layer of protection keeping the laptop in.&lt;/p&gt;

&lt;p&gt;So here is everything packed in nicely:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl3n8veE1qazoo2.jpg" alt="Muzetto with flap open, SleeveCase and MacBook Air inside"/&gt;&lt;/p&gt;

&lt;p&gt;And here’s what it looks like with everything removed. This configuration should be nicely suitable for an event where I need a bag and don’t need my laptop, although I can’t imagine what such an event would be.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl4h1ZJV1qazoo2.jpg" alt="Muzetto with flap open, nothing inside"/&gt;&lt;/p&gt;

&lt;p&gt;When you look inside this main pocket, Waterfield has used a shiny, reflective, bronze colored fabric for the interior, which helps reflect light and enable you to clearly see the contents inside, especially those potentially buried down low:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzfl569IKJ1qazoo2.jpg" alt="Inside the main pocket of the Muzetto"/&gt;&lt;/p&gt;

&lt;p&gt;There is also a separate pocket that is nearly the full height of the in front of that. That pocket has a very plush, dark gray material inside that is very soft to the touch and guaranteed to not scratch anything put inside it. There is also a stitched pocket inside that pocket, near the top, perfectly sized for a large phone (while capable of holding something larger than an iPhone, an iPhone would still fit perfectly).&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzflgnqT1g1qazoo2.jpg" alt="Front Muzetto pocket, showing phone pocket"/&gt;&lt;/p&gt;

&lt;p&gt;Alas, other than for when I’m going through airport security, I don’t envision using it for my phone, as my front, left pocket is always solely dedicated for that purpose.&lt;/p&gt;

&lt;p&gt;There are only 3 little accessories I regularly keep in this front pocket:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;An iPhone/iPod cable&lt;/li&gt;
&lt;li&gt;A USB to Ethernet adapter&lt;/li&gt;
&lt;li&gt;A Fisher Space Pen&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;The workmanship of the bag is exceptional. The leather is soft to the touch, beautifully treated, and as pleasing to the eye as it is to the touch. I chose the “flame” highlight color, which in my opinion, looks a bit more orange on the website than it does in person. Luckily, I’m even happier with the resulting color, than I was with my perception of it on the website.&lt;/p&gt;

&lt;p&gt;The bag’s footprint is pretty comparable to the Crumpler Skivvy, but the Muzetto is my preferred orientation, and as hip as Crumpler was, or may still be, the Muzetto is pure style and class. I think I could still appreciate an even smaller bag, but alas, this doesn’t seem to be a common enough market desire, as the Muzetto for the Air is about as small as you can get.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzflj5VNgQ1qazoo2.jpg" alt="Muzetto over my shoulder"/&gt;&lt;/p&gt;

&lt;p&gt;You don’t truly get to learn and appreciate a bag until you go away with it for at least a day in a foreign city or other foreign environment, and I haven’t had that opportunity yet, but I greatly look forward to that chance, expecting it to bring me closer and more appreciative of this great piece of work.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/17652985264</link><guid>http://www.practiceofcode.com/post/17652985264</guid><pubDate>Wed, 15 Feb 2012 21:09:00 +1000</pubDate><category>MacBook Air</category><category>Waterfield</category><category>Muzetto</category><category>laptop bag</category></item><item><title>Disable Greylisting under Lion Server</title><description>&lt;p&gt;Snow Leopard Server shipped with a postfix policy for greylisting email. It was easy enough to disable if you didn’t like it, and Server Admin was typically kind enough to not overwrite your settings. Unfortunately, Lion Server isn’t as nice about it.&lt;/p&gt;

&lt;p&gt;In addition to occasionally removing the greylisting policy on some servers, I &lt;em&gt;always&lt;/em&gt; like to alter the default smtpd_recipient_restrictions directive to include some additional parameters, as well as reorder them to work more efficiently. My directive is typically something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smtpd_recipient_restrictions = 
   reject_non_fqdn_recipient, check_recipient_access hash:/etc/postfix/access, 
   permit_mynetworks, reject_unauth_destination, 
   reject_non_fqdn_sender, check_sender_access hash:/etc/postfix/sender_access, 
   reject_non_fqdn_hostname, reject_invalid_helo_hostname, check_helo_access hash:/etc/postfix/helo_access, 
   reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, 
   permit
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Naturally, this &lt;em&gt;entire&lt;/em&gt; directive gets overwritten whenever Lion Server overwrites Postfix main.cf.&lt;/p&gt;

&lt;p&gt;So, I’ve written a script that checks to see if the smtpd_recipient_restrictions directive has been altered, and if so, returns it to the preferred state:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash
restrictions_preferred="reject_non_fqdn_recipient, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_hostname, reject_invalid_helo_hostname, check_helo_access hash:/etc/postfix/helo_access, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, permit";

restrictions_current_full="`postconf smtpd_recipient_restrictions`";
restrictions_current=${restrictions_current_full:31};

if test "$restrictions_preferred" = "$restrictions_current"
    then
    echo "Postfix smtpd restrictions are set correctly."
    exit 0;
else
    echo "Postfix smtpd restrictions are NOT set correctly."
    serveradmin settings mail:postfix:smtpd_recipient_restrictions = "$restrictions_preferred";
    exit 0;
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, update the first variable, &lt;code&gt;restrictions_preferred&lt;/code&gt;, to have the parameters you want to populate &lt;code&gt;smtpd_recipient_restrictions&lt;/code&gt; with. If all you’re looking to do is disable greylisting, just remove &lt;code&gt;check_policy_service unix:private/policy&lt;/code&gt; from the original directive in /etc/postfix/main.cf.&lt;/p&gt;

&lt;p&gt;I’ve personally saved this script at &lt;code&gt;/usr/local/bin/disable_greylisting.bash&lt;/code&gt; and set its permissions to 755. You can name it and put it anywhere you’d like, but note its full path as you’ll need it for the launchd job plist to trigger it. That plist is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;com.practiceofcode.disable_greylisting&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/local/bin/disable_greylisting.bash&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;StartInterval&lt;/key&gt;
    &lt;integer&gt;120&lt;/integer&gt;
&lt;/dict&gt;
&lt;/plist&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Similarly, I’ve placed that at &lt;code&gt;/Library/LaunchDaemons/com.practiceofcode.disable_greylisting.plist&lt;/code&gt;. This file needs to be owned by root:wheel and be 644. Again, you can name it as you’d like, but the value for &lt;code&gt;Label&lt;/code&gt; in the file’s contents should match the file name (leaving off the &lt;code&gt;.plist&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When the script detects that the directive needs to be repaired, it does so using the &lt;code&gt;serveradmin&lt;/code&gt; command. The benefit of using that command is &lt;code&gt;serveradmin&lt;/code&gt; automatically restarts Postfix after making the change. Since the script will not restart Postfix if the directive has not been changed, feel free to keep the &lt;code&gt;StartInterval&lt;/code&gt; at 120 seconds, or of similar high frequency, as there is little to no tax for just testing your configuration.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/15543512691</link><guid>http://www.practiceofcode.com/post/15543512691</guid><pubDate>Mon, 09 Jan 2012 11:54:02 +1000</pubDate><category>OS X Server</category><category>postfix</category><category>greylisting</category><category>Lion Server</category></item><item><title>Installing mtr under Lion (using homebrew)</title><description>&lt;p&gt;I still get a bit of traffic for my post on &lt;a href="http://thepracticeofcode.com/post/457590665/compiling-mtr-for-mac-os-x-snow-leopard" target="_blank"&gt;how to compile mtr under Snow Leopard&lt;/a&gt;, so I thought I’d write a update for anyone looking to install it on Lion.&lt;/p&gt;

&lt;p&gt;First of all, according to commenters, that process still works.&lt;/p&gt;

&lt;p&gt;However, I decided to try a different approach with Lion, by first installing the much-buzzed-about &lt;a href="http://mxcl.github.com/homebrew/" target="_blank"&gt;Homebrew&lt;/a&gt;.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;&lt;a href="http://mxcl.github.com/homebrew" target="_blank"&gt;Homebrew&lt;/a&gt; is a new package manager for OS X. I’ve always avoided OS X package managers because of all of the nightmare experiences I’ve read from folks using fink or MacPorts, but Homebrew immediately appealed to me for two reasons:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;It uses the conventional /usr/local directory&lt;/li&gt;
&lt;li&gt;It works without, and recommends against, using the &lt;code&gt;sudo&lt;/code&gt; command to install software&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Now, like any good system administrator, I don’t run my computer as an admin, so that last benefit particularly appealed to me.&lt;/p&gt;

&lt;p&gt;So, once you have Homebrew installed, installing the latest mtr is as easy as entering:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install mtr
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Done!&lt;/p&gt;

&lt;p&gt;However, there are a few common issues:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Issue 1: ‘unable to get raw sockets’&lt;/strong&gt;&lt;br/&gt;
mtr needs to run as root. Previously, when compiling from mtr source and using sudo, it would install itself with suid, meaning that it ran as root regardless of which user ran it. Obviously, this has the potential to be dangerous. If you really want to set the suid flag, that’s up to you, but beyond the scope of this post. I, and the folks at Homebrew, recommend that you run mtr using sudo &lt;em&gt;as needed&lt;/em&gt;, and keep the suid flag off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Issue 2: mtr runs in X11&lt;/strong&gt;&lt;br/&gt;
Once you get past the above issue, you might notice that mtr launches and runs in X11. This was not appealing to me at all. After doing some digging around, I found out that you could add the &lt;code&gt;-t&lt;/code&gt; flag to have mtr output in the terminal:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; mtr -t &lt;a href="http://www.apple.com" target="_blank"&gt;www.apple.com&lt;/a&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For a few days, I used it like this, but after &lt;a href="http://twitter.com/nelson" target="_blank"&gt;Nelson Minar&lt;/a&gt; linked to the &lt;a href="https://github.com/mxcl/homebrew/blob/master/Library/Formula/mtr.rb" target="_blank"&gt;Homebrew Formula&lt;/a&gt; in a &lt;a href="http://thepracticeofcode.com/post/457590665/compiling-mtr-for-mac-os-x-snow-leopard#comment-286565986" target="_blank"&gt;comment&lt;/a&gt; on my last mtr post, I noticed that you could pass &lt;code&gt;--no-gtk&lt;/code&gt; to brew and it would install mtr without the GUI. So I removed and reinstalled correctly:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; brew uninstall mtr
 brew install mtr --no-gtk
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That’s it! mtr now correctly runs in my terminal without any additional arguments.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/9016317950</link><guid>http://www.practiceofcode.com/post/9016317950</guid><pubDate>Wed, 17 Aug 2011 09:42:55 +1000</pubDate><category>OS X</category><category>Lion</category><category>Homebrew</category><category>mtr</category></item><item><title>MacBook Air SSD Benchmarks: 2010 vs 2011 vs Lion Encryption</title><description>&lt;h3&gt;&lt;em&gt;Updated with benchmarks for 2010 MacBook Air with Encryption as well as clearer charts and data&lt;/em&gt;&lt;/h3&gt;

&lt;p&gt;I purchased a 2010 11.6” MacBook Air earlier this year with the maximum, possible specs: 1.6 Core 2 Duo with 4 GB of RAM and a 128 GB SSD. I took a performance hit when I switched from my aluminum unibody MacBook (which had a 2.4GHz Core 2 Duo), but it never felt slower. As a matter of fact, it always felt &lt;em&gt;faster&lt;/em&gt;, to which most, if not all, will agree was due to the switch from a traditional hard drive to an SSD. Shortly after I purchased it in February, there were &lt;a href="http://www.anandtech.com/show/4275/apple-now-using-samsung-ssds-in-macbook-air" target="_blank"&gt;some reports&lt;/a&gt; that Apple was using different SSDs across the line, some made by Toshiba, and some made by Samsung, and the Samsung ones were faster. I had a Toshiba. Regardless, while I was able to condense my entire life to fir on 128 GB, down from 250 GB, I had no breathing room, so when the 2011 MacBook Airs were announced, I upgraded again.&lt;/p&gt;

&lt;p&gt;So I ordered a fully loaded 11.6” model, this time with a 1.8 GHz Core i7 with 4 GB of RAM and a 256 GB SSD. While awaiting its construction and arrival, some &lt;a href="http://cl.ly/8jQ7" target="_blank"&gt;initial&lt;/a&gt; &lt;a href="http://yfrog.com/h8h92p" target="_blank"&gt;benchmarks&lt;/a&gt; had been released on the web for Lion’s full disk encryption, aka FileVault 2. This was something I was very interested in, but the results seemed inconclusive to me, and none were specific to the upgrade I was awaiting. So, when my new machine arrived, I decided to record and publish my own benchmarks.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;Now, I am not a scientist, so please expect some human and environmental error here. First, the machine’s raw specs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2010 MacBook Air&lt;/strong&gt;&lt;br/&gt;
1.6 Core 2 Duo&lt;br/&gt;
4 GB of RAM&lt;br/&gt;
128 GB SSD (identified as an APPLE SSD TS128C)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2011 MacBook Air&lt;/strong&gt;&lt;br/&gt;
1.8 GHz Core i7&lt;br/&gt;
4 GB of RAM and a 256 GB SSD&lt;br/&gt;
256 GB SSD (identified as an APPLE SSD SM256C)&lt;/p&gt;

&lt;p&gt;I used &lt;a href="http://www.xbench.com/" target="_blank"&gt;XBench 1.3&lt;/a&gt;, only ran the disk test, ran it 3 or 4 times, and if any set of results was drastically different from the rest, I threw it away and averaged the rest.&lt;/p&gt;

&lt;p&gt;In both cases, I had a pretty pristine admin account (I create an admin account at first setup, and basically never touch it again). In the case of the &lt;strong&gt;2010 MacBook without Encryption&lt;/strong&gt; test, and both &lt;strong&gt;FileVault&lt;/strong&gt; tests, both drives had about 100GB of data on them. This differs from the &lt;strong&gt;2011 MacBook without Encryption&lt;/strong&gt; test as this was done relatively shortly after first turning on the new machine.&lt;/p&gt;

&lt;p&gt;So, without further ado, the results:&lt;/p&gt;

&lt;p&gt;Here is the summary:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lponbrPCeb1qazoo2.gif" alt="Benchmarks Summary"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;style type="text/css" media="screen"&gt;
    .benchmarks {
        width: 100%;
        font-size: 11px;
        margin-bottom: 2em;
        border-collapse: collapse;
    }
    .benchmarks th {
        padding: 2px 5px;
        text-align: right;
        font-weight: bold;
        background-color: #E6E6E6;
        border: 1px solid #E6E6E6;
    }
    .benchmarks td {
        border: 1px solid #E6E6E6;
        padding: 2px 5px;
        text-align: right;
        font-weight: normal;
    }
&lt;/style&gt;&lt;/p&gt;

&lt;table class="benchmarks"&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;
        &lt;th&gt;2010 Normal&lt;/th&gt;
        &lt;th&gt;2010 FileVault&lt;/th&gt;
        &lt;th&gt;2011 Normal&lt;/th&gt;
        &lt;th&gt;2011 FileVault&lt;/th&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Sequential&lt;/th&gt;
        &lt;td&gt;168.39&lt;/td&gt;
        &lt;td&gt;97.11&lt;/td&gt;
        &lt;td&gt;225.07&lt;/td&gt;
        &lt;td&gt;182.40&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Random&lt;/th&gt;
        &lt;td&gt;533.00&lt;/td&gt;
        &lt;td&gt;376.26&lt;/td&gt;
        &lt;td&gt;880.43&lt;/td&gt;
        &lt;td&gt;758.65&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Overall&lt;/th&gt;
        &lt;td&gt;255.92&lt;/td&gt;
        &lt;td&gt;154.30&lt;/td&gt;
        &lt;td&gt;358.44&lt;/td&gt;
        &lt;td&gt;294.09&lt;/td&gt;
    &lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Here are the details:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lponc4SjSp1qazoo2.gif" alt="Benchmark Details"/&gt;&lt;/p&gt;

&lt;table class="benchmarks"&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;
        &lt;th&gt;2010 Normal&lt;/th&gt;
        &lt;th&gt;2010 FileVault&lt;/th&gt;
        &lt;th&gt;2011 Normal&lt;/th&gt;
        &lt;th&gt;2011 FileVault&lt;/th&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Sequential&lt;/th&gt;
        &lt;td colspan="3"&gt;&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Write 4K&lt;/th&gt;
        &lt;td&gt;193.7 MB/sec&lt;/td&gt;
        &lt;td&gt;120.4 MB/sec&lt;/td&gt;
        &lt;td&gt;263.9 MB/sec&lt;/td&gt;
        &lt;td&gt;227.9 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Write 256K&lt;/th&gt;
        &lt;td&gt;147.7 MB/sec&lt;/td&gt;
        &lt;td&gt;75.9 MB/sec&lt;/td&gt;
        &lt;td&gt;191.7 MB/sec&lt;/td&gt;
        &lt;td&gt;171.7 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Read 4K&lt;/th&gt;
        &lt;td&gt;21.4 MB/sec&lt;/td&gt;
        &lt;td&gt;12.7 MB/sec&lt;/td&gt;
        &lt;td&gt;28.8 MB/sec&lt;/td&gt;
        &lt;td&gt;22.2 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Read 256K&lt;/th&gt;
        &lt;td&gt;166.4 MB/sec&lt;/td&gt;
        &lt;td&gt;90.9 MB/sec&lt;/td&gt;
        &lt;td&gt;216.8 MB/sec&lt;/td&gt;
        &lt;td&gt;186.8 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Random&lt;/th&gt;
        &lt;td colspan="3"&gt;&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Write 4K&lt;/th&gt;
        &lt;td&gt;36.9 MB/sec&lt;/td&gt;
        &lt;td&gt;46.0 MB/sec&lt;/td&gt;
        &lt;td&gt;83.8 MB/sec&lt;/td&gt;
        &lt;td&gt;84.6 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Write 256K&lt;/th&gt;
        &lt;td&gt;160.7 MB/sec&lt;/td&gt;
        &lt;td&gt;72.4 MB/sec&lt;/td&gt;
        &lt;td&gt;201.1 MB/sec&lt;/td&gt;
        &lt;td&gt;173.1 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Read 4K&lt;/th&gt;
        &lt;td&gt;9.2 MB/sec&lt;/td&gt;
        &lt;td&gt;6.7 MB/sec&lt;/td&gt;
        &lt;td&gt;12.7 MB/sec&lt;/td&gt;
        &lt;td&gt;10.9 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Uncached Read 256K&lt;/th&gt;
        &lt;td&gt;100.2 MB/sec&lt;/td&gt;
        &lt;td&gt;66.2 MB/sec&lt;/td&gt;
        &lt;td&gt;164.4 MB/sec&lt;/td&gt;
        &lt;td&gt;122.4 MB/sec&lt;/td&gt;
    &lt;/tr&gt;&lt;/table&gt;&lt;p&gt;So the jump from the 2010 MacBook Air Toshiba to the 2011 MacBook Air Samsung is pretty sizable (almost 65% faster at random tests, 40% overall). The dip in performance from enabling Lion FileVault on the 2011, while not drastic, is also not insignificant (18% overall), so that makes me personally quite happy, as I was able to double my storage capacity, add encryption, and still have an &lt;em&gt;overall&lt;/em&gt; performance improvement. However, the big story here is the dip in performance for the 2010 model with FileVault enabled, as the drop is much more sizable at 44%. Unfortunately, it’s difficult to know the exact cause, as there are a lot of variables at play here, including but not limited to:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;General machine architecture (Sandy Bridge vs. its predecessor)&lt;/li&gt;
&lt;li&gt;CPU type (The Core i7 has built-in technology to accelerate AES encryption)&lt;/li&gt;
&lt;li&gt;SSD make and manufacturer (Toshiba vs. Samsung)&lt;/li&gt;
&lt;li&gt;Unscientific testing&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;My personal take from the numbers is that Lion FileVault comes at a large performance hit on Core 2 Duo machines w/Toshiba drives; a performance hit that I would personally find unacceptable. Inversely, the performance hit on a Core i7 machine w/Samsung drive is 3x less drastic, and thus, for me, well worth it. But, as with all things performance related, perception is relative, so if you’re weighing up an upgrade, run &lt;a href="http://www.xbench.com/" target="_blank"&gt;XBench&lt;/a&gt; on your own machine and base your comparisons on that.&lt;/p&gt;

&lt;p&gt;I will still have the old machine for another week at least, and I’m happy to do any other tests or benchmarks, as well as answer any questions.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/8681712620</link><guid>http://www.practiceofcode.com/post/8681712620</guid><pubDate>Tue, 09 Aug 2011 17:42:00 +1000</pubDate><category>MacBook Air</category><category>SSD</category><category>Lion</category><category>FileVault</category><category>Benchmarks</category><category>Encryption</category></item><item><title>Add Twitter Profile Images to Lion Address Book with AppleScript</title><description>&lt;p&gt;The famous Cabel Sasser of Panic put out &lt;a href="https://twitter.com/#!/Cabel/statuses/96024951546593280" target="_blank"&gt;a tweet&lt;/a&gt; the other day regarding Lion’s Address Book’s new Twitter username support:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lp9twpU0Pu1qazoo2.gif" alt="@cabel: Dear Lion, Since there's a 'Twitter' field in Address Book, get the user picture! Then Mail's "Show contact photos in message list" = great."/&gt;&lt;/p&gt;

&lt;p&gt;I thought I’d take up the challenge and I hobbled together an AppleScript to pull this information down.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;pre&gt;&lt;code&gt;set twitterJSONField to "\"profile_image_url\":"
set twitterProfileImagePath to "/tmp/twitterProfileImage"

tell application "Address Book"
    set theSelection to selection
    repeat with thePerson in theSelection
        set twitterUsername to (user name of first social profile of thePerson whose service name is "Twitter")
        set twitterProfileJSON to do shell script "curl &lt;a href="http://twitter.com/users/show/" target="_blank"&gt;http://twitter.com/users/show/&lt;/a&gt;" &amp; twitterUsername &amp; ".json"

        set theStart to offset of twitterJSONField in twitterProfileJSON
        set theRest to (characters (theStart + (length of twitterJSONField) + 1) through (length of twitterProfileJSON) of twitterProfileJSON) as text
        set theSize to offset of "_normal" in theRest
        set theEnd to offset of "\"" in theRest
        set theImageURL to (characters 1 through (theSize - 1) of theRest) &amp; (characters (theSize + 7) through (theEnd - 1) of theRest) as text

        tell me to set AppleScript's text item delimiters to "\\"
        set theImageURLChunks to every text item of theImageURL
        tell me to set AppleScript's text item delimiters to ""
        set theImageURL to theImageURLChunks as text

        do shell script "curl -s '" &amp; theImageURL &amp; "' &gt; " &amp; twitterProfileImagePath
        set the twitterImageFile to (POSIX file twitterProfileImagePath) as alias
        set theImage to (read twitterImageFile as "TIFF")
        do shell script "rm " &amp; twitterProfileImagePath

        set image of thePerson to theImage
        save
    end repeat
end tell
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The script is a bit rough around the edges… has some clunky text parsing code, and no error checking code. It works off the user’s selection. So, select one user who has a Twitter username set in their address book card, and run the script. Assuming that all works well for you, you can make a Smart Group for people with Twitter info in their profile:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lp9txcR21z1qazoo2.gif" alt='"Card Contains Twitter" Smart Group'/&gt;&lt;/p&gt;

&lt;p&gt;Select every person in the group, and then run the script.&lt;/p&gt;

&lt;p&gt;Lastly, to make the script feel like a more natural piece of Address Book, I recommend activating the AppleScript menu (inside AppleScript Editor’s preferences), and storing the script in &lt;code&gt;~/Library/Scripts/Applications/Address Book&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lp9tyhwJus1qazoo2.png" alt="Using the script via the AppleScript menu"/&gt;&lt;/p&gt;

&lt;p&gt;If there’s enough demand, I’ll update the script to be a bit more clever, loop through the entire address book, and report on what it was and wasn’t able to do.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/8357781704</link><guid>http://www.practiceofcode.com/post/8357781704</guid><pubDate>Tue, 02 Aug 2011 08:49:48 +1000</pubDate></item><item><title>Providing Non-Administrators with Consistent Access to system.log</title><description>&lt;p&gt;Like every good computer user, I log into my laptop every day as a non-administrator. Using OS X, it’s quite easy to still run installers and escalate to admin rights on a per-use basis. This means that if some nefarious process wants to go on a deleting spree, it will at least be quarantined to my user folder.&lt;/p&gt;

&lt;p&gt;Like every good system administrator, I like to see what’s going on in system.log at any one time. I even use GeekTool to subtly, transparently overlay it on my desktop:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_loyuhtIM661qazoo2.png" alt="system.log overlaid on desktop using GeekTool"/&gt;&lt;/p&gt;

&lt;p&gt;Only one problem, only Administrators can view system.log.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;No problem! Easy fix. Add an ACL to allow the necessary user to have read access to it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chmod +a 'jay allow read' /var/log/system.log
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Well, there’s actually another problem. When the logs get rotated, you lose your ACL. So, I wrote this little shell script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash
PRIVILEGE='jay allow read'
LOG=/var/log/system.log
ACCESS=`ls -ale $LOG | grep "$PRIVILEGE"`
GEEKTOOL=GeekTool

if [ ! "$ACCESS" ]
    then
    echo "Access currendly denied."
    echo -n "Updating..."
    chmod +a "$PRIVILEGE" $LOG
    echo "Done"
    sleep 1
    echo "Killing GeekTool"
    killall GeekTool
    sleep 1
    echo "Opening GeekTool"
    sudo -u jay open -a $GEEKTOOL
fi
exit 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The scripts starts by checking if the user already have privileges. If they don’t, it updates the privileges, and restarts GeekTool. Now, don’t test this under your underprivileged user account, because naturally you won’t have the rights to &lt;code&gt;chmod system.log&lt;/code&gt;. However, I still liked storing it in my user’s home folder for compartmentalization. In my specific case, I stored it here:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/Users/jay/Library/Scripts/Applications/Finder/Enable System Log Access.bash
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Lastly, I created a launchd job to make this script run quite regularly to ensure system.log is viewable on my desktop:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
 &lt;plist version="1.0"&gt;
 &lt;dict&gt;
    &lt;key&gt;Disabled&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;net.thepracticeofcode.syslog&lt;/string&gt;
    &lt;key&gt;Program&lt;/key&gt;
    &lt;string&gt;/Users/jay/Library/Scripts/Applications/Finder/Enable System Log Access.bash&lt;/string&gt;
    &lt;key&gt;StartInterval&lt;/key&gt;
    &lt;integer&gt;30&lt;/integer&gt;
 &lt;/dict&gt;
 &lt;/plist&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This file needs to get stored in the /Library/LaunchDaemons folder at the root of your hard drive and owned by root:wheel. Name it whatever you’d like, but make sure the &lt;strong&gt;Label&lt;/strong&gt; property matches the name (sans the .plist). Also, make sure the path to the script is valid. You don’t need to escape it.&lt;/p&gt;

&lt;p&gt;You might notice I have set &lt;strong&gt;Disabled&lt;/strong&gt; set to true. This is my default for all launchd.plists so that they have to manually loaded for use on any &lt;em&gt;new&lt;/em&gt; computer. To do that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; launchctl load -w /Library/LaunchDaemons/net.thepracticeofcode.syslog.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Hopefully this will be of use to someone.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/8106809145</link><guid>http://www.practiceofcode.com/post/8106809145</guid><pubDate>Wed, 27 Jul 2011 10:26:40 +1000</pubDate><category>system.log</category><category>GeekTool</category><category>Unix</category><category>Shell Script</category></item><item><title>10.6 Server: Workaround for recurring CalDAV password dialogs on iOS devices - Mac OS X Hints</title><description>&lt;a href="http://hints.macworld.com/article.php?story=20110524024036889&amp;query=caldav digest"&gt;10.6 Server: Workaround for recurring CalDAV password dialogs on iOS devices - Mac OS X Hints&lt;/a&gt;: &lt;p&gt;Anyone using an iOS device with OS X Server’s Calendar service will be well acquainted with this issue. I’ve personally complained about it on Twitter before.&lt;/p&gt;

&lt;p&gt;I contacted the poster asking him how he discovered the solution and he pointed me to &lt;a href="https://discussions.apple.com/message/12700112#12700112" target="_blank"&gt;this post&lt;/a&gt; by wsanchez at Apple’s discussion forums. It seems people over there have had mixed results. &lt;strong&gt;I have not.&lt;/strong&gt; There are two CalDAV servers I use with my iOS devices and I implemented this fix on one, and it’s been considerably improved.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/6469493233</link><guid>http://www.practiceofcode.com/post/6469493233</guid><pubDate>Mon, 13 Jun 2011 09:30:22 +1000</pubDate></item><item><title>Inception Ringtones for iPhone</title><description>&lt;p&gt;The value is not so much inherent in their use as ringtones, but rather as alarm sounds.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://thepracticeofcode.net/blog/NonJeNeRegretteRien.m4r" target="_blank"&gt;Non Je Ne Regrette Rien&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://thepracticeofcode.net/blog/HalfRememberedDream.m4r" target="_blank"&gt;Half Remembered Dream&lt;/a&gt; (Non Je Ne Regrette Rien at &lt;a href="http://www.youtube.com/watch?v=UVkQ0C4qDvM" target="_blank"&gt;1/10th speed&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://thepracticeofcode.net/blog/528491.m4r" target="_blank"&gt;528491&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://www.practiceofcode.com/post/1241779441</link><guid>http://www.practiceofcode.com/post/1241779441</guid><pubDate>Mon, 04 Oct 2010 20:23:08 +1000</pubDate></item><item><title>iOS App WiFi Syncing works over Bluetooth Tethering</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l7bqomCdFc1qazoo2.png" alt=""/&gt;Was using my MacBook today tethered to my iPhone 4 over Bluetooth. WiFi was disabled on my Mac, and not connected on the iPhone. I launched Things.app, and to my great surprised, it synced! I tried syncing Jumsoft Money and Bento, and they also synced without a hitch.&lt;/p&gt;

&lt;p&gt;This makes perfect sense as OS X speaks Bonjour out of all its interfaces. I’m all but certain it would just fine over USB as well. Naturally, syncing over Bluetooth was not as quickly as syncing over WiFi.&lt;/p&gt;

&lt;p&gt;P.S. I even used PasteBot Sync (over Bluetooth) to grab the screenshot for this post.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/969549002</link><guid>http://www.practiceofcode.com/post/969549002</guid><pubDate>Wed, 18 Aug 2010 11:27:00 +1000</pubDate></item><item><title>Improved iCal CalDAV Support?</title><description>&lt;p&gt;I’ve never been able to accept a foreign event invitation directly into a CalDAV calendar instead of being forced to put it into a local calendar. With an event I received today, not only did it properly show up in iCal, but holding the Accept button gave me the choice of which CalDAV calendar to put it in:&lt;/p&gt;

&lt;p class="center"&gt;&lt;img alt="iCal Event Invitation" src="http://media.tumblr.com/tumblr_l6wpe3hHzX1qazoo2.png"/&gt;&lt;/p&gt;

&lt;p&gt;This must be a result of the 10.6.4 update. It’s long due.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/928855214</link><guid>http://www.practiceofcode.com/post/928855214</guid><pubDate>Tue, 10 Aug 2010 08:39:00 +1000</pubDate></item><item><title>Encrypted, Rotating Time Machine Backups on Snow Leopard</title><description>&lt;h4&gt;Changes in 10.6.5&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Unfortunatley, things have changed in 10.6.5, and I haven’t quite determined how to correct the automatic rotation part of this article. However, there are some workarounds in the comments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I like Time Machine. It’s automatic, incremental, efficient and easy to use. However, there are two features that Time Machine doesn’t have that I really like: encryption and rotation (for offsite backup). With the help of others, along with a bit of hacking around on my own, I’ve successfully enabled Time Machine to backup to an unlimited amount of rotating, encrypted hard disks. Here’s how…&lt;/p&gt;

&lt;!-- more --&gt;

&lt;h3&gt;Creating the Disk Image&lt;/h3&gt;

&lt;p&gt;When you use Time Machine to backup over the network to a Time Capsule or an OS X Server, Time Machine creates a disk image on that volume, and mounts that disk image, and backs up to the image. By using an image, Time Machine doesn’t have to worry about the permissions or configuration of the remote volume. Unfortunately, when Time Machine creates this image, it gives you no option to encrypt it, which disk images support, but that’s OK. We can create it ourselves.&lt;/p&gt;

&lt;p&gt;First, note the name of the computer you are backing up in the Sharing pane of System Preferences:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l4s20gpsIj1qazoo2.png" alt="System Preferences Sharing Pane"/&gt;&lt;/p&gt;

&lt;p&gt;This will be the name you give your disk image. In my case, there are no spaces or non-alphanumeric characters in my computer’s name. I recommend doing the same as I’m unsure if anything beyond that might cause an adverse reaction.&lt;/p&gt;

&lt;p&gt;Next, open Disk Utility and create a New Blank Disk Image (File -&gt; New -&gt; Blank Disk Image):&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l4s20wTx8e1qazoo2.png" alt="New Black Disk Image"/&gt;&lt;/p&gt;

&lt;p&gt;Note the relevant parameters:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: Time Machine Backups&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Size&lt;/strong&gt;: Choose an appropriate &lt;em&gt;custom&lt;/em&gt; size for your disk image. This is the maximum amount of storage space you want to dedicate to backups. Make sure this is at least 1% smaller than the backup drive(s) on which you’re going to be storing it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Format&lt;/strong&gt;: Mac OS Extended (Journaled)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encryption&lt;/strong&gt;: There are two different types, exchanging performance for security. I opt for the more secure flavor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Partitions&lt;/strong&gt;: Single partition. I’m in the habit of choosing Apple Partition Map for a PowerPC Mac and GUID Partition Map for an Intel Mac, but it shouldn’t make any difference.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Image Format&lt;/strong&gt;: sparse &lt;em&gt;bundle&lt;/em&gt; disk image&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l4s219dinm1qazoo2.png" alt="Custom Size"/&gt;Be warned that in the custom size sheet, if you enter an amount before changing the unit and then change the unit, your amount will be lost, so change the unit first.&lt;/p&gt;

&lt;p&gt;Save the image on to your backup drive, making sure to not place it in any folder. You will be prompted to enter the new disk image’s password twice and you will have the option to store it in your keychain. &lt;strong&gt;Make sure you do!&lt;/strong&gt; The image should automatically mount as Time Machine Backups on your desktop. If you don’t see it, you might want to make sure External Disks are configured to be Shown on the desktop in Finder’s Preferences:&lt;/p&gt;

&lt;p&gt;&lt;img alt="Finder Preferences" style="float:none;" src="http://media.tumblr.com/tumblr_l4s23kyRcO1qazoo2.png"/&gt;&lt;/p&gt;

&lt;p&gt;Eject it.&lt;/p&gt;

&lt;h3&gt;Enable Automatic Mounting&lt;/h3&gt;

&lt;p&gt;We need to let the system know the disk image’s password so it back up to it unattended. To facilitate this, we need to add it to the System keychain.&lt;/p&gt;

&lt;p&gt;In the Utilities folder, in your Applications folder, open Keychain Access.app. Make sure you can see a list of available Keychains in the top left, e.g. &lt;em&gt;login&lt;/em&gt; and &lt;em&gt;System&lt;/em&gt;. If not, go to the view menu and choose Show Keychains. In the main section of the window, you should see an entry named after your disk image, i.e. ComputerName.sparesbundle. Drag the ComputerName.sparsebundle entry from the list to the System keychain in the top left:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l4s2wlCMTN1qazoo2.png" alt="Keychain Access"/&gt;&lt;/p&gt;

&lt;p&gt;After releasing, you will be prompted to enter an administrator username and password. Time Machine can now backup to your disk image without your intervention.&lt;/p&gt;

&lt;h3&gt;Add Time Machine support to your disk image&lt;/h3&gt;

&lt;p&gt;A tip of my hat to &lt;a href="http://www.macosxhints.com/article.php?story=20090905212640957" title="10.6: Set up Time Machine on networked AFP volume - Mac OS X Hints" target="_blank"&gt;this article&lt;/a&gt; on Mac OS X Hints, on configuring Time Machine to backup to a remote volume, for showing me how to alter the image so that Time Machine correctly sees it as a proper backup destination.&lt;/p&gt;

&lt;p&gt;To start, you will need your computer’s UUID. Open System Profiler and in the default screen, it should be visible for you to highlight an copy:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l4s309xorJ1qazoo2.png" alt="System Profiler UUID"/&gt;&lt;/p&gt;

&lt;p&gt;Now, in a competent text editor, create a new file with the following contents:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;com.apple.backupd.HostUUID&lt;/key&gt;
    &lt;string&gt;YOUR-UUID-HERE&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It’s hopefully quite obvious, but make sure to replace &lt;code&gt;YOUR-UUID-HERE&lt;/code&gt; with the actual UUID you gathered from the System Profiler window.&lt;/p&gt;

&lt;p&gt;Save this file, naming it com.apple.TimeMachine.MachineID.plist.&lt;/p&gt;

&lt;p&gt;Now, you need to copy this file INSIDE the disk image &lt;em&gt;package&lt;/em&gt; (not the disk image &lt;em&gt;volume&lt;/em&gt;). What do I mean by that? Well, your disk image should be named something like ComputerName.sparsebundle. If you don’t see the .sparsebundle part, you might also want to make sure that “Show all filename extensions” is enabled in the Finder’s Preferences:&lt;/p&gt;

&lt;p&gt;&lt;img style="float:none;" src="http://media.tumblr.com/tumblr_l4s29dIXud1qazoo2.png" alt="Finder Preferences"/&gt;&lt;/p&gt;

&lt;p&gt;A .sparsebundle is what OS X calls a package. In reality, it’s actually a folder, with contents, but the fact it is a folder is hidden from the user. Right-click on the file (or control-click if you don’t have a 2 button mouse) and choose “Show Package Contents”:&lt;/p&gt;

&lt;p&gt;&lt;img style="float:none;" src="http://media.tumblr.com/tumblr_l4s29qzGvs1qazoo2.png" alt="Show Package Contents"/&gt;&lt;/p&gt;

&lt;p&gt;In the resulting window you should see the files and folders that make up a .sparsebundle. Copy or move your com.apple.TimeMachine.MachineID.plist into that directory, so it should look like this:&lt;/p&gt;

&lt;p&gt;&lt;img style="float:none;" src="http://media.tumblr.com/tumblr_l4s2ao8crR1qazoo2.png" alt="Disk Image Package Contents"/&gt;&lt;/p&gt;

&lt;p&gt;You can now close this window. Your disk image is ready!&lt;/p&gt;

&lt;h3&gt;Configuring Time Machine&lt;/h3&gt;

&lt;p&gt;In essence, the steps we have taken above are the same steps Time Machine automatically takes when backing up to a network volume for the first time (without the encryption of course). There’s a great little “feature” which I believe Apple enabled in order to assist users with doing their first large backup after configuring a Time Capsule, and that’s the ability to take the drive attached to a Time Capsule (after such a disk image has been created), plug it directly into one of the Mac’s that backs up to it, and that Mac will still backup to that disk image, rather than just backing up to the Backups.backupd directory as a directly connected Time Machine installation would. It is this feature that makes local backups to an encrypted disk image possible.&lt;/p&gt;

&lt;p&gt;Note that even in this situation, Time Machine will still &lt;em&gt;create&lt;/em&gt; the Backups.backupd directory if it doesn’t exist, but if all has gone well, it should have no contents.&lt;/p&gt;

&lt;p&gt;So, let’s review what we should have in place:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;An external disk connected.&lt;/li&gt;
&lt;li&gt;A self-created, encryped sparse bundle disk image located on that disk, named after the computer it’s connected to. The image should &lt;strong&gt;not&lt;/strong&gt; be mounted.&lt;/li&gt;
&lt;li&gt;A file named com.apple.TimeMachine.MachineID.plist containing our computer’s UUID located inside the disk image.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;If that’s all in place, let’s open System Preferences, go to Time Machine and select the Backup drive (not the image). A countdown timer should count down for 120 seconds before it starts its first backup. You can preempt it by choosing Backup Now from the menu bar, assuming you have checked “Show Time Machine status in the menu bar”. If everything has gone well, the first status message should say “Mounting backup disk image” and the Time Machine Backups volume should automatically appear on the desktop and the backup should start thereafter. Make sure that no files are appearing inside the Backups.backupd directory on the backup disk. If there are, it likely means that Time Machine is backing up to that directory instead of the disk image due to something not being correctly configured. If that’s the case, please reread all of the above to ensure you didn’t miss a step.&lt;/p&gt;

&lt;h3&gt;Preparing the additional backup drives.&lt;/h3&gt;

&lt;p&gt;There was a &lt;a href="http://curmi.com/blog/2008/08/23/time-machine-backup-to-rotating-disks/" title="Curmi the Blog  » Blog Archive   » Time Machine Backup to Rotating Disks" target="_blank"&gt;great article&lt;/a&gt; on Curmi The Blog that I followed in order to create rotating backups for Leopard Server. It involved ensuring that a hidden file identifying the backup drive was cloned over to any rotated backup drives in order to trick Time Machine into believing they were all the same drive. Hoping this would still work, I used the amazing &lt;a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html" title="SuperDuper!" target="_blank"&gt;SuperDuper!&lt;/a&gt; to clone my backup drive to another backup drive (making sure Time Machine was &lt;strong&gt;not running&lt;/strong&gt; and the disk image was &lt;strong&gt;not mounted&lt;/strong&gt; when doing so).&lt;/p&gt;

&lt;p&gt;However, Curmi’s method didn’t work under Snow Leopard and that identifying file was not present. Thus, I had to write a script to inform Time Machine that the backup drive had been rotate, so I’m not sure using SuperDuper! is necessary, but it certainly won’t hurt. If you’d like to try without it, simply copy your image, ComputerName.sparsebundle, to your additional backup drives.&lt;/p&gt;

&lt;p&gt;You can now test by manually rotating the backup drive. Safely eject the first drive and connect the second drive, then choose that drive in Time Machine’s settings in System Preferences. The countdown timer should begin again and Time Machine should backup to the additional backup drive, picking up from where the disk image left off.&lt;/p&gt;

&lt;h3&gt;Automating the backup drive rotation&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;THIS ONLY WORKS FOR 10.6.4 AND EARLIER. UPDATE TO COME SHORTLY&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I searched around for how to get Time Machine to automatically backup to the additional drives and none of the solutions were as seamless as Curmi’s. I found some scripts that used AppleScript interface scripting to click around the options in System Preferences to choose the secondary drive. I’m not a big fan of interface scripting, so I wrote a more silent shell script, supporting unlimited drives, requiring no third party software, that could work without anyone being logged in.&lt;/p&gt;

&lt;p&gt;This script expects that each rotating backup drive will have the same name, and that name is “Backup HD”. Using a competent text editor, create a new file with the following contents:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh
mountedDisk=`diskutil info "Backup HD" | awk '/UUID/ {print $3}'`;
if test $mountedDisk
    then
    echo "Mounted Disk UUID: $mountedDisk";
    configuredDisk=`defaults read /Library/Preferences/com.apple.TimeMachine DestinationVolumeUUID`;
    echo "Configured Disk UUID: $configuredDisk";
    if test $mountedDisk = $configuredDisk
        then
        echo "Configuration is correct."
    else
        echo "Configuration requires update. Updating..."
        defaults write /Library/Preferences/com.apple.TimeMachine DestinationVolumeUUID $mountedDisk
        echo "done."
    fi
else
    echo "No Backup HD found."
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure to change the reference to “Backup HD” (on the second line) to the name of your backup drive(s) if it differs.&lt;/p&gt;

&lt;p&gt;Save this file with an appropriate name to an appropriate location. I named it rotateDisk and installed it in /usr/local/bin, which is a more UNIX approach. Feel free to put it in /Applications/Utilities or any other preferred location. Note the full path to it as you will need to change its permissions as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chmod 755 /usr/local/bin/rotateDisk
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, how does this script work:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;First, it uses diskutil to get the UUID of any hard drive connected with the name “Backup HD”. If no such drive is connected, the script exits.&lt;/li&gt;
&lt;li&gt;Second, it checks Time Machine’s preferences to see which UUID it’s currently configured to backup to.&lt;/li&gt;
&lt;li&gt;If they don’t match, it updates Time Machine’s preferences to reflect the connected drive’s UUID.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Since Time Machine checks its preferences at each hourly backup, there’s no need to restart any process to observe the changed preferences.&lt;/p&gt;

&lt;p&gt;Using &lt;a href="http://developer.apple.com/macosx/launchd.html" title="Getting Started with launchd" target="_blank"&gt;launchd&lt;/a&gt;, part of OS X since Tiger, we can configure the above script to run any time a volume is mounted. Perfect!&lt;/p&gt;

&lt;p&gt;With our trusty text editor, let’s create a launchd job description:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;com.thepracticeofcode.TimeMachine.rotate&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/local/bin/rotateDisk&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;StartOnMount&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure to change the path to the script appropriately. You are welcome to use spaces in that declaration if necessary.&lt;/p&gt;

&lt;p&gt;This file needs to be stored in /Library/LaunchDaemons/ and it needs to be owned by root and have the following permissions:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-rw-r--r--  1 root  wheel  431 Jun 29 13:55 /Library/LaunchDaemons/com.thepracticeofcode.TimeMachine.rotate.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To facilitate that, after you have moved/copied it there, run (as root or with sudo):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chown root:wheel /Library/LaunchDaemons/com.thepracticeofcode.TimeMachine.rotate.plist
chmod 644 /Library/LaunchDaemons/com.thepracticeofcode.TimeMachine.rotate.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can load the job manually or it will automatically load at restart. To load manually, type (again, as root or with sudo):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;launchctl load /Library/LaunchDaemons/com.thepracticeofcode.TimeMachine.rotate.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To test, open Console and watch system.log and eject and re-connect one of your backup disks. If everything is going well, you should see the following output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Jun 29 22:43:27 server com.thepracticeofcode.TimeMachine.rotate[29635]: Mounted Disk UUID: 58513F29-10AD-3445-B251-9F0E51841A2C
Jun 29 22:43:27 server com.thepracticeofcode.TimeMachine.rotate[29635]: Configured Disk UUID: 58513F29-10AD-3445-B251-9F0E51841A2C
Jun 29 22:43:27 server com.thepracticeofcode.TimeMachine.rotate[29635]: Configuration is correct.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If the drive is different to the last drive configured, the output will be slightly different, like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Jun 29 13:55:41 server com.thepracticeofcode.TimeMachine.rotate[88102]: Mounted Disk UUID: 58513F29-10AD-3445-B251-9F0E51841A2C
Jun 29 13:55:41 server com.thepracticeofcode.TimeMachine.rotate[88102]: Configured Disk UUID: 996F3C3D-F83C-3FD4-84B5-B5AE1F5CB03D
Jun 29 13:55:41 server com.thepracticeofcode.TimeMachine.rotate[88102]: Configuration requires update. Updating...
Jun 29 13:55:41 server com.thepracticeofcode.TimeMachine.rotate[88102]: done.
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;a name="retrieving"&gt;&lt;/a&gt;Retrieving Backups Using Time Machine.app&lt;/h3&gt;

&lt;p&gt;Initially, I had never investigated using the Time Machine app to retrieve files. I had always used Terminal. A few commenters pointed out that using the Time Machine app to restore contents failed as it showed there were no backups present. However, commenter &lt;a href="#comment-120378464" target="_blank"&gt;Dev Null&lt;/a&gt; pointed to a &lt;a href="http://www.chuckburt.com/blog/2010/09/27/encrypting-a-time-machine-backup" target="_blank"&gt;similar article by Chuck Burt&lt;/a&gt; which offers the following trick:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“Note, that due to a bug in Time Machine, you will no longer be able to go to “Enter Time Machine” to browse your backups using the slick Time Machine UI. If you want to get around this, mount the sparse bundle. Once it is mounted, go to the Time Machine menu item and hold the option key. This will make an option appear called “Browse Other Time Machine Disks.” Click it (while holding option). A menu will pop up that allows you to enter the Time Machine interface.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;&lt;a name="retrieving"&gt;&lt;/a&gt;Performing a Full Restore using OS X DVD&lt;/h3&gt;

&lt;p&gt;Similar to to the last paragraph, this is not a feature I’ve ever used. However, much thanks to Brett Gallagher for writing in with a solution to this one:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you’re wanting to restore from a Time Machine backup using the OS X Install DVD, it’s not possible to automatically do so - the drive you’re using the backup with will show up, but once you select it it won’t show any backups as being available to select from. In order to get around this, you need to open Terminal, and type &lt;code&gt;hdiutil attach /Volumes/BackupDrive/ComputerName.sparsebundle&lt;/code&gt;, and enter the password for the .sparsebundle. Once you have done this, going back into “Restore from Time Machine backup” should present the disc image as an option, and the list of backups should be able to be selected from there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;That’s it!&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;Thanks to &lt;a href="http://curmi.com/blog/2008/08/23/time-machine-backup-to-rotating-disks/" title="Curmi the Blog  » Blog Archive   » Time Machine Backup to Rotating Disks" target="_blank"&gt;Curmi&lt;/a&gt; for showing me how to do this in Leopard.&lt;/li&gt;
&lt;li&gt;Thanks to &lt;a href="http://www.insanelymac.com/forum/index.php?showtopic=184462" title="[Guide] 10.6 (Snow Leopard) Time Machine backup to network share - InsanelyMac Forum" target="_blank"&gt;sunkid&lt;/a&gt; for showing me how to properly create a Time Machine backup image&lt;/li&gt;
&lt;li&gt;Thanks to &lt;a href="http://www.macosxhints.com/article.php?story=20090905212640957" title="10.6: Set up Time Machine on networked AFP volume - Mac OS X Hints" target="_blank"&gt;Mac OS X Hints&lt;/a&gt; for publishing sunkid’s hint.&lt;/li&gt;
&lt;li&gt;Thanks to &lt;a href="#comment-108211935" target="_blank"&gt;Alf&lt;/a&gt; and &lt;a href="#comment-120378464" target="_blank"&gt;Dev Null&lt;/a&gt; for rounding out the edges with some updates.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Please let me know if you find any inconsistencies or mistakes in the above or if something just isn’t working as expected.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/749686705</link><guid>http://www.practiceofcode.com/post/749686705</guid><pubDate>Wed, 30 Jun 2010 03:53:00 +1000</pubDate><category>OS X</category><category>OS X Server</category><category>Shell Scripting</category><category>launchd</category></item><item><title>Corrupted Disk Journal</title><description>&lt;p&gt;Ever had a disk that wouldn’t mount under OS X? In my case, it checked out under Disk Utility and fsck just fine. A look in Console revealed errors like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Jun 24 11:38:31 computer kernel[0]: jnl: disk2s3: open: journal magic is bad (0x0 != 0x4a4e4c78)
Jun 24 11:38:31 computer kernel[0]: hfs: late jnl init: failed to open/create the journal (retval 0).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We were able to resolve it by disabling the journal. We had to use the diskutil command line tool to accomplish this, and we had to add the force parameter. Use &lt;code&gt;diskutil list&lt;/code&gt; to identify the device ID of your volume. In my case, it was disk2s3. So the command to forcibly remove the journal was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;diskutil disableJournal force /dev/disk2s3
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.practiceofcode.com/post/730465582</link><guid>http://www.practiceofcode.com/post/730465582</guid><pubDate>Thu, 24 Jun 2010 16:28:03 +1000</pubDate></item><item><title>iOS4 offers domestic top level country code domain suffix when...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_l4gnku8wvW1qagejjo1_400.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;iOS4 offers domestic top level country code domain suffix when holding .com&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/728544495</link><guid>http://www.practiceofcode.com/post/728544495</guid><pubDate>Wed, 23 Jun 2010 19:26:49 +1000</pubDate></item><item><title>Are Widgets Coming to the iPad?</title><description>&lt;p&gt;While App Store rejections or removals are never a pleasant experience, many times they have illustrated what’s up ahead on Apple’s roadmap.&lt;/p&gt;

&lt;p&gt;This morning, I was saddened to see the news of an active frame application being pulled from the app store:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://twitter.com/rustyshelf/" target="_blank"&gt;@rustyshelf&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Just got off the Phone with Apple, they are going to pull My Frame out of the App Store! Get it while you still can! &lt;a href="http://bit.ly/b1m2wr" target="_blank"&gt;&lt;a href="http://bit.ly/b1m2wr" target="_blank"&gt;http://bit.ly/b1m2wr&lt;/a&gt;&lt;/a&gt; [&lt;a href="http://twitter.com/rustyshelf/status/15079666144" target="_blank"&gt;twitter&lt;/a&gt;]&lt;/p&gt;
  
  &lt;p&gt;I’m in shock. I’ve heard of Apple being jerks but never in person. Apparently they don’t like anything ‘widgety’. It’s not widgety! [&lt;a href="http://twitter.com/rustyshelf/status/15079729855" target="_blank"&gt;twitter&lt;/a&gt;]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Firstly, my condolences go to Russell and his team. Russell is an Australia developer I follow because he makes the wonderful &lt;a href="http://shiftyjelly.com/#pocketWeather" target="_blank"&gt;Pocket Weather&lt;/a&gt; iPhone app.&lt;/p&gt;

&lt;p&gt;But the reason is curious, isn’t it? The idea of widgets for the iPad is not new, and some consider the absence of core applications like Clock and Calculator to be glaring omissions. Will we see some type of OS level support enabling this kind of functionality at WWDC? Will it be open to developers?&lt;/p&gt;

&lt;p&gt;UPDATE:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://twitter.com/rustyshelf/status/15141742016" target="_blank"&gt;@rustyshelf&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Got a response from Steve Jobs: &lt;em&gt;“We are not allowing apps that create their own desktops.  Sorry.”&lt;/em&gt; on the My Frame removal.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://www.practiceofcode.com/post/649805803</link><guid>http://www.practiceofcode.com/post/649805803</guid><pubDate>Mon, 31 May 2010 22:23:00 +1000</pubDate></item><item><title>via chartier:

iPad + Velcro = ♥

via ideasareawesome</title><description>&lt;iframe src="http://player.vimeo.com/video/11886557" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;via &lt;a href="http://davebc.com/post/634747924/ipad-velcro-via-ideasareawesome" class="tumblr_blog" target="_blank"&gt;chartier&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;iPad + Velcro = ♥&lt;/p&gt;

&lt;p&gt;via &lt;a href="http://ideasareawesome.com/post/634653953/ipad-velcro" class="tumblr_blog" target="_blank"&gt;ideasareawesome&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://www.practiceofcode.com/post/637224867</link><guid>http://www.practiceofcode.com/post/637224867</guid><pubDate>Thu, 27 May 2010 20:07:14 +1000</pubDate></item><item><title>The "Open" Stick</title><description>&lt;p&gt;So there’s been an awful lot of talk about what is open and what is not open in the past few days. And what is “Open”? There’s quite a few different &lt;em&gt;kinds&lt;/em&gt; of open:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Open Source&lt;/li&gt;
&lt;li&gt;Open Standards&lt;/li&gt;
&lt;li&gt;Open Formats&lt;/li&gt;
&lt;li&gt;Open Platforms&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;In today’s highly heated and publicized Mobile Wars, each party is bashing their competitor(s) with a different “Open” stick, but all of these different types of sticks really only serve one purpose: &lt;strong&gt;anticompetitiveness&lt;/strong&gt;.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;div class="center"&gt;&lt;img src="http://media.tumblr.com/tumblr_l1bodytFts1qazoo2.jpg"/&gt;&lt;/div&gt;

&lt;h3&gt;Google&lt;/h3&gt;

&lt;p&gt;Primary Business Model: &lt;strong&gt;Advertising&lt;/strong&gt;&lt;br/&gt;
“Open” Sticks Wielded: &lt;strong&gt;Open Source, Open Standards, Open Platform&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l1bry1LHOp1qazoo2.jpg" alt=""/&gt;Google’s first arch rival was Microsoft, with its proprietary operating system and attempts to make java and the web proprietary. Google supported the declared Open Standards and Open Platform of the web and made compelling web apps using Open Source solutions in a move to help release developers and users from Microsoft’s stranglehold, landing them into the warm, welcoming arms of their web platforms and advertising.&lt;/p&gt;

&lt;p&gt;Google also recently entered the mobile operating system space with the quickly ascending Android, an allegedly Open Source operating system. It’s not entirely Open Source for their licensees, as they are not permitted to remove Google components like Gmail and Google Calendar. It’s also not entirely Open Source for the open source community, because they can’t get access to the source code for Gmail and the other commercially viable Google components.&lt;/p&gt;

&lt;p&gt;Another great example of the duality of Google is their decision to support and promote Flash on their Android phones. Flash does not match Google’s proclaimed visions of a Open Web Platform based on Open Standards, but Flash acts as an excellent differentiator in their quest against iPhone domination. Google is happy to throw Openness to the wayside in order to unite against a common, commercial foe.&lt;/p&gt;

&lt;h3&gt;Adobe&lt;/h3&gt;

&lt;p&gt;Primary Business Model: &lt;strong&gt;Selling Creative/Developer Tools&lt;/strong&gt;&lt;br/&gt;
“Open” Sticks Wielded: &lt;strong&gt;Open Format, Open Platform, Open Source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l1brefFgOX1qazoo2.jpg" alt=""/&gt;When Flash began its rise in the market, it was a powerful enabler for allowing developers to provide a level of interactivity not yet available on the web. Because it was vector based, it was extremely lightweight, which was prime for the series of tubes at that time.&lt;/p&gt;

&lt;p&gt;This was Adobe’s &lt;em&gt;second&lt;/em&gt; attempt to take control of the format of the web, after their initial failure with PDF. PDF was originally pitched as an alternative to HTML. As we all now know, it failed miserably in that regard, but succeeded beyond Adobe’s wildest expectations in every other area of document portability. With PDF, Adobe was targeting designers’ lack of desire to learn new tools, as well as their dismay at the lack of fonts and absolutely positioned elements. With their acquisition and promotion of Flash, they’ve aimed much higher, providing animation, interactivity, video and with the emerging Air and Flex, more full featured application development.&lt;/p&gt;

&lt;p&gt;Flash’s rise to video prominence was due to the lack of an Open Standard for video on the web. Microsoft, Apple and Real were all fighting it out. Then Flash stepped in, ending the video quagmire with one format to rule them all. Sites no longer had to worry about which format to provide or to show users various badges of all the different formats available. Flash had remarkable desktop penetration, so all web video quickly moved to Flash.&lt;/p&gt;

&lt;p&gt;Fast forward to now where Apple has decided to not include Flash in their mobile strategy. Apple was wielded an “Open” stick, stating that Flash is not an Open Standard. Adobe, in turn, has wielded their “Open” stick, declaring the iPhone OS a closed platform.&lt;/p&gt;

&lt;p&gt;Many have suggested that Adobe needs to Open Source Flash in order to stay compelling and relevant. Adobe has not seemed willing to do that, but instead informs that many of the relevant formats &lt;em&gt;are&lt;/em&gt; Open, specifically FLV, SWF and AMF.&lt;/p&gt;

&lt;p&gt;Lastly, Adobe is touting Google’s “Open” stick, Android, declaring it a true Open Platform, unlike its closed iPhone competitor.&lt;/p&gt;

&lt;h3&gt;Apple&lt;/h3&gt;

&lt;p&gt;Primary Business Model: &lt;strong&gt;Selling Black Boxes&lt;/strong&gt;&lt;br/&gt;
“Open” Sticks Wielded: &lt;strong&gt;Open Source, Open Standards, Open Formats&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l1bren46xz1qazoo2.jpg" alt=""/&gt;Apple’s been known from day one as being a company that makes closed systems, even more so during the times with Steve at the helm. When Apple made the switch to OS X, they setup much of the kernel and underlying UNIX components as Open Source projects. While much of that initial offering has languished, Apple has either forked or initiated numerous other Open Source projects, including but not limited to WebKit, QTSS, caldavd and launchd. Much like Android though, much of the meat in the sandwich is not available to the Open Source community.&lt;/p&gt;

&lt;p&gt;Fast forward to the iPhone where Apple has shunned Flash based on its lack of reliability, performance, and most publicly, stating that it is not an Open Standard, unlike the technologies Apple is pushing for the web, HTML/CSS/AJAX for websites and H.264 for video.&lt;/p&gt;

&lt;p&gt;Apple touts H.264 as an open standard, but H.264 is owned by a consortium of companies, of which Apple is one of. Licensing of H.264 is royalty free &lt;em&gt;until&lt;/em&gt; 2015, but what happens after then?&lt;/p&gt;

&lt;p&gt;Apple adopted the Canvas element for developing widgets for Dashboard in OS X. Apple is a major participant in the WHATWG, which is the group that began the HTML5 specification before handing it over to W3C and naturally, Canvas is included. Apple has allegedly claimed stake over the patents required, although for Canvas to be included in HTML5, Apple has to provide royalty free access to it.&lt;/p&gt;

&lt;h3&gt;So Who Is Open and Who Isn’t?&lt;/h3&gt;

&lt;p&gt;At this point, I’d say: &lt;em&gt;Who cares?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’ve been arguing and bickering with great friends and colleagues about the technological spats between these three companies and their supporters. I, too, have touted the “Open” stick in my arguments, and have had it used against me, but it’s now finally clear to me that in the case of &lt;strong&gt;all three companies&lt;/strong&gt;, their openness is a complete fraud. These companies are only “Open” insofar as it furthers their commercial agenda, endeavors and profitability.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Open”&lt;/em&gt; is simply the new &lt;em&gt;“Green”&lt;/em&gt;.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/552126780</link><guid>http://www.practiceofcode.com/post/552126780</guid><pubDate>Tue, 27 Apr 2010 11:24:11 +1000</pubDate></item><item><title>Facebook URL Helper 1.1</title><description>&lt;a href="http://releasecandidateone.com/215:facebook_url_helper_11"&gt;Facebook URL Helper 1.1&lt;/a&gt;: &lt;p&gt;A much more capable Facebook URL Help than &lt;a href="http://thepracticeofcode.com/post/455362784/facebook-helper-for-os-x" target="_blank"&gt;my own&lt;/a&gt;. It also predates mine. Project page &lt;a href="http://releasecandidateone.com/projects/fb-url" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/538135795</link><guid>http://www.practiceofcode.com/post/538135795</guid><pubDate>Wed, 21 Apr 2010 22:11:27 +1000</pubDate></item><item><title>Read alt/title text on iPhone OS devices via bookmarklet - Mac OS X Hints</title><description>&lt;a href="http://www.macosxhints.com/article.php?story=20100404045906105"&gt;Read alt/title text on iPhone OS devices via bookmarklet - Mac OS X Hints&lt;/a&gt;: &lt;p&gt;For anyone that’s ever wanted to properly read XKCD on an iPhone&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/501730135</link><guid>http://www.practiceofcode.com/post/501730135</guid><pubDate>Wed, 07 Apr 2010 09:20:07 +1000</pubDate></item><item><title>Compiling MTR for Mac OS X Snow Leopard</title><description>&lt;p&gt;Of all the great tips in the &lt;a href="http://blog.thepracticeofcode.com/post/457542168/top-ten-one-liners-from-commandlinefu-explained-good" target="_blank"&gt;last post&lt;/a&gt;, I was moved to go and try out &lt;a href="http://www.bitwizard.nl/mtr/" target="_blank"&gt;mtr&lt;/a&gt;, aka Matt’s Traceroute (or My Traceroute?), which is a command line tool that integrates ping with traceroute. When run, you get great, constantly updating results like this:&lt;/p&gt;

&lt;p&gt;&lt;img class="nofloat" src="http://media.tumblr.com/tumblr_kzi4ryRQQU1qazoo2.png" width="500" height="279"/&gt;&lt;/p&gt;

&lt;!-- more --&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;Note: This post assumes you’ve compiled software before. If not, just make sure you install Developer Tools (aka XCode) from the OS X Installer disc or from &lt;a href="http://developer.apple.com/" target="_blank"&gt;developer.apple.com&lt;/a&gt; before you try this.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Attempts to download and compile the latest source from the &lt;a href="http://www.bitwizard.nl/mtr/" target="_blank"&gt;developer’s site&lt;/a&gt; failed. I googled around and found a working &lt;a href="http://planetmac.co.uk/downloads/" target="_blank"&gt;pre-compiled version&lt;/a&gt;, but I hate not using the latest version and not being able to compile it myself, so I searched around and found &lt;a href="http://archimedeseureka.blogspot.com/2009/12/cant-install-mtr-in-leopard.html" target="_blank"&gt;the solution&lt;/a&gt;. So, here are the steps to take to compile the &lt;a href="ftp://ftp.bitwizard.nl/mtr/mtr-0.75.tar.gz" target="_blank"&gt;latest mtr&lt;/a&gt; (0.75 at the time of writing).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export LIBS='-lm -ltermcap -lresolv'
./configure
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That’s it!&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/457590665</link><guid>http://www.practiceofcode.com/post/457590665</guid><pubDate>Fri, 19 Mar 2010 09:51:00 +1000</pubDate></item><item><title>Top Ten One-Liners from CommandLineFu Explained - good coders code, great reuse</title><description>&lt;a href="http://www.catonmat.net/blog/top-ten-one-liners-from-commandlinefu-explained/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+catonmat+%28good+coders+code%2C+great+reuse%29"&gt;Top Ten One-Liners from CommandLineFu Explained - good coders code, great reuse&lt;/a&gt;: &lt;p&gt;Absolute gold. Some real gems in there.&lt;/p&gt;</description><link>http://www.practiceofcode.com/post/457542168</link><guid>http://www.practiceofcode.com/post/457542168</guid><pubDate>Fri, 19 Mar 2010 09:26:04 +1000</pubDate></item></channel></rss>

