<?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>2718.us blog</title>
	<atom:link href="http://2718.us/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://2718.us/blog</link>
	<description>Miscellaneous Technological Geekery</description>
	<lastBuildDate>Wed, 10 Mar 2010 22:42:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Drag-Resizable Subclass of NSComboBox</title>
		<link>http://2718.us/blog/2010/03/10/a-drag-resizable-subclass-of-nscombobox/</link>
		<comments>http://2718.us/blog/2010/03/10/a-drag-resizable-subclass-of-nscombobox/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:57:02 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bsd]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[combo box]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[drag]]></category>
		<category><![CDATA[drag-resizable]]></category>
		<category><![CDATA[IGResizableComboBox]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[nscombobox]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[resizable]]></category>
		<category><![CDATA[resizable combo box]]></category>
		<category><![CDATA[resizable combobox]]></category>
		<category><![CDATA[subclass]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=223</guid>
		<description><![CDATA[IGResizableComboBox is a drag-resizable subclass of NSComboBox—that is, IGResizableComboBox should be usable in place of NSComboBox and it adds a small bar at the bottom of the pop-up list that can be dragged to resize the pop-up list.  IGResizableComboBox is published under a 3-clause BSD license.
It still has some quirks:

behavior is strange when the pop-up [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/igresizablecombobox/">IGResizableComboBox</a> is a drag-resizable subclass of NSComboBox—that is, IGResizableComboBox should be usable in place of NSComboBox and it adds a small bar at the bottom of the pop-up list that can be dragged to resize the pop-up list.  IGResizableComboBox is published under a 3-clause BSD license.</p>
<p>It still has some quirks:</p>
<ul>
<li>behavior is strange when the pop-up is above the combo box (whereas it is usually below)</li>
<li><del datetime="2010-03-10T22:37:05+00:00">the formula for resetting the number of visible items after dragging occurs is not quite right</del> [fixed; dragging now snaps to whole-item positions]</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2010/03/10/a-drag-resizable-subclass-of-nscombobox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomizing by Random-Comparison Sorting (Revisited)</title>
		<link>http://2718.us/blog/2010/02/24/randomizing-by-random-comparison-sorting-revisited/</link>
		<comments>http://2718.us/blog/2010/02/24/randomizing-by-random-comparison-sorting-revisited/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:09:28 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[browser ballot]]></category>
		<category><![CDATA[bubblesort]]></category>
		<category><![CDATA[eu]]></category>
		<category><![CDATA[european union]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[mathematica]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[mergesort]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nb]]></category>
		<category><![CDATA[quicksort]]></category>
		<category><![CDATA[selectionsort]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[sorting algorithms]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=215</guid>
		<description><![CDATA[Yesterday, I posted the results of my quick exploration of whether sorting the list {0,1,2,3,4} using a comparison function that randomly returns &#60; or &#62; (with equal probability).  My exploration was prompted by a report on the non-uniformity of the distribution of the random orderings of the browsers in Microsoft&#8217;s EU browser ballot.  I had [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I posted <a href="http://2718.us/blog/2010/02/23/the-eu-browser-ballot-and-random-sorting/">the results of my quick exploration</a> of whether sorting the list {0,1,2,3,4} using a comparison function that randomly returns &lt; or &gt; (with equal probability).  My exploration was prompted by <a href="http://techcrunch.com/2010/02/22/microsoft-ballot-screen/">a report on the non-uniformity of the distribution</a> of the random orderings of the browsers in <a href="http://www.browserchoice.eu/BrowserChoice/browserchoice_en.htm">Microsoft&#8217;s EU browser ballot</a>.  I had said that it seemed likely that the distribution would vary based on the sorting algorithm used.</p>
<p>Today, I have data (and code) that confirms the distribution is sorting-algorithm-dependent.  For each sorting algorithm, 1,000,000 instances of the list {0,1,2,3,4} were sorted with a random comparison function and the relative frequencies (rounded to the nearest whole percent) of each number in each position were computed.<span id="more-215"></span></p>
<table border="1" cellspacing="0">
<tbody>
<tr>
<td>Mathematica&#8217;s Sort[]</td>
<td>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>18%</td>
<td>12%</td>
<td>12%</td>
<td>12%</td>
<td>46%</td>
</tr>
<tr>
<td>second</td>
<td>18%</td>
<td>24%</td>
<td>18%</td>
<td>18%</td>
<td>24%</td>
</tr>
<tr>
<td>third</td>
<td>20%</td>
<td>20%</td>
<td>26%</td>
<td>20%</td>
<td>12%</td>
</tr>
<tr>
<td>fourth</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>28%</td>
<td>6%</td>
</tr>
<tr>
<td>fifth</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>12%</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>BubbleSort</td>
<td>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>36%</td>
<td>28%</td>
<td>20%</td>
<td>10%</td>
<td>6%</td>
</tr>
<tr>
<td>second</td>
<td>28%</td>
<td>32%</td>
<td>22%</td>
<td>12%</td>
<td>6%</td>
</tr>
<tr>
<td>third</td>
<td>20%</td>
<td>22%</td>
<td>32%</td>
<td>18%</td>
<td>10%</td>
</tr>
<tr>
<td>fourth</td>
<td>12%</td>
<td>12%</td>
<td>18%</td>
<td>38%</td>
<td>20%</td>
</tr>
<tr>
<td>fifth</td>
<td>6%</td>
<td>6%</td>
<td>10%</td>
<td>20%</td>
<td>60%</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>QuickSort (random pivot)</td>
<td>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
</tr>
<tr>
<td>second</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
</tr>
<tr>
<td>third</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
</tr>
<tr>
<td>fourth</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
</tr>
<tr>
<td>fifth</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
<td>20%</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>MergeSort</td>
<td>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>24%</td>
<td>24%</td>
<td>26%</td>
<td>12%</td>
<td>12%</td>
</tr>
<tr>
<td>second</td>
<td>26%</td>
<td>24%</td>
<td>18%</td>
<td>16%</td>
<td>16%</td>
</tr>
<tr>
<td>third</td>
<td>18%</td>
<td>18%</td>
<td>22%</td>
<td>20%</td>
<td>20%</td>
</tr>
<tr>
<td>fourth</td>
<td>16%</td>
<td>16%</td>
<td>18%</td>
<td>26%</td>
<td>26%</td>
</tr>
<tr>
<td>fifth</td>
<td>16%</td>
<td>16%</td>
<td>18%</td>
<td>26%</td>
<td>26%</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>SelectionSort</td>
<td>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>6%</td>
<td>6%</td>
<td>12%</td>
<td>26%</td>
<td>50%</td>
</tr>
<tr>
<td>second</td>
<td>12%</td>
<td>12%</td>
<td>20%</td>
<td>32%</td>
<td>24%</td>
</tr>
<tr>
<td>third</td>
<td>20%</td>
<td>20%</td>
<td>26%</td>
<td>20%</td>
<td>12%</td>
</tr>
<tr>
<td>fourth</td>
<td>30%</td>
<td>30%</td>
<td>20%</td>
<td>12%</td>
<td>6%</td>
</tr>
<tr>
<td>fifth</td>
<td>30%</td>
<td>30%</td>
<td>20%</td>
<td>12%</td>
<td>6%</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>The distributions are significantly different among these sorts.  QuickSort appears to provide a uniform distribution.  I believe that this is because QuickSort will only compare a particular pair of elements once, whereas each of the other sorting algorithms may compare a given pair of elements more than once (and with a random comparison function, receive a different result from one time to the next).</p>
<p>Here is the Mathematica notebook I used to generate this data: <a href="http://2718.us/blog/wp-content/uploads/2010/02/testing-randomize-by-sorting-2.nb">Randomize by Sorting.nb</a>.  As noted in the file, some of the code for the sorting algorithms was taken from other locations and may be/is subject to their copyrights and/or license terms (I reasonably believe that this use complies with their licenses and/or constitutes fair use.  Also, some algorithms exhibited improper behavior when trying to sort lists with duplicate entries using a normal comparison function as noted in the file, though this should have no effect on the data above.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2010/02/24/randomizing-by-random-comparison-sorting-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The EU Browser Ballot and Random Sorting</title>
		<link>http://2718.us/blog/2010/02/23/the-eu-browser-ballot-and-random-sorting/</link>
		<comments>http://2718.us/blog/2010/02/23/the-eu-browser-ballot-and-random-sorting/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 02:09:44 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[browser ballot]]></category>
		<category><![CDATA[eu]]></category>
		<category><![CDATA[european union]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[mathematica]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=212</guid>
		<description><![CDATA[An Ars Technica &#8220;etc&#8221; post linked to a TechCrunch article (apparently based on a Slovakian article, but I didn&#8217;t look into the Slovakian article to be sure) that talks about the ordering of the browsers in Microsoft&#8217;s EU Browser Ballot not being uniformly distributed.  At a glance at the Javascript that does the randomizing of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://arstechnica.com/microsoft/news/2010/02/-the-javascript-code-on.ars">An Ars Technica &#8220;etc&#8221; post</a> linked to <a href="http://techcrunch.com/2010/02/22/microsoft-ballot-screen/">a TechCrunch article</a> (apparently based on <a href="http://www.dsl.sk/article.php?article=8770">a Slovakian article</a>, but I didn&#8217;t look into the Slovakian article to be sure) that talks about the ordering of the browsers in <a href="http://www.browserchoice.eu/BrowserChoice/browserchoice_en.htm">Microsoft&#8217;s EU Browser Ballot</a> not being uniformly distributed.  At a glance at the Javascript that does the randomizing of the browsers (randomly orders the top 5, and randomly orders the rest), it appears to randomize by calling the Javascript array sort with a comparison function that returns &lt; half the time and &gt; the other half of the time.  I believe that this is likely the underlying cause of the non-uniformity of the orderings.</p>
<p><a href="http://www.javascriptkit.com/javatutors/arraysort.shtml">The second result</a> in <a href="http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=javascript+sort">a google search for &#8220;javascript sort&#8221;</a> says:</p>
<blockquote><p>To randomize the order of the elements within an array, what we need is the body of our sortfunction to return a number that is randomly &lt;0, 0, or &gt;0, irrespective to the relationship between &#8220;a&#8221; and &#8220;b&#8221;. The below will do the trick:</p>
<pre>//Randomize the order of the array:
var myarray=[25, 8, "George", "John"]
myarray.sort(function() {return 0.5 - Math.random()}) //Array elements now scrambled</pre>
</blockquote>
<p>This is almost exactly the method of randomization used in the browser ballot javascript.</p>
<p>To test the results of this randomization technique, I applied it 1,000,000 times to the list {0,1,2,3,4} in Mathematica and tabulated the relative frequencies of each number in each position.  (Rounded to the nearest whole %).</p>
<table>
<tbody>
<tr>
<td>position/number</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>first</td>
<td>18%</td>
<td>12%</td>
<td>12%</td>
<td>12%</td>
<td>47%</td>
</tr>
<tr>
<td>second</td>
<td>18%</td>
<td>24%</td>
<td>18%</td>
<td>18%</td>
<td>24%</td>
</tr>
<tr>
<td>third</td>
<td>20%</td>
<td>21%</td>
<td>27%</td>
<td>20%</td>
<td>12%</td>
</tr>
<tr>
<td>fourth</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>28%</td>
<td>6%</td>
</tr>
<tr>
<td>fifth</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>22%</td>
<td>12%</td>
</tr>
</tbody>
</table>
<p>At a glance, it appears that the distribution is far from uniform.  My quick attempt at re-learning how to use the Χ<sup>2</sup> test gave a probability less than 1×10<sup>-100000</sup> that this data matched a uniform distribution (if someone can confirm/fix that, please comment).</p>
<p>I used the Mathematica Sort[] command to do the sorting.  I don&#8217;t know what algorithm that uses.  It appears that the algorithm used by Javascript&#8217;s sort() varies from browser to browser, though the browser ballot would be displayed in IE8 by default.  I suspect that the distribution is highly dependent on the sorting algorithm used, though I cannot readily verify it [<em>edit</em>: <a href="http://2718.us/blog/2010/02/24/randomizing-by-random-comparison-sorting-revisited/">I verified it</a>].  Regardless, this seems to be a very poor way to generate a random ordering.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2010/02/23/the-eu-browser-ballot-and-random-sorting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A URL to Crash IE6</title>
		<link>http://2718.us/blog/2010/02/05/a-url-to-crash-ie6/</link>
		<comments>http://2718.us/blog/2010/02/05/a-url-to-crash-ie6/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 10:11:23 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ars]]></category>
		<category><![CDATA[ars technica]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[internet explorer 6]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[msie]]></category>
		<category><![CDATA[msie6]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=210</guid>
		<description><![CDATA[I haven&#8217;t tested it myself, but an &#8220;etc&#8221; posting on Ars Technica says:
Want to get someone off IE6? Put these 11 characters into the address bar and hit enter: ms-its:%F0:. The browser will instantly crash. Better yet, set it as their homepage.
]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t tested it myself, but <a href="http://arstechnica.com/microsoft/news/2010/02/-want-to-get-someone.ars">an &#8220;etc&#8221; posting on Ars Technica</a> says:</p>
<blockquote><p>Want to get someone off IE6? Put these 11 characters into the address bar and hit enter: ms-its:%F0:. The browser will instantly crash. Better yet, set it as their homepage.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2010/02/05/a-url-to-crash-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Magic Mouse: First Hour Review</title>
		<link>http://2718.us/blog/2009/12/01/apple-magic-mouse-first-hour-review/</link>
		<comments>http://2718.us/blog/2009/12/01/apple-magic-mouse-first-hour-review/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:53:01 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=203</guid>
		<description><![CDATA[On the first day the Magic Mouse was available—well, not so much available as it was shipping with new iMacs, so available to play with in the Apple Store—I went to try it out.  While I didn&#8217;t think it was the best thing since sliced bread (or any other such amazing invention), I did think [...]]]></description>
			<content:encoded><![CDATA[<p>On the first day the Magic Mouse was available—well, not so much available as it was shipping with new iMacs, so available to play with in the Apple Store—I went to try it out.  While I didn&#8217;t think it was the best thing since sliced bread (or any other such amazing invention), I did think it was solid enough to be worth buying, especially since I&#8217;ve been having to <a href="http://2718.us/blog/2009/12/01/unsticking-the-mighty-mouse-scrollball/">unstick the scrollball</a> on my bluetooth Mighty Mouse just about weekly of late.  On about half a dozen occasions since then, I&#8217;ve been close enough to an Apple Store to wander in and see if they had any Magic Mice for sale, but had no luck until tonight.</p>
<p>The packaging is simple and elegant, a clear plastic shell, though it would have been more elegant without the huge white label added by the Apple Store along one long side, which covered the seam in the box and made it much harder to open than intended and left all sorts of sticky gunk behind.  Batteries are included and pre-installed.  Swapping it in for my bluetooth Mighty Mouse was as simple as turning it on, asking my Mac to set up a bluetooth device, clicking a few times, and turning off the old mouse.  The Magic Mouse is lighter and flatter than the Mighty Mouse (though heavier than the USB version).</p>
<p>Left and right clicking (once enabled) work just like on the Mighty Mouse.  Scrolling is nice and the momentum is a nice add-on.  Forward/backward swipes for navigation work, though I find the gestures a bit awkward (I played with these in the store when I first laid hand on the mouse).  I&#8217;d long ago disabled the side buttons on my Mighty Mouse, so I don&#8217;t miss those one bit.  As for middle-clicking (clicking on top of the scrollball), had the Magic Mouse hit about 3 months earlier, I wouldn&#8217;t have cared at all, but somewhere in the past few months I&#8217;ve gotten in the habit of using the middle click to open links in new tabs and close tabs, both in Firefox and in Chrome, so I wasn&#8217;t looking forward to losing it.  A quick search led me to <a href="http://clement.beffa.org/labs/projects/middleclick/">this program</a> (actually, <a href="http://github.com/galonsky/MiddleClick/downloads">this version</a>, as the other one doesn&#8217;t seem to work as consistently) which works like a charm—once set up, physically click with 3 fingers on the surface to middle-click (the program defaults to a 3-finger tap, rather than physical click, and is supposed to work on multitouch trackpads as well).</p>
<p>So, my first-hour opinion: worth it to me, may or may not be worth it to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/12/01/apple-magic-mouse-first-hour-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unsticking the Mighty Mouse Scrollball</title>
		<link>http://2718.us/blog/2009/12/01/unsticking-the-mighty-mouse-scrollball/</link>
		<comments>http://2718.us/blog/2009/12/01/unsticking-the-mighty-mouse-scrollball/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:34:43 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[alcohol]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[apple mighty mouse]]></category>
		<category><![CDATA[ball]]></category>
		<category><![CDATA[degunk]]></category>
		<category><![CDATA[denatured]]></category>
		<category><![CDATA[denatured ethanol]]></category>
		<category><![CDATA[denatured ethyl alcohol]]></category>
		<category><![CDATA[ethanol]]></category>
		<category><![CDATA[ethyl alcohol]]></category>
		<category><![CDATA[gunk]]></category>
		<category><![CDATA[mighty mouse]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[mouse ball]]></category>
		<category><![CDATA[rubbing alcohol]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[scroll ball]]></category>
		<category><![CDATA[unstick]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=206</guid>
		<description><![CDATA[This information is provided as-is, with no warranty, etc., which is to say if you use this information at all, you do so at your own risk.
I&#8217;ve been using an Apple Mighty Mouse (bluetooth) for years now, so for years I&#8217;ve been dealing with a scrollball that occasionally gets stuck.  As someone who used to [...]]]></description>
			<content:encoded><![CDATA[<p>This information is provided <strong>as-is</strong>, with no warranty, etc., which is to say if you use this information at all, you do so <strong>at your own risk</strong>.</p>
<p>I&#8217;ve been using an Apple Mighty Mouse (bluetooth) for years now, so for years I&#8217;ve been dealing with a scrollball that occasionally gets stuck.  As someone who used to use mice that relied on a physical ball for tracking, this is nothing new.  The only real difference is that we can&#8217;t remove the scrollball to directly ungunk the mechanics.  My personal preferred way to ungunk/unstick/clean the scrollball (and mind you, for all I know, this might destroy your mouse) is to turn the mouse off, take a q-tip, soak up some denatured ethyl alcohol, and rub it around the scrollball, rolling the ball in every possible direction to try to get as much of the alcohol down and around the ball as possible, hoping to loosen up any gunk in the works there and bring it up top where it can be wiped away.  Typically, this unsticks the ball and brings some visible gunk and stuff to the topside.  It also helps to press down on the ball while rolling it around to ensure that it is moving the mechanical bits with which it has contact.  Let the mouse fully dry before turning it back on.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/12/01/unsticking-the-mighty-mouse-scrollball/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache&#8217;s MultiViews Option</title>
		<link>http://2718.us/blog/2009/11/04/apaches-multiviews-option/</link>
		<comments>http://2718.us/blog/2009/11/04/apaches-multiviews-option/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:38:59 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[content negotiation]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[file type extensions]]></category>
		<category><![CDATA[file types]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image file types]]></category>
		<category><![CDATA[image files]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[mod_negotiation]]></category>
		<category><![CDATA[multiviews]]></category>
		<category><![CDATA[w3]]></category>
		<category><![CDATA[w3.org]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=200</guid>
		<description><![CDATA[&#8230; or &#8220;how to serve different image types at one URL.&#8221;
&#8230; or &#8220;why I let myself get carried away reading from one blog post to another.&#8221;
After discovering free and cheap SSL certificates, I was playing with some sites over HTTPS to see what different browsers would show for the security.  Very quickly, I noticed that [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; or &#8220;how to serve different image types at one URL.&#8221;</p>
<p>&#8230; or &#8220;why I let myself get carried away reading from one blog post to another.&#8221;</p>
<p>After <a href="http://2718.us/blog/2009/11/03/startssl-freecheap-ssl-certificates/">discovering free and cheap SSL certificates</a>, I was playing with some sites over HTTPS to see what different browsers would show for the security.  Very quickly, I noticed that having any elements on the page that aren&#8217;t loaded over HTTPS causes the whole page to be marked as not secured.  One element in particular on one page was <a href="http://www.w3.org/Icons/valid-xhtml10-blue">this &#8220;valid&#8221; icon from w3.org</a>.  Note that the URL, http://www.w3.org/Icons/valid-xhtml10-blue,  doesn&#8217;t have any file-type extension on it.  Since w3.org doesn&#8217;t provide the icon over HTTPS (though they are fine with hotlinking the HTTP version), I needed to move it to my own server.  I went to look for the image file and didn&#8217;t find a &#8220;valid-xhtml10-blue&#8221; file with no extension.  What I found were several files with that base name and different extensions.  I couldn&#8217;t find any information in the w3.org docs or in the source for the validator, which includes all the validation icons, as to how this was achieved.  I googled to no avail.</p>
<p>Not long after that, I noticed an update for <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> was available and went to read the <a href="http://www.bad-behavior.ioerror.us/2009/11/02/bad-behavior-2-0-32/">release notes</a>.  After reading the release notes, <a href="http://www.bad-behavior.ioerror.us/2009/11/02/bad-behavior-2-2-status-and-roadmap/">a post about the future major version of Bad Behavior</a> caught my eye.  In that post&#8211;no, actually <a href="http://www.bad-behavior.ioerror.us/2009/11/02/bad-behavior-2-2-status-and-roadmap/#comment-8160">in the comments on that post</a>&#8211;there was a mention of <a href="http://linux.ioerror.us/2008/07/migrating-from-apache-to-nginx/">getting rid of Apache</a> for performance reasons.  In reading that post, in the discussions of the pros and cons of nginx versus Apache, &#8220;content negotiation&#8221; was described, and suddenly I understood how to serve the multiple image file types at one type-extension-less URL, like w3.org did.  A quick googling led me to <a href="http://httpd.apache.org/docs/2.2/mod/mod_negotiation.html#multiviews">MultiViews</a>.</p>
<p>One line in an .htaccess file and it&#8217;s done:<br />
<code>Options +MultiViews</code></p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/11/04/apaches-multiviews-option/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>StartSSL: Free/Cheap SSL Certificates</title>
		<link>http://2718.us/blog/2009/11/03/startssl-freecheap-ssl-certificates/</link>
		<comments>http://2718.us/blog/2009/11/03/startssl-freecheap-ssl-certificates/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:11:50 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[certificate authority]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[free ssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[ssl certificates]]></category>
		<category><![CDATA[startcom]]></category>
		<category><![CDATA[startssl]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[ucc]]></category>
		<category><![CDATA[wildcard]]></category>
		<category><![CDATA[wildcard certificate]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=198</guid>
		<description><![CDATA[StartCom is the certificate authority providing StartSSL certificates: unlimited 1-year domain-validated single-site SSL certificates for free (&#8220;Class 1&#8243;); unlimited 2-year domain-validated single-site, UCC, or wildcard certificates after paying $39.90 to further validate your account (&#8220;Class 2,&#8221; which necessitated photo IDs and a phone call, and is good for 1 year); 2-year EV certificates for $149.90 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.startcom.org/">StartCom</a> is the certificate authority providing <a href="http://www.startssl.com/">StartSSL certificates</a>: unlimited 1-year domain-validated single-site SSL certificates for free (&#8220;Class 1&#8243;); unlimited 2-year domain-validated single-site, UCC, or wildcard certificates after paying $39.90 to further validate your account (&#8220;Class 2,&#8221; which necessitated photo IDs and a phone call, and is good for 1 year); 2-year EV certificates for $149.90 (I have no idea if this is a good price or not, as I have no use for an EV certificate right now).  The &#8220;Class 1&#8243; and &#8220;Class 2&#8243; SSL certificates, both 1- and 2-year, both single-site and wildcard are chained certificates, requiring an intermediate certificate, but the underlying root certificate was included in FF3.5, Chrome, Safari4, and IE6 (these are the browsers to which I have easy access for testing).  I wasn&#8217;t able to find a proper comprehensive list of who&#8217;s root certificates are included in which versions of what browsers (if anyone can point me to such a list, I&#8217;d be grateful).</p>
<p>$39.90 for unlimited 2-year wildcard certs is a whole heck of a lot cheaper than anything else I&#8217;ve seen.  In fact, that&#8217;s not much off of what I&#8217;d been paying for 2 years of a single-site certificate, having done a lot of comparison-shopping.  And it&#8217;s really hard to beat <strong>free</strong> for single-site certificates.  It&#8217;s an easy replacement for self-signed certificates at the same price.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/11/03/startssl-freecheap-ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Best Drive Failure Ever</title>
		<link>http://2718.us/blog/2009/10/27/best-drive-failure-ever/</link>
		<comments>http://2718.us/blog/2009/10/27/best-drive-failure-ever/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 23:27:05 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[disk failure]]></category>
		<category><![CDATA[disk utility]]></category>
		<category><![CDATA[drive]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[raid 1]]></category>
		<category><![CDATA[raid mirror]]></category>
		<category><![CDATA[raid1]]></category>
		<category><![CDATA[re]]></category>
		<category><![CDATA[re2]]></category>
		<category><![CDATA[redundant]]></category>
		<category><![CDATA[smart]]></category>
		<category><![CDATA[time machine]]></category>
		<category><![CDATA[wd]]></category>
		<category><![CDATA[wd re]]></category>
		<category><![CDATA[wd re2]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=194</guid>
		<description><![CDATA[I suppose it&#8217;s a bit misleading to call the least bad something the &#8220;best.&#8221;  This past weekend, I experience a harddrive failure&#8211;a 2-year-old WD RE2 0.5TB drive failed before its 5-year warranty was up and well before its MTBF (1.2 million hours = 136.895463 years).  It&#8217;s been a while since I had a drive fail [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose it&#8217;s a bit misleading to call the least bad something the &#8220;best.&#8221;  This past weekend, I experience a harddrive failure&#8211;a 2-year-old WD RE2 0.5TB drive failed before its 5-year warranty was up and well before its MTBF (1.2 million hours = 136.895463 years).  It&#8217;s been a while since I had a drive fail on me (excepting the hanging behavior of the 1.5TB Seagate drives, which isn&#8217;t really failure), but I&#8217;ve had plenty of drives fail over the course of 25 years of computing.  With the luckier failures, I didn&#8217;t lose anything important.</p>
<p>What&#8217;s noteworthy about this failure, though, is that it&#8217;s the first time I&#8217;ve had a drive fail and lost absolutely nothing.  The drive was half of a software RAID1 setup.  OS X&#8217;s Disk Utility showed the drive with SMART status &#8220;failing&#8221; and showed the RAID as &#8220;degraded&#8221; but was still able to make a complete copy of the RAID to another drive.  Even supposing the RAID hadn&#8217;t survived, all of my data except possibly the most recent hour is backed up to yet another drive via Time Machine.</p>
<p>I&#8217;m not going to claim the system is bulletproof (I&#8217;m sure it isn&#8217;t), but it is nice to see a redundancy/backup plan actually work when tested by the real world.  I&#8217;m just waiting on a cross-shipped replacement from WD to rebuild the RAID.</p>
<p>Remember: it&#8217;s not <em>if</em> your harddrive fails, it&#8217;s <em>when</em> your harddrive fails.  Drive failure is inevitable.</p>
<p><strong>Edit:</strong> The replacement from WD was shipped next-day air, so I&#8217;ll have the new drive tomorrow.  First business day to process the RMA, second business day to ship the replacement, and the replacement arrives on the third business day.  Pretty fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/10/27/best-drive-failure-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Pro (2007) Bluetooth</title>
		<link>http://2718.us/blog/2009/10/26/mac-pro-2007-bluetooth/</link>
		<comments>http://2718.us/blog/2009/10/26/mac-pro-2007-bluetooth/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 05:59:57 +0000</pubDate>
		<dc:creator>2718.us</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[antenna]]></category>
		<category><![CDATA[antenna wires]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[bluetooth range]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac pro]]></category>
		<category><![CDATA[mislabeled]]></category>
		<category><![CDATA[range]]></category>

		<guid isPermaLink="false">http://2718.us/blog/?p=191</guid>
		<description><![CDATA[I&#8217;ve had my Mac Pro for over 2 years now and for much of that time I&#8217;ve been resigned to the idea that my Apple Wireless Keyboard and Mighty Mouse were just not going to work well more than 6 inches from the front-lower-right corner of the Mac Pro case.  Early on, after I&#8217;d had [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my Mac Pro for over 2 years now and for much of that time I&#8217;ve been resigned to the idea that my Apple Wireless Keyboard and Mighty Mouse were just not going to work well more than 6 inches from the front-lower-right corner of the Mac Pro case.  Early on, after I&#8217;d had the machine a month or two, I mentioned it to my brother-in-law, who told me that he&#8217;d seen some talk online about bluetooth range issues, but that he was fairly certain it was all resolved before my machine was manufactured.  In fact, that&#8217;s what most of the bits I could find seemed to indicate&#8211;the incidence of Mac Pros with bad bluetooth range dropped dramatically in early 2007.</p>
<p>Dropped dramatically, but not entirely.  The underlying issue seems to be mislabeled antenna wires.  I&#8217;d made an earlier pass at trying this fix, but failed because I couldn&#8217;t find any of the other wires I was supposed to use in place of the one labeled &#8220;BT&#8221; that was attached to my bluetooth module.  Just now, however, with some more disassembly, I was able to find the other wires, swap the &#8220;BT&#8221; wire for the only other wire long enough to reach, and now my keyboard and mouse work from across the room.</p>
<p><strong>Details</strong>:  Read <a href="http://www.mcelhearn.com/?p=234">this</a> and <a href="http://thelocale.org/forum/viewtopic.php?pid=16038">this</a>.  Open the case, remove all four SATA brackets/drives.  If you can see all four antenna wires, great, go for it!  (That is, swap the &#8220;BT&#8221; wire for the only other wire long enough to reach.  If you&#8217;ve got the Airport module, see those two links to figure out how to deal with those wires.)  If not, as it was for me, remove the heatsink cover (bottom-middle of case) and the front fan assembly (bottom-front of case), then poke around in the bundles of wire behind SATA bay 1, top of the motherboard/logic board, toward the front of the case.  That&#8217;s where I found the wires I needed.</p>
<p>To remove the heatsink cover, grip it at the edge closest to the motherboard and lift and pull toward you&#8211;it&#8217;s held in place by a few magnets, no latches or anything.</p>
<p>To remove the front fan assembly, unscrew the screw that goes through the motherboard at the top-right of the fan assembly and possibly look for a screw at the bottom-right of the assembly, just under where the heatsink cover was.  Once those two screws are removed, pull the assembly straight out of the case (perpendicular to the motherboard)&#8211;it slides in a track along the bottom of the case and pulls away from a plug on the motherboard (no cables to worry about).</p>
]]></content:encoded>
			<wfw:commentRss>http://2718.us/blog/2009/10/26/mac-pro-2007-bluetooth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
