<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>n8blog</title>
	<atom:link href="http://www.n8gray.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.n8gray.org</link>
	<description>distraction in action</description>
	<lastBuildDate>Thu, 10 Dec 2009 04:36:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>World, meet HexaLex for iPhone</title>
		<link>http://www.n8gray.org/blog/2009/12/09/world-meet-hexalex-for-iphone/</link>
		<comments>http://www.n8gray.org/blog/2009/12/09/world-meet-hexalex-for-iphone/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:00:08 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[HexaLex]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=184</guid>
		<description><![CDATA[
Some of you have probably noticed that I&#8217;ve been neglecting some of my other projects and complaining about being busy a lot lately.  Well here&#8217;s what I&#8217;ve been working on.  I&#8217;m pleased to announce HexaLex, a new angle on crossword games!  The first platform for HexaLex is iPhone and iPod Touch, but [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hexalex.com"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/Hexalex-logo.png" alt="Hexalex-logo" title="The HexaLex Logo" width="286" height="112" class="aligncenter clearnone noborder size-full wp-image-186" /></a></p>

    <div class="alignleft">
    <script type="text/javascript"> digg_url = "http://digg.com/apple/Scrabble_Gets_Hexed";</script>
    <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
    </div>

<p>Some of you have probably noticed that I&#8217;ve been neglecting <a href="http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/">some of</a> <a href="http://www.n8gray.org/blog/2007/04/27/introducing-backup-bouncer/">my other projects</a> and complaining about being busy a lot lately.  Well here&#8217;s what I&#8217;ve been working on.  I&#8217;m pleased to announce <a href="http://hexalex.com">HexaLex, a new angle on crossword games</a>!  The first platform for HexaLex is iPhone and iPod Touch, but I&#8217;m planning to expand to Facebook in the near future.</p>
<div id="attachment_192" class="wp-caption alignright" style="width: 218px"><a href="http://www.n8gray.org/wp-content/uploads/2009/12/game.png"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/game-208x300.png" alt="HexaLex as it looks in-game" title="game" width="208" height="300" class="size-medium wp-image-192" /></a><p class="wp-caption-text">HexaLex as it looks in-game</p></div>
<p>If you want to get a quick overview of the game and a list of features go ahead and visit <a href="http://hexalex.com">the HexaLex.com website</a>.  If you want to read some great 5-star reviews or buy the game just pop on over to <a href="http://itunes.apple.com/us/app/hexalex/id337380581?mt=8">the App Store</a>.  Continue reading for a little more detail on the core concept of the game.</p>
<p>HexaLex is an idea I came up with a little over a year ago as a grad student.  The core gameplay is a lot like Scrabble, Words With Friends, or Lexulous, so if you&#8217;ve played one of those games you&#8217;ll get the idea right away.  You use tiles to build words on a game board.  But HexaLex has a big difference &#8212; it&#8217;s played with hexagonal tiles.  Looks interesting, right?</p>
<p>Playing a crossword game with hexagonal tiles sounds like a simple idea but it actually requires a bit of creative thinking to make it playable and fun.  (This is probably why it hasn&#8217;t been done a million times already!)  You see, when two words cross with square tiles they only interact at one tile &#8212; the tile of intersection.  With hexagonal tiles, that&#8217;s not the case.  Hex tiles cause interactions at the tile of intersection <em>and</em> its neighbors!  This means that playing one word across another word also forms two new two-letter words.  This is sort of hard to describe, but easy to see as a picture (like the one below).</p>
<div id="attachment_187" class="wp-caption alignleft" style="width: 227px"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/start-crazy.png" alt="Crossing START with CRAZY forms RT and RZ" title="start-crazy" width="217" height="147" class="clearboth imgborder size-full wp-image-187" /><p class="wp-caption-text">Crossing START with CRAZY forms RT and RZ</p></div>
<p>Traditionally, in crossword games you have to make every word on the board valid.  If you just take the standard rules and try to use them with hexagonal tiles you&#8217;ll quickly discover that the game is unplayably hard.  It&#8217;s just frustrating to have to work out two valid two-letter words for each and every crossing play.</p>
<p>The way I solved this in HexaLex was to introduce the idea of <em>junk words</em>.  A junk word is a two-letter word that&#8217;s not a valid word.  So XR, TQ, and ZA are examples of junk words.  (Oops, ZA is actually a valid word, at least in the strange world of crossword games.)  In HexaLex you are allowed to play junk words subject to a few restrictions:</p>
<div id="attachment_201" class="wp-caption alignright" style="width: 218px"><a href="http://www.n8gray.org/wp-content/uploads/2009/12/main-menu.png"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/main-menu-208x300.png" alt="The main menu features a sliding word animation" title="The main menu" width="208" height="300" class="size-medium wp-image-201" /></a><p class="wp-caption-text">The main menu features a sliding word animation</p></div>
<div>
<ul>
<li>You can only play 2 of them per turn</li>
<li>You can&#8217;t use a junk word as your only link to the tiles that are already on the board.</li>
<li>You don&#8217;t get any points for junk words</li>
</ul>
</div>
<p>With junk words, a simple play of one word crossing another is always possible provided the two words share a letter.  The game is playable once again and balance is restored!</p>
<p>So now you know that when you look at a HexaLex game it&#8217;s OK that some of the two-letter words are bogus, but all of the longer words have to be legit.</p>
<p>Junk words aren&#8217;t the only break from Scrabble tradition in HexaLex but I&#8217;ll leave the rest for another post.  <img src='http://www.n8gray.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

    <div class="alignleft">
    <script type="text/javascript"> digg_url = "http://digg.com/apple/Scrabble_Gets_Hexed";</script>
    <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
    </div>

<p>HexaLex is available now in the App Store.   Give it a shot!  Initial App Store reviews have been overwhelmingly positive, with fourteen unanimous 5-star ratings and reviews so far.  If you enjoy HexaLex please let me know!  You can also <a target="_blank" href="http://www.facebook.com/pages/HexaLex/329287970006">become a HexaLex fan on Facebook</a> and/or <a target="_blank" href="http://twitter.com/hexalexgame">follow HexaLexGame on Twitter</a>.  Also, please help spread the word by clicking the digg button!</p>
<p><a href="http://hexalex.com"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/get-hexalex.png" alt="Get HexaLex" title="Get HexaLex" width="159" height="57" class="aligncenter noborder size-full wp-image-206" /></a></p>
<div class="aligncenter" style="width:72px">
<a target="_blank" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F12%2F09%2Fworld-meet-hexalex-for-iphone%2F&#038;t=World%2C%20meet%20HexaLex%20for%20iPhone"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/facebookicon.png" alt="Share on Facebook" title="Share on Facebook" width="32" height="32" class="noborder size-full wp-image-234" /></a> <a target="_blank" href="http://twitter.com/home?status=World%2C%20meet%20HexaLex%20for%20iPhone.%20Like%20Scrabble%20with%20hexagonal%20tiles%3A%20http%3A%2F%2Fbit.ly%2F7drkeN"><img src="http://www.n8gray.org/wp-content/uploads/2009/12/twittericon.png" alt="Tweet this" title="Tweet this" width="32" height="32" class="noborder size-full wp-image-233" /></a>
</div>
<p><img src="http://www.n8gray.org/wp-content/uploads/2009/12/Icon-rounded-75x75.png" alt="The HexaLex Icon" title="The HexaLex Icon" width="75" height="75" class="aligncenter size-full wp-image-245" /></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F12%2F09%2Fworld-meet-hexalex-for-iphone%2F&amp;linkname=World%2C%20meet%20HexaLex%20for%20iPhone"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/12/09/world-meet-hexalex-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brush-off via Bug Report</title>
		<link>http://www.n8gray.org/blog/2009/09/24/brush-off-via-bug-report/</link>
		<comments>http://www.n8gray.org/blog/2009/09/24/brush-off-via-bug-report/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:20:49 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=182</guid>
		<description><![CDATA[As QLColorCode fans are aware, Snow Leopard&#8217;s version of Xcode has caused some trouble for me.  To wit, Xcode 3.2 shipped a Quick Look plugin that registered for the public.source-code uniform type identifier1 (UTI), which is the primary UTI that QLCC registers for so it can do it&#8217;s magic.  In the world of [...]]]></description>
			<content:encoded><![CDATA[<p>As <span class="caps">QLC</span>olorCode fans are aware, <a href="http://www.n8gray.org/blog/2009/09/16/qlcolorcode-20-and-snow-leopard-woes/">Snow Leopard&#8217;s version of Xcode has caused some trouble for me</a>.  To wit, Xcode 3.2 shipped a Quick Look plugin that registered for the public.source-code uniform type identifier<sup class="footnote"><a href="#fn1">1</a></sup> (UTI), which is the primary <span class="caps">UTI </span>that <span class="caps">QLCC </span>registers for so it can do it&#8217;s magic.  In the world of applications it&#8217;s possible to bring up the Finder&#8217;s Get Info dialog on a file of a given type and assign it and it&#8217;s kin to some application, but there&#8217;s no such interface for Quick Look plugins.  Thus, there is no way to express a preference for <span class="caps">QLCC </span>over Xcode without <a href="http://code.google.com/p/qlcolorcode/wiki/ImportantNoteForXcodeUsers">removing or renaming the Xcode plugin</a>.</p>

<p>To make matters worse, the system&#8217;s top-secret non-configurable algorithm for resolving conflicts appears to work backwards from what users might hope for.  The Xcode plugin lives inside an Apple-supplied app bundle in a system directory.  It&#8217;s installed automatically if you choose to install Xcode itself, so it can easily up on your system without you even knowing it.  Compare this to <span class="caps">QLCC. </span> You, the user, have actively downloaded it and installed it for the express purpose of handling source code files in the Quick Look system.  You can easily remove it if you decide you don&#8217;t like it anymore.  Which plugin do you think should win if they conflict?  Apple thinks different.  The system always picks the Xcode plugin over <span class="caps">QLCC.</span></p>

<p>But come on, if you&#8217;re going to have a system like this there ought to be a way of saying &#8220;I want plugin X to handle <span class="caps">UTI</span> Y.&#8221;  This could be a nice shiny user interface somewhere or a down-n-dirty terminal command, but it needs to exist.  I sent a bug report to Apple saying as much (rdar://7240036, mirrored <a href="http://openradar.appspot.com/7240036">here</a>).  I described my problem and made it clear that the solution ought to be a preference system for Quick Look.  At the very least, I said, user-installed plugins should rule supreme.</p>

<p>Apple engineering&#8217;s response?  You can register for more specific <span class="caps">UTI</span>s than public.source-code.  Nothing about why they don&#8217;t want to have a preference system or let user-installed plugins override others.  Just &#8220;register for more specific <span class="caps">UTI</span>s.&#8221;  The idiocy of this suggestion is staggering.  The whole purpose of the hierarchical nature of the <span class="caps">UTI </span>system is to allow folks like me to say &#8220;I handle source code&#8221; without having to list every type of source code.  Highlight, the library that <span class="caps">QLCC </span>is based on, can colorize about 140 programming languages.  Apple engineering, with a straight face, is telling me that I should be registering for 140 <span class="caps">UTI</span>s because Xcode decided to register for the one I actually need.</p>

<p>It gets worse.  Even if I decided to take Apple&#8217;s advice, it&#8217;s impossible to say what those 140 <span class="caps">UTI</span>s should actually be, because there&#8217;s no central authority for registering <span class="caps">UTI</span>s.  (This is another glaring flaw with the <span class="caps">UTI </span>system as implemented by Apple.)  <span class="caps">UTI</span>s like <code>org.ocaml.ocaml-source</code> are generally defined and bound to file extensions like <code>.ml</code> by applications or other entities like Quick Look plugins.  So what happens if you install one app that binds <code>.ml</code> to <code>org.ocaml.ocaml-source</code> and another that binds it to <code>fr.inria.ocaml-source</code>?  Your guess is as good as mine.  That&#8217;s another bit of non-configurable secret sauce.  But I think it&#8217;s safe to say that only one will win.</p>

<p>So let&#8217;s go back to my hypothetical 140-UTI plugin.  Imagine the confusion and headaches when a user&#8217;s <code>.ml</code> files stop being highlighted just because she happened to download some random app that bound <code>.ml</code> to <code>fr.inria.ocaml-source</code> and my plugin has registered for <code>org.ocaml.ocaml-source</code>.  Can you imagine trying to solve these problems for random users of 140 programming languages, of which you actively use maybe 10?</p>

<p>But really, this is just an example of brush-off via bug report.  Despite my slagging I do believe the engineers at Apple are generally quite talented and bright.  They must know that the problem exists, but for whatever reason they&#8217;ve decided it&#8217;s not worth solving.  Furthermore, they&#8217;ve decided it&#8217;s not worth telling some no-name hacker why they think it&#8217;s not worth solving.  But the most insulting thing is that they didn&#8217;t even bother to mark my issue as a duplicate of some other issue requesting a prefs system for Quick Look.  (You&#8217;d better believe that one exists.)</p>

<p>&#8220;Go register for more specific <span class="caps">UTI</span>s, kid, yer bothering me.&#8221;</p>

<p class="footnote" id="fn1"><sup>1</sup> If you&#8217;re unfamiliar with the <span class="caps">UTI </span>system, John Siracusa&#8217;s encyclopedic review of Tiger has <a href="http://arstechnica.com/apple/reviews/2005/04/macosx-10-4.ars/11">a detailed description</a>.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F09%2F24%2Fbrush-off-via-bug-report%2F&amp;linkname=Brush-off%20via%20Bug%20Report"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/09/24/brush-off-via-bug-report/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Instruments problem on Snow Leopard</title>
		<link>http://www.n8gray.org/blog/2009/09/21/instruments-problem-on-snow-leopard/</link>
		<comments>http://www.n8gray.org/blog/2009/09/21/instruments-problem-on-snow-leopard/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 00:34:27 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=181</guid>
		<description><![CDATA[This is a quick note for any iPhone devs out there who are having problems getting their stack traces to show up with symbols in the Leaks instrument when running on the simulator.  It turns out that this is an issue with using the iPhone SDK 3.0.  If you switch your active SDK [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick note for any iPhone devs out there who are having problems getting their stack traces to show up with symbols in the Leaks instrument when running on the simulator.  It turns out that this is an issue with using the iPhone <span class="caps">SDK</span> 3.0.  If you switch your active <span class="caps">SDK </span>to 3.1 in Xcode then the symbols will appear again.  Apple says they&#8217;re &#8220;aggressively&#8221; working on the issue.</p>

<p>For history&#8217;s sake, I&#8217;m observing this on Snow Leopard 10.6.1, Xcode 3.2, Instruments 2.0.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F09%2F21%2Finstruments-problem-on-snow-leopard%2F&amp;linkname=Instruments%20problem%20on%20Snow%20Leopard"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/09/21/instruments-problem-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QLColorCode 2.0 and Snow Leopard woes</title>
		<link>http://www.n8gray.org/blog/2009/09/16/qlcolorcode-20-and-snow-leopard-woes/</link>
		<comments>http://www.n8gray.org/blog/2009/09/16/qlcolorcode-20-and-snow-leopard-woes/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 06:56:19 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=180</guid>
		<description><![CDATA[Update: Thanks to a misconfiguration on my part, QLCC 2.0.0 didn&#8217;t work on Leopard.  The problem is solved in QLCC 2.0.2.


Continuing on my &#8220;update side projects for Snow Leopard&#8221; theme, I&#8217;ve just rolled a new release of QLColorCode.  I added support for a few new languages, including Scala, which is a personal fave. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><strong>Update:</strong> Thanks to a misconfiguration on my part, <span class="caps">QLCC</span> 2.0.0 didn&#8217;t work on Leopard.  The problem is solved in <span class="caps">QLCC</span> 2.0.2.
</blockquote>

<p>Continuing on my &#8220;update side projects for Snow Leopard&#8221; theme, I&#8217;ve just rolled a new release of <span class="caps">QLC</span>olorCode.  I added support for a few new languages, including Scala, which is a personal fave.  I also fixed a bug or two and finally upgraded the bundled version of Highlight from 2.6.6 to 2.12, which was long overdue.</p>

<p>On the &#8216;meta&#8217; side, I moved the project&#8217;s source code from google code&#8217;s subversion to github.  I&#8217;ve been using git a lot lately so I expect I&#8217;ll do the same for my other projects as well.  Once you&#8217;ve gotten used to firing off branches for every little thing that crosses your mind and seamlessly switching between them at a moment&#8217;s notice it becomes hard to work in the <span class="caps">SVN </span>mindset again.</p>

<p>Unfortunately, <span class="caps">QLCC </span>has hit a bit of a roadblock with Snow Leopard.  More specifically, it&#8217;s not SnoLep that&#8217;s giving me a headache, it&#8217;s Xcode 3.2.  With the new Xcode Apple decided to include their own QL plugin for source code.  That&#8217;s great, I say, more choice is good!  <span class="caps">QLCC </span>will render everything that Xcode renders plus OCaml files, Scala files, and all sorts of other interesting languages that Xcode can&#8217;t handle.  I&#8217;m not worried about <span class="caps">QLCC </span>losing in a fair fight.  But no, Apple doesn&#8217;t fight fair.</p>

<p>It turns out that Quick Look always picks the Xcode plugin when rendering source code files (on my machine, at least).  I don&#8217;t think the Xcode plugin gets special treatment, it just happens to win in the algorithm QL uses to resolve plugin conflicts.  What is that algorithm?  Nobody outside of Apple knows.  It could be a coin-flip for all we know.  Heck, after a reboot it&#8217;s possible <span class="caps">QLCC </span>will always win!  In any case, when there are two plugins that both want to render files of type <code>public.source-code</code> it seems like maybe letting the user pick one would be a good idea, right?  Apple doesn&#8217;t think so.  No, they don&#8217;t want users to worry their pretty little heads about such matters.  Don&#8217;t worry about the algorithm, don&#8217;t worry about making choices, it&#8217;ll all be juuust fine.  Have a lollipop.</p>

<p>Except it&#8217;s not all fine.  Because let&#8217;s say a user decides that they prefer <span class="caps">QLCC </span>over the Xcode plugin.  Their only option for getting <span class="caps">QLCC </span>consistently and predictably is to somehow disable Xcode&#8217;s plugin.  They could remove it, rename it, or move it somewhere that <code>quicklookd</code> won&#8217;t find it.  But who wants to do something like that to an Apple-supplied file?  Nobody.  Even worse, Xcode&#8217;s application bundle is cryptographically signed.  <del datetime="2009-09-18T06:50:27+00:00">I believe that disabling the plugin by any of those means will invalidate the signature, though I haven&#8217;t confirmed this as fact.</del></p>

<p><strong>Update:</strong> After further research, it appears that disabling the plugin will <strong>not</strong> invalidate the signature on Xcode itself, so there shouldn&#8217;t be any terrible consequences if you choose to do so.  The plugin is located at: <code>/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator</code></p>

<p>So anyhow, <span class="caps">QLC</span>olorCode 2.0 is out.  It works with Snow Leopard.  If you have Xcode 3.2 installed you&#8217;ll probably never get to see it do its thing, but maybe one or two of you will still get something out of it.</p>

<p>For what it&#8217;s worth, quick look still sends .plist files to <span class="caps">QLCC. </span> Xcode&#8217;s plugin won&#8217;t touch those things.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F09%2F16%2Fqlcolorcode-20-and-snow-leopard-woes%2F&amp;linkname=QLColorCode%202.0%20and%20Snow%20Leopard%20woes"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/09/16/qlcolorcode-20-and-snow-leopard-woes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup Bouncer 0.2.0</title>
		<link>http://www.n8gray.org/blog/2009/09/15/backup-bouncer-020/</link>
		<comments>http://www.n8gray.org/blog/2009/09/15/backup-bouncer-020/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 01:49:59 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Backup-Bouncer]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=179</guid>
		<description><![CDATA[I just wrapped up Backup Bouncer 0.2.0, with the major change being that it now builds on Snow Leopard.  Get it at the usual place.  BB used to include a program called ctool that I had thought about using but never actually used.  This ctool program was unmaintained and didn&#8217;t build on [...]]]></description>
			<content:encoded><![CDATA[<p>I just wrapped up Backup Bouncer 0.2.0, with the major change being that it now builds on Snow Leopard.  Get it at <a href="http://www.n8gray.org/code/backup-bouncer/">the usual place</a>.  BB used to include a program called ctool that I had thought about using but never <strong>actually</strong> used.  This ctool program was unmaintained and didn&#8217;t build on SnoLep, so I finally just wiped it out.</p>

<p>All is not quite well on the Snow Leopard front, however.  The rsync that Apple ships (at least the one in 10.6.1) has a bug.  When copying a <span class="caps">FIFO </span>it attempts to copy the <strong>contents</strong> of the <span class="caps">FIFO. </span> If you know what a <span class="caps">FIFO </span>is, you know why this is bad.  So rsync hangs in the <code>90-fifo</code> test of the test suite.  When running from a terminal you can work around this by just hitting Control-C, which will cause the copy to stop and the other copiers to be tested.  If you want to avoid the hang you can rename <code>tests.d/90-fifo.test</code> to <code>tests.d/90-fifo.test.disabled</code> or whatever floats your boat.  I haven&#8217;t done that already because, well, a hang is arguably a valid test result!</p>

<p>Oh, and I also fixed a bug with the <span class="caps">BSD </span>flags test.  If you care about that stuff you should re-test.</p>

<p>One other interesting tidbit &#8212; I changed the &#8220;lots of metadata&#8221; test to lock the file.  This trips up some copiers that duplicate the &#8220;locked&#8221; status before setting up other metadata, causing the other metadata to be lost.</p>

<p>Much to my shame, I had an e-mail upheaval and I can&#8217;t find the names of the individuals who reported the <span class="caps">BSD </span>flags bug and the &#8220;early locking&#8221; phenomenon.  If that was you, please drop me a message and I&#8217;ll give you the credit you deserve.</p>

<p><strong><span class="caps">UPDATE</span>:</strong>  It was Rob Kennedy who reported the <span class="caps">BSD </span>flags bug and the &#8220;early locking&#8221; phenomenon.  I hadn&#8217;t thought to search through my blog comments.  Silly me!  Thanks a lot for those tips, Rob!</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F09%2F15%2Fbackup-bouncer-020%2F&amp;linkname=Backup%20Bouncer%200.2.0"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/09/15/backup-bouncer-020/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Sorry for the downtime!</title>
		<link>http://www.n8gray.org/blog/2009/03/07/sorry-for-the-downtime/</link>
		<comments>http://www.n8gray.org/blog/2009/03/07/sorry-for-the-downtime/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:21:39 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=178</guid>
		<description><![CDATA[I apologize for letting n8gray.org fall off the planet for so long.  My server got migrated without warning and events in real life overtook me as well.  In any case, the site&#8217;s back up now and I hope everything&#8217;s working again.  Please let me know if you find something broken!]]></description>
			<content:encoded><![CDATA[<p>I apologize for letting n8gray.org fall off the planet for so long.  My server got migrated without warning and events in real life overtook me as well.  In any case, the site&#8217;s back up now and I hope everything&#8217;s working again.  Please let me know if you find something broken!</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2009%2F03%2F07%2Fsorry-for-the-downtime%2F&amp;linkname=Sorry%20for%20the%20downtime%21"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2009/03/07/sorry-for-the-downtime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reviving Forget-Me-Not</title>
		<link>http://www.n8gray.org/blog/2008/12/15/reviving-forget-me-not/</link>
		<comments>http://www.n8gray.org/blog/2008/12/15/reviving-forget-me-not/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 19:25:22 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Forget-Me-Not]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=177</guid>
		<description><![CDATA[I get a lot of mail from people wishing Forget-Me-Not worked in Leopard.  For them, I&#8217;m happy to report some hopeful news.  A while back I was contacted by a senior Apple representative who expressed interest in helping me revive Forget-Me-Not.  In the end, after consulting with Apple engineers, it was decided [...]]]></description>
			<content:encoded><![CDATA[<p>I get a lot of mail from people wishing Forget-Me-Not worked in Leopard.  For them, I&#8217;m happy to report some hopeful news.  A while back I was contacted by a senior Apple representative who expressed interest in helping me revive Forget-Me-Not.  In the end, after consulting with Apple engineers, it was decided that the way to go forward would be to provide a new <span class="caps">API </span>suitable for <span class="caps">FMN. </span> This conclusion was slightly surprising to me, because it seems like the <span class="caps">API </span>we&#8217;re using should be suitable, but then again I&#8217;m not an Apple engineer.  In any case, if you want to revive <span class="caps">FMN, </span>please file a bug report at http://bugreport.apple.com (requires a free <span class="caps">ADC </span>membership) and say you want to support the enhancement in bug report 6018339.  You don&#8217;t have to say much of anything, just make sure to reference that bug number &#8212; Apple considers duplicate bug reports &#8220;votes&#8221;, so you want to make dead sure they know it&#8217;s a duplicate.</p>

<p>Before you get your hopes up, please understand that this contact was made back in the early summer and nothing much has come from it.  Hopefully a few &#8220;votes&#8221; for the issue will get the ball rolling again.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F12%2F15%2Freviving-forget-me-not%2F&amp;linkname=Reviving%20Forget-Me-Not"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/12/15/reviving-forget-me-not/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Edirol/Roland Makes Good</title>
		<link>http://www.n8gray.org/blog/2008/09/18/edirolroland-makes-good/</link>
		<comments>http://www.n8gray.org/blog/2008/09/18/edirolroland-makes-good/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 01:14:19 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=176</guid>
		<description><![CDATA[In bygone days of yore I wrote a rather angry post about my Edirol PCR-30 midi controller, whose key contacts failed after essentially zero use.  In my post I mentioned e-mailing Roland support about the issue but I got no response, so I just let it drop.  After all, the thing was out [...]]]></description>
			<content:encoded><![CDATA[<p>In bygone days of yore I wrote <a href="http://www.n8gray.org/blog/2005/10/15/edirol-pcr-30-dead-keys/">a rather angry post about my Edirol <span class="caps">PCR</span>-30 midi controller</a>, whose key contacts failed after essentially zero use.  In my post I mentioned e-mailing Roland support about the issue but I got no response, so I just let it drop.  After all, the thing was out of warrantee and I had other stuff to deal with.</p>

<p>Last week I randomly decided to google around and see if anybody else had found a solution to the problem.  Well, the results of the search were pretty interesting.  The problem was ubiquitous &#8212; tons of folks with <span class="caps">PCR </span>controllers built around the same time as mine reported it on forums and review sites.  (This was <em>not</em> the case when I first discovered the problem, by the way.)  Some people reported that opening the keyboard and rubbing the key contacts with a stiff pencil eraser brought them back to life, which got me thinking.  These things are just electrical contacts, right?  Why not put conductive paint on the contacts?  <em>That</em> should get them working again for good!</p>

<p>So I did a goog for &#8220;conductive paint&#8221; and one of the first links that came up was <a href="http://www.action-electronics.com/conductivepaint.htm">this one</a>.  And hey, can you believe it?  They sell a &#8220;Rubber Keypad Repair Kit&#8221;!  (MG Chemicals, cat. #8339.)  <strong>Hallelujah</strong>, exactly what I wanted!  It&#8217;s actually designed for repairing remote controls, but midi controllers work on the same principle.  I decided to order one and gave it a shot.  (BTW, my experience with Action Electronics was very good.)</p>

<p>How did it turn out?  Well, it was good but not great.  The kit did, in fact, manage to revive almost all of my keys.  Why didn&#8217;t it work for all of them?  Well, each key actually has <em>two</em> contacts underneath, and a bit of experimentation revealed that the time interval between closing the two contacts is quite important for the keyboard performance.  (I assume this is how they sense the velocity with which you struck the key.)  If they close in the wrong order, for example, no note is triggered.  I think that the added thickness of the paint (which didn&#8217;t always go on particularly smoothly) caused timing problems with some of the keys, perhaps even causing the contacts to close in the wrong order.  I tried sanding off the paint and repainting the bad keys, but it never quite worked for all the keys.</p>

<p>I tried to live with this for a while &#8212; it was, after all, a big improvement over the keyboard&#8217;s previous condition.  But the fact is, there are times in any musician&#8217;s life when only D# will do, and using D or E as a workaround just doesn&#8217;t cut it.  Finally, I decided that it couldn&#8217;t hurt to call Roland and try talking to a live person.  After some bouncing around in their phone system (boy do they have awful muzak when you&#8217;re on hold!) they actually gave me approval to send in my keyboard!  This despite it being many years out of warrantee and my admission that I&#8217;d tried to fix the problem myself!  </p>

<p>I was a little bit afraid that their technician would investigate the problem, find the contacts covered with conductive paint, and stamp <strong><span class="caps">DENIED</span></strong> on my <span class="caps">RMA </span>ticket with an evil laugh, but no such thing happened.  I suspect they just swapped out the whole keyboard assembly without ever uncovering my handiwork &#8212; why bother removing all the keys when this is a known defect?  So after 3 days I had my <span class="caps">PCR</span>-30 back in fully working condition for no cost other than the time and gas required to drop the thing off at the nearby Roland factory and pick it up again.  Kudos to Roland for making good after all these years!</p>

<p>So anyhow, the moral of the story is that talking to people by phone works better than e-mail, at least if those people are Roland employees.  Or maybe it&#8217;s that conductive paint doesn&#8217;t work as well as you might hope.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F09%2F18%2Fedirolroland-makes-good%2F&amp;linkname=Edirol%2FRoland%20Makes%20Good"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/09/18/edirolroland-makes-good/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Printing from OS X 10.5 to Ubuntu</title>
		<link>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/</link>
		<comments>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 02:20:15 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=175</guid>
		<description><![CDATA[This took me waaaay too long to figure out.  A while back I set up printer sharing (with browsing) on my Ubuntu-based server.  My Mac (running Tiger at the time) found the server just fine and it all just worked &#8212; I couldn&#8217;t believe how simple it was!  But then I upgraded [...]]]></description>
			<content:encoded><![CDATA[<p>This took me waaaay too long to figure out.  A while back I set up printer sharing (with browsing) on my Ubuntu-based server.  My Mac (running Tiger at the time) found the server just fine and it all just worked &#8212; I couldn&#8217;t believe how simple it was!  But then I upgraded to Leopard, and among the (numerous) casualties was the shared printer.  No matter what I tried, what protocol I used, what driver I used, the shared printer just wouldn&#8217;t work.  After hours of banging my head against the keyboard I let it go.  About 9 months have passed, and today I decided to take one more swing at.  Can you believe it?  I found the problem!  There were two problems really.</p>

<p>First, to access a shared printer on <strong>another</strong> machine, you have to turn on print sharing on <strong>your</strong> machine.  This defies all logic, but there you go.</p>

<p>Second, for some utterly inscrutable reason <a href="http://docs.info.apple.com/article.html?artnum=306984">Apple decided to *dis*able the <span class="caps">CUPS </span>browsing protocol, leaving only Bonjour browsing working</a>.  ????  Stupid.  Stupid.  Stupid.  It&#8217;s as if they said &#8220;let&#8217;s make sure Mac users will have lots of trouble printing to Linux servers, that&#8217;ll improve our customer satisfaction!&#8221;  To fix this lameness, do the following:</p>

<code> cupsctl BrowseProtocols='&quot;cups dnssd&quot;'</code>

<p>Combining these two tips, the shared printer <strong>finally</strong> appeared in the &#8220;Default&#8221; pane of the new printer dialog and printing to it just worked.  Hopefully Apple makes this more sensible in Snow Leopard&#8230;</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F06%2F12%2Fprinting-from-os-x-105-to-ubuntu%2F&amp;linkname=Printing%20from%20OS%20X%2010.5%20to%20Ubuntu"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup Bouncer and Time Machine</title>
		<link>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/</link>
		<comments>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 00:18:36 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Backup-Bouncer]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=174</guid>
		<description><![CDATA[Oh Mama!  Another Backup Bouncer post!  You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point.  If so, you have seriously underestimated my laziness.  But this morning I got an e-mail from a [...]]]></description>
			<content:encoded><![CDATA[<p>Oh Mama!  Another Backup Bouncer post!  You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point.  If so, you have seriously underestimated my laziness.  But this morning I got an e-mail from a user asking for help testing TM with <span class="caps">BB, </span>and this finally spurred me to do the test myself.</p>

<p>Here&#8217;s how you test Time Machine with Backup Bouncer:</p>



<pre>$ mkdir ~/bb
# We need to trick BB into thinking this is a volume it created
$ touch ~/bb/bbouncer-vol
$ sudo bbouncer create ~/bb
# Now do a Time Machine backup and wait till it's done
$ mv ~/bb ~/bb-orig
# Now restore the ~/bb directory from Time Machine.  
# Try not to catch SPACE MADNESS!!!
$ bbouncer verify -d ~/bb-orig ~/bb
</pre>



<p>On my Leopard 10.5.3 machine here&#8217;s what I get with BB 0.1.3:</p>



<pre>Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... FAIL 
Verifying:            hardlinks ... FAIL (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... ok 
Verifying:        creation-date ... ok 
Verifying:            bsd-flags ... FAIL 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... ok 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... FAIL 
Verifying:              devices ... FAIL 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 
</pre>



<p>The only annoyance is that hardlinks aren&#8217;t preserved, but that&#8217;s not surprising considering the way hardlinks are used internally by TM to prevent wasted space.  (I should point out that the hardlink failure here is <strong>not</strong> the same as <a href="http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/">the Apple rsync one I mentioned earlier today</a>, and it&#8217;s not nearly as bad.)  These results are not perfect but I would have no problem recommending TM backups to any less-than-hardcore user.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F06%2F09%2Fbackup-bouncer-and-time-machine%2F&amp;linkname=Backup%20Bouncer%20and%20Time%20Machine"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>More Backup Bouncer</title>
		<link>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/</link>
		<comments>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 23:09:47 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Backup-Bouncer]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=173</guid>
		<description><![CDATA[I just released Backup Bouncer 0.1.3.  I&#8217;ve changed the output format to print the &#8220;priority&#8221; of a test along with its outcome, which hopefully should clear up some confusion among less experienced users.  On a tip from Patrick Power I&#8217;ve added a new test that combines resource forks and hard links.  Unfortunately, [...]]]></description>
			<content:encoded><![CDATA[<p>I just released <a href="http://www.n8gray.org/code/backup-bouncer/">Backup Bouncer 0.1.3</a>.  I&#8217;ve changed the output format to print the &#8220;priority&#8221; of a test along with its outcome, which hopefully should clear up <a href="http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/">some confusion</a> among less experienced users.  On a tip from <a href="http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/#comment-20735">Patrick Power</a> I&#8217;ve added a new test that combines resource forks and hard links.  Unfortunately, Apple&#8217;s rsync fails this test in OS X 10.5.3:</p>



<pre>------------------ rsync-apple ------------------
Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... ok 
Verifying:            hardlinks ... ok (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... FAIL 
Verifying:        creation-date ... FAIL 
Verifying:            bsd-flags ... ok 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... FAIL 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... ok 
Verifying:              devices ... ok 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 
</pre>



<p>If you add a resource fork to a file that&#8217;s hardlinked to another file then only one of the files gets copied.  <img src='http://www.n8gray.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   This, no doubt, is due to the hackery involved to make <span class="caps">HFS</span>+ look like it has a real hardlinks when it actually doesn&#8217;t.</p>

<p>Some of the changes in BB 0.1.3 were a bit invasive and Bash is not the greatest of programming languages, so please keep your eyes open for bugs.  If you see something in your results that doesn&#8217;t make sense just let me know.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F06%2F09%2Fmore-backup-bouncer%2F&amp;linkname=More%20Backup%20Bouncer"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Backup Bouncer is Working, Confusing, Annoying Developers</title>
		<link>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/</link>
		<comments>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 20:05:38 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Backup-Bouncer]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=172</guid>
		<description><![CDATA[A friend recently pointed out that BB gets some love on the Carbon Copy Cloner product page.  This is quite satisfying to me, since my indirect goal with BB was to get it into the hands of the folks making the tools.  The primary goal was always to let users validate backup tools [...]]]></description>
			<content:encoded><![CDATA[<p>A friend recently pointed out that BB gets some love on <a href="http://www.bombich.com/software/ccc.html">the Carbon Copy Cloner product page</a>.  This is quite satisfying to me, since my indirect goal with BB was to get it into the hands of the folks making the tools.  The primary goal was always to let users validate backup tools on their own, but it was always clear that this would end up putting pressure on the tool makers.  When a user comes to you and says, &#8220;your tool fails backup bouncer test foo,&#8221; you either pay attention or lose a customer.  This is very empowering for end-users, but one can see how it has the potential to irritate tool developers if they disagree with <span class="caps">BB&#8217;</span>s test methodology.</p>

<p><span id="more-172"></span></p>

<p>So I wasn&#8217;t too surprised when a user forwarded me a somewhat exasperated-sounding note from Shirt Pocket software explaining why SD doesn&#8217;t pass <span class="caps">BB&#8217;</span>s <span class="caps">FIFO </span>and device file tests.  I won&#8217;t paste the note in here, since I feel that would be poor form, but I will pass along their rationale for not copying these files.  They feel that <span class="caps">FIFO</span>s and device files are normally system-created files that are not meant to be preserved across reboots or backups.  For that reason, SD doesn&#8217;t back up these filesystem object types at all.</p>

<p>One can understand how Shirt Pocket arrived at this policy.  Writing a good <i>system-level</i> backup tool is more subtle than it might appear.  There are actually parts of the filesystem that you <strong>don&#8217;t</strong> want to back up, like caches, VM files, and so forth.  You <strong>don&#8217;t</strong> want to back up the device files under <code>/dev</code>, since those get created dynamically depending on what devices are attached.  In short, there are some parts of the filesystem that are tied to the state of the running system, and these should not normally be copied in a backup.</p>

<p>The problem with Shirt Pocket&#8217;s policy is that although it is certainly true that the system-created <span class="caps">FIFO</span>s and device files should not be copied in a system-level backup, there are legitimate reasons a <strong>user</strong> might create <span class="caps">FIFO</span>s or device files, and there&#8217;s every reason to preserve those user-created objects during a backup.  Don&#8217;t get me wrong &#8212; this is obscure stuff that only advanced <span class="caps">UNIX </span>hackers would do, but hey, advanced <span class="caps">UNIX </span>hackers need reliable backups too!  <span class="caps">SD&#8217;</span>s policy is, <span class="caps">IMHO, </span>overly broad.  I would be much more comfortable if SD excluded filesystem <strong>locations</strong> rather than entire classes of filesystem objects.</p>

<p>The Shirt Pocket letter also accused BB of being &#8220;rather misleading to most&#8221; on this issue because it makes people worry about something that won&#8217;t cause them any problems.  Although I vehemently disagree with the &#8220;misleading&#8221; characterization, I agree that not every BB test is equally important in practical terms.  Most end-users will absolutely not care that tool X doesn&#8217;t backup <span class="caps">FIFO</span>s.  This is why BB has <strong>always</strong> had a prioritization feature.  Quoting from the usage string of bbouncer:</p>


<pre>-T &lt;set&gt;     Use the given set of tests.  &lt;set&gt; can be either 
             &quot;critical&quot;, for tests whose failure will cause problems
             for average users, or &quot;important&quot;, for tests whose
             failure may not cause problems for many users, but which
             may be important to power-users or may qualify as 
             critical in the future.
</pre>



<p>The <span class="caps">FIFO</span>/device file tests are not included in either the &#8220;critical&#8221; or &#8220;important&#8221; set of tests.  So I&#8217;m saying (and have always said) that most users, even most power users, won&#8217;t care about them.  So why test for them at all?  Consider the situation before <a href="http://blog.plasticsfuture.org/2006/03/05/the-state-of-backup-and-cloning-tools-under-mac-os-x/">Maurits&#8217; blogged on backups</a> and BB existed.  Most people, myself included, didn&#8217;t even know what the full set of OS X filesystem object types and metadata <strong>was</strong>.  Maurits filled us in on what existed, but knowing how to test for preservation was still a black art.  BB was meant to democratize that testing, but also to act as an <strong>exhaustive</strong> test set.  (I don&#8217;t claim to have achieved even close to 100% coverage, but that&#8217;s the goal.)  So it&#8217;s important to me that BB include tests for any metadatum or filesystem object that can conceivably have a reason to be backed up.</p>

<p>Having said that, I&#8217;ll concede there&#8217;s a usability bug here.  The -T option is unlikely to be discovered by casual users, and they&#8217;re the ones who need it most!  It&#8217;s not used by <code>autopilot</code> and it&#8217;s not even documented in the <span class="caps">README. </span> So I think I&#8217;ll be making the following changes:</p>


<ul>
<li>I&#8217;ll document -T more pervasively</li>
<li>I&#8217;ll have the priority of a test appear in <span class="caps">BB&#8217;</span>s output</li>
<li>I&#8217;ll have BB default to running in &#8220;important&#8221; mode, changing the exhaustive mode to an opt-in option</li>
</ul>



<p>Hopefully this will help prevent confusion for casual users and ease the support burden of tool developers while maintaining <span class="caps">BB&#8217;</span>s goals of providing easy backup tool validation and exhaustive test coverage.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F06%2F02%2Fbackup-bouncer-is-working%2F&amp;linkname=Backup%20Bouncer%20is%20Working%2C%20Confusing%2C%20Annoying%20Developers"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WTF is MIPSEL?</title>
		<link>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/</link>
		<comments>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/#comments</comments>
		<pubDate>Sun, 25 May 2008 20:16:22 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=171</guid>
		<description><![CDATA[My Popcorn Hour PCH A-100 media streamer has a mipsel architecture, which led me to wonder, &#8220;what the heck does mipsel mean anyway?&#8221;  As it turns out, the difference between mips and mipsel is that mips is big-endian and mipsel is little-endian.  Mystery solved.]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.popcornhour.com/onlinestore/">Popcorn Hour <span class="caps">PCH</span> A-100 media streamer</a> has a mipsel architecture, which led me to wonder, &#8220;what the heck does mipsel mean anyway?&#8221;  As it turns out, the difference between mips and mipsel is that mips is big-endian and mipsel is little-endian.  Mystery solved.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F05%2F25%2Fwtf-is-mipsel%2F&amp;linkname=WTF%20is%20MIPSEL%3F"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sad Meal</title>
		<link>http://www.n8gray.org/blog/2008/05/13/sad-meal/</link>
		<comments>http://www.n8gray.org/blog/2008/05/13/sad-meal/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:25:42 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[amaya]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=170</guid>
		<description><![CDATA[Wisdom from the mouth of Amaya on a trip to McDonalds (even latte-liberals need fast food every now and then), where she had a Happy Meal:

I think the grownup meal is called a Sad Meal.  It&#8217;s sad because it doesn&#8217;t have a toy.

Mind you, she was completely serious about this statement and delivered it [...]]]></description>
			<content:encoded><![CDATA[<p>Wisdom from the mouth of Amaya on a trip to McDonalds (even latte-liberals need fast food every now and then), where she had a Happy Meal:</p>

<blockquote>I think the grownup meal is called a Sad Meal.  It&#8217;s sad because it doesn&#8217;t have a toy.</blockquote>

<p>Mind you, she was completely serious about this statement and delivered it with a totally straight face.  Had my mouth been full of soda it would have come shooting out of my nose for sure&#8230;</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F05%2F13%2Fsad-meal%2F&amp;linkname=Sad%20Meal"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/13/sad-meal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgraded to Wordpress 2.5.1</title>
		<link>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/</link>
		<comments>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/#comments</comments>
		<pubDate>Thu, 08 May 2008 01:46:34 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=169</guid>
		<description><![CDATA[I just upgraded the blog to Wordpress 2.5.1.  I did some testing, but please let me know if anything&#8217;s busted.]]></description>
			<content:encoded><![CDATA[<p>I just upgraded the blog to Wordpress 2.5.1.  I did some testing, but please let me know if anything&#8217;s busted.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F05%2F07%2Fupgraded-to-wordpress-251%2F&amp;linkname=Upgraded%20to%20Wordpress%202.5.1"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QLColorCode 1.0</title>
		<link>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/</link>
		<comments>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 06:18:40 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/</guid>
		<description><![CDATA[I just put up the latest release of QLColorCode, and it&#8217;s a doozy!  Well, not really, but it does (probably) fix a crash bug that was biting me pretty frequently.  It also adds some more miscellaneous language UTIs and lets you put a cap on the size of rendered files so you don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I just put up the latest release of <span class="caps">QLC</span>olorCode, and it&#8217;s a doozy!  Well, not really, but it does (probably) fix a crash bug that was biting me pretty frequently.  It also adds some more miscellaneous language <span class="caps">UTI</span>s and lets you put a cap on the size of rendered files so you don&#8217;t accidentally render massive 50MB <span class="caps">SQL </span>dumps and such.  All in all, it seems like this project has reached a stable point so I&#8217;ve gone ahead and called it version 1.0.</p>

<p><a href="http://qlcolorcode.googlecode.com/">Get it at the goog</a>.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F03%2F26%2Fqlcolorcode-10%2F&amp;linkname=QLColorCode%201.0"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Garfield Minus Garfield</title>
		<link>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/</link>
		<comments>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 23:49:22 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/</guid>
		<description><![CDATA[It turns out that the way to make Garfield comics funny is to remove Garfield.]]></description>
			<content:encoded><![CDATA[<p><a href="http://garfieldminusgarfield.tumblr.com/">It turns out that the way to make Garfield comics funny is to remove Garfield.</a></p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F02%2F28%2Fgarfield-minus-garfield%2F&amp;linkname=Garfield%20Minus%20Garfield"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A slightly less cynical post on photography</title>
		<link>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/</link>
		<comments>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 08:47:58 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/</guid>
		<description><![CDATA[Sometimes it&#8217;s all worthwhile.



]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s all worthwhile.</p>

<p><span id="more-164"></span></p>

<p><center><a href='http://www.n8gray.org/wp-content/uploads/2008/02/amayapiano.jpg' title='The Girl at the Piano'><img src='http://www.n8gray.org/wp-content/uploads/2008/02/amayapiano.jpg' width=500 alt='The Girl at the Piano' /></a></center></p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F02%2F05%2Fa-slightly-less-cynical-post-on-photography%2F&amp;linkname=A%20slightly%20less%20cynical%20post%20on%20photography"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Photography Snowball</title>
		<link>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/</link>
		<comments>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 08:29:06 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/</guid>
		<description><![CDATA[Photography is a dangerous hobby.  You start with &#8220;all I really need is a good entry-level dSLR,&#8221; but right away you realize that a good camera&#8217;s no good without a decent lens.  &#8220;But hey,&#8221; you think, &#8220;that should be enough, right?&#8221;  You grit your teeth and swipe the card, ka-ching, $750, and [...]]]></description>
			<content:encoded><![CDATA[<p>Photography is a dangerous hobby.  You start with &#8220;all I really need is a good entry-level dSLR,&#8221; but right away you realize that a good camera&#8217;s no good without a decent lens.  &#8220;But hey,&#8221; you think, &#8220;that should be enough, right?&#8221;  You grit your teeth and swipe the card, ka-ching, $750, and voilla, you&#8217;re happy for a while.  But this is just the top of the hill.</p>

<p>It doesn&#8217;t take long for you to start feeling the limits of your gear.  Sure, you can get great results when the light&#8217;s good or the subject&#8217;s still, but when your kid&#8217;s running around in the living room and the light&#8217;s bad you&#8217;ve just gotta pop up the flash.  After a few tries you realize that the built-in flash on your fancy dSLR isn&#8217;t a lot better than the one on your old point-n-shoot.  Everything still ends up flattened.  Blagh.  The snowball starts rolling.</p>

<p>Once again you swipe the card &#8212; you pick up a nice, fast 50mm lens (a bargain at $120).  Now you&#8217;ve got a better range, you&#8217;re taking shots where you couldn&#8217;t before, but guess what?  At f/1.8 you&#8217;ve got a 2cm depth of field.  You&#8217;d better hope you can nail the focus just right, or you&#8217;re outta luck.  Plus, there are times when the light&#8217;s just not there, even at f/1.8.  Oh dear, the snowball&#8217;s rolling faster now.</p>

<p>So you pick up a good flash ($190).  But you make the mistake of reading <a href="http://strobist.blogspot.com">strobist</a> and start thinking about off-camera flash, so the snowball grows by another $60 in RF triggers and diffusers.  (We&#8217;ll be generous and assume you didn&#8217;t get the stands, umbrellas, and gels that you wanted so badly but couldn&#8217;t justify to the spousal unit.)</p>

<p>I think you get the picture, but I&#8217;d just like to take a moment to enumerate a few more of the items that will contribute to that snowball&#8217;s mass.  Mind you, I&#8217;m using &#8220;ghetto-gear&#8221; prices here.  Buying actual reputable-brand gear means these prices go up, often significantly.</p>


<ul>
<li>You&#8217;ve gotta have a telephoto lens for birds and trips to the zoo.  Something that at least gets out to 200mm.  ($250 <em>at least</em>.  Probably more like $450.)</li>
<li>It would be nice to have some teleconverters for that lens to give you even more reach on the cheap.  ($60-200)</li>
<li>Ooh, macro&#8217;s fun.  Close-up lenses are reasonably cheap ($40) and so are extension tubes ($85).</li>
<li>Ah yes, the tripod!  All the pros say it&#8217;s critical to have one, and a good one at that.  Why, you&#8217;d be a fool to skimp here!  ($250.  Yes, you&#8217;re skimping.  You&#8217;re poor.  Boo hoo.)</li>
<li>You really need at least a circular polarizing filter (multi-coated, of course) to get those magical cobalt-blue skies.  ($75)</li>
<li>Don&#8217;t forget about software!  Photoshop is &#8220;only&#8221; $300 with the educational discount.  You <em>might</em> be able to make do with Bibble Pro (great stuff, $120) and Krita ($0, thank God for open-source), but you know you&#8217;ll buy PS eventually.</li>
<li>Another thing, if you care about getting good prints you have to have accurate color during your editing.  That means you definitely need a calibrator for your monitors.  ($80)</li>
<li>Oh yeah, those <span class="caps">RAW </span>files?  They take up space.  You&#8217;ll be needing more hard drives at $100 each.  (Yes, drive<b>s</b>.  You <em>do</em> make backups, right?)</li>
</ul>



<p>But do you know what the funny thing is?  You still truly believe that once you have all those things, once that snowball has reached some ideal size, it will just stop!  Really!</p>

<p>Dear friend, the snowball <em>never</em> stops.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F02%2F05%2Fthe-photography-snowball%2F&amp;linkname=The%20Photography%20Snowball"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dictionary attacks, or why log file monitoring is dumb</title>
		<link>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/</link>
		<comments>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 00:59:59 +0000</pubDate>
		<dc:creator>n8</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/</guid>
		<description><![CDATA[Like most ssh servers on the internet, the Mojave group server gets lots of ssh dictionary attack attempts.  These attacks are carried out by scripts that try to find dumb passwords on a machine by brute force.  There are a few different tactics these scripts use for picking username/password pairs, including:



User: root, Password: [...]]]></description>
			<content:encoded><![CDATA[<p>Like most ssh servers on the internet, the Mojave group server gets lots of ssh dictionary attack attempts.  These attacks are carried out by scripts that try to find dumb passwords on a machine by brute force.  There are a few different tactics these scripts use for picking username/password pairs, including:</p>


<ul>
<li>User: root, Password: aardvark.  (Repeat with various well-known usernames and every word in the English dictionary)</li>
<li>User: abe, Password: abe.  (Repeat with all common first/last names)</li>
</ul>



<p>It&#8217;s not hard to think of simple methods to cut off these attacks without altering or otherwise restricting one&#8217;s ssh service (by, say, running sshd on a non-standard port):  </p>


<ul>
<li>Throttle login attempts on a per-host basis.  i.e. if a host tries and fails to log in N times in M seconds then start making it wait longer and longer between successive logins (or even blacklist the host entirely).</li>
<li>Throttle login attempts on a per-account basis.  i.e. if user bob gets N failed login attempts within M seconds then throttle or blacklist future login attempts on that account.</li>
<li>Auto-blacklist hosts that attempt to log in to accounts that should never be logged in to.  e.g. if somebody tries to ssh in as user &#8220;games&#8221; they&#8217;re toast.</li>
</ul>



<p>Indeed, there are any number of programs out there that aim to provide exactly these capabilities.<sup class="footnote"><a href="#fn1">1</a></sup>  What these techniques have in common is the need to measure the number of failed login attempts associated with a host and/or account over a period of time.  So how do the existing programs do it?  Sadly, a large number do it by scanning log files.  In other words, a scanner will look for a certain pattern (typically using regular expressions) in the logging output for your system and assume that it indicates a failed login attempt.  This is not a great idea.</p>

<p><span id="more-162"></span></p>

<p>What&#8217;s wrong with log file scanning, anyway?  The first (and least important, <span class="caps">IMHO</span>) mark against it is performance.  A typical system has dozens or hundreds of processes running at any time, each generating log output to some degree.  Well-written programs generate a trickle, but it&#8217;s not unusual for a program to accidentally ship (or be misconfigured) with debug-level logging enabled and thus generate a torrent of debug output.  By running a log file scanner you&#8217;ve now got a program that has to sift through <strong>every byte</strong> of that output looking for just one type of event!  This is certainly not the most efficient way to find out about login attempts.</p>

<p>Another bad aspect of log file scanning is that it relies on the specific formatting of log messages from specific programs.  If you replace OpenSSH with BogoSSH and BogoSSH uses a slightly different log output format then your scanner breaks.  Similarly, if the OpenSSH people ever decide to change their logging format (not that this is likely) then your scanner breaks.  If you install some new service that the scanner doesn&#8217;t know about it&#8217;s probably going to be totally unprotected unless it happens to format its log messages just like some other service the scanner understands.</p>

<p>But the worst thing about log file scanning is that sloppy implementations can actually open your system up to denial of service attacks!  I recently came across <a href="http://www.ossec.net/en/attacking-loganalysis.html">this article by Daniel B. Cid</a> that describes vulnerabilities in several popular log scanners that allow remote attackers to cause your machine to falsely blacklist any other machine of their choosing.  Even worse, one scanner allowed attackers to cut a machine off from the network entirely!  I refer you to the article for details, but the root causes of this problem are easy to describe:</p>


<ul>
<li>Regular expression matching is error-prone.  People aren&#8217;t terribly good at understanding the full class of strings that a given <span class="caps">R.E. </span>will match.  I&#8217;ve been doing complicated <span class="caps">R.E. </span>stuff for years now and I still have a terribly hard time writing bug-free regular expressions.</li>
<li>Log files are chock full of strings that come from insecure sources, like, say, random users on your machine and script kiddies all across the internet who want to crack your machine.  You do <strong>not</strong> want to be taking action automatically based on the contents of such an untrusted data source.  The article doesn&#8217;t even begin to mention what an attacker with local access could do by writing and executing a program that mimics sshd&#8217;s log output.  </li>
</ul>



<p>So how <strong>should</strong> this problem be solved?  By going straight to the horse&#8217;s mouth.  If you want to know about authentication attempts, talk to the authentication system.  Every modern *NIX system supports <span class="caps">PAM, </span><a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">the Pluggable Authentication Module system</a>.  With a <span class="caps">PAM </span>module you can perform an action on any failed login attempt from <em>any</em> <span class="caps">PAM</span>-enabled service.  This allows you to create a concise, trustworthy authentication log file with a consistent format, which can then be monitored by a very simple (and thus secure) scanner.</p>

<p>One project that takes the <span class="caps">PAM </span>approach is <a href="http://sourceforge.net/projects/pam-abl">pam_abl</a> (auto-blacklist).  While it doesn&#8217;t use the specific strategy I described above (it builds a database rather than producing an authentication log file) it does get its info from the right source and is thus immune to these bogus log message attacks.  Unfortunately pam_abl is a bit inflexible and limited in its capabilities.  It doesn&#8217;t provide any way to blacklist a host if it tries to log in to a bogus account like &#8216;games&#8217;.  It doesn&#8217;t provide a way to throttle rather than blacklist.  And although it effectively ensures that an attacker will never have a chance to guess your account passwords it doesn&#8217;t provide a way of firewalling off a malicious host entirely.  Even worse, the maintainer of pam_abl doesn&#8217;t seem to have time to work on it any longer.  Hopefully somebody else will step up and turn this into <strong>the</strong> tool for stopping dictionary attacks dead in their tracks.</p>

<p class="footnote" id="fn1"><sup>1</sup> Here are a handful:</p>

<ul> <li> <a href="http://denyhosts.sourceforge.net/" title="sourceforge.net">denyhosts</a sourceforge.net></li> <li> <a href="http://www.fail2ban.org/wiki/index.php/Main_Page" title="fail2ban.org">fail2ban</a fail2ban.org></li> <li> <a href="http://www.aczoom.com/cms/blockhosts/" title="aczoom.com">blockhosts</a aczoom.com></li> <li> <a href="http://blocksshd.sourceforge.net/" title="sourceforge.net">blocsshd</a sourceforge.net></li> <li> <a href="http://www.zipcon.net/~sirius/crackblock.html" title="zipcon.net">crackblock</a zipcon.net></li> <li> <a href="http://shellter.sourceforge.net/" title="sourceforge.net">shellter</a sourceforge.net></li> <li> <a href="http://www.csc.liv.ac.uk/~greg/sshdfilter/" title="liv.ac.uk">sshdfilter</a liv.ac.uk></li> <li> <a href="http://anp.ath.cx/sshit/" title="anp.ath.cx">sshit</a anp.ath.cx></li>
<li> <a href="http://www.techfinesse.com/sshutout/sshutout.html" title="techfinesse.com">sshutout</a techfinesse.com></li> </ul>

<p><strong>Updated</strong>:  Removed ssh-faker from the footnote since it effectively alters the sshd service.</p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.n8gray.org%2Fblog%2F2008%2F01%2F28%2Fdictionary-attacks-or-why-log-file-monitoring-is-dumb%2F&amp;linkname=Dictionary%20attacks%2C%20or%20why%20log%20file%20monitoring%20is%20dumb"><img src="http://www.n8gray.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
