<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>fdiv.net</title>
	<link>http://fdiv.net</link>
	<description>the floating point divide</description>
	<pubDate>Tue, 26 Aug 2008 18:13:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>QTKit QCheatKit</title>
		<link>http://fdiv.net/2008/08/26/qtkit-qcheatkit/</link>
		<comments>http://fdiv.net/2008/08/26/qtkit-qcheatkit/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 18:11:12 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>kineme</category>
	<category>Interactive Media</category>
	<category>Antisocial Story</category>
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2008/08/26/qtkit-qcheatkit/</guid>
		<description><![CDATA[	Apple has been busily working to 64-bit-ify all of the frameworks they plan to continue supporting into the future (Snow Leopard and beyond).  However, QuickTime is scheduled for some nice Cocoaification, so it didn&#8217;t get much 64-bit love.  QTKit, the 64-bit impostor, pretends to be the 64-bit way forward, but unfortunately this is [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/G_O5pSMQktEJjNsa2zeJyJkoIw9KvF9W" alt="QuickTime Logo" align="right" width="256" height="256" />Apple has been busily working to 64-bit-ify all of the frameworks they plan to continue supporting into the future (Snow Leopard and beyond).  However, QuickTime is scheduled for some nice Cocoaification, so it didn&#8217;t get much 64-bit love.  QTKit, the 64-bit impostor, pretends to be the 64-bit way forward, but unfortunately this is far from useful.</p>
	<p>QuickTime is all C function stuff, rather verbose and boring.  It&#8217;s also 32-bit only.  The 64-bit front end on it is a framework called QTKit.  However, 64-bit QTKit is little more than an impostor that secretly makes things messier during the 32-to-64-bit transition.<a id="more-129"></a></p>
	<p>At its heart, QuickTime relies on encoders and decoders, among lots of glue stuff.  These encoders and decoders (collectively called codecs) are modular, so different systems can have different sets of codecs installed.  </p>
	<p>These codecs all have custom settings.  To set them up, they each include a component settings pane.  I suspect that these panes are written in Carbon, but I could be mistaken.  Either way, the component settings pane is dispatched via the Components interface.  32-bit apps can&#8217;t dispatch 64-bit Component panels, and 64-bit apps can&#8217;t dispatch 32-bit Component panels.</p>
	<p>At this point (and we&#8217;re barely doing anything interesting with QT yet!), we hit 3 critical problems:</p>
	<p>1)  Codecs at present are almost exclusively 32-bit.  This means that enumerating codecs in 64-bit space gives you next to nothing interesting to play with.</p>
	<p>2) We can&#8217;t access panels for Components that are of a different word size.</p>
	<p>3) As a hack-around to &#8220;address&#8221; the problem 1, Apple decided that QTKit in 64-bit mode should start a 32-bit background process called QTKitServer that handles encoding and decoding when called upon to do so.</p>
	<p>Now, &#8220;problem&#8221; 3 might not look like a big deal, but it actually makes things horribly contrived, incorrect, and neither forwards nor backwards compatible.  Anything touching this is going to have some exciting ups and downs in the next few years.</p>
	<p>Why?  2 Reasons come to mind.</p>
	<p>First:  The settings pane is still inaccessible.  Sure, apps can ask for a settings description dictionary, and that&#8217;s likely to be a start, but it will not be the same as the Carbon Settings Pane UI that people have come to know and &#8220;love&#8221; over the years.  Configuring and displaying the same settings will now be handled on a per-app basis instead of a system-wide one, which is a recipe for disaster.  UI-wise, inconsistency is killer.</p>
	<p>Second:  Codec enumeration in this model is horribly, horribly wrong.  QuickTime provides a simple API to get a list of all codecs on a system, but this is only available in 32-bit apps.  Components (slightly lower level) are available in 64-bit, but they don&#8217;t list 32-bit ones when you&#8217;re in 64-bit mode (because they can&#8217;t be used anyway, so who cares).  However, that secret background thread <em>will</em> use 32-bit components, and you have no way to know which ones are available short of writing a 32-bit background app yourself to query and fetch this.  This Is Exactly What QTKitServer should be doing anyway, to make the transition smooth, but it doesn&#8217;t, so it won&#8217;t be.  Rolling your own process to do this means more bugs, more duplicated code, and more problems when QTKitServer is no longer 32-bit (eventually there may be nothing but legacy 32-bit codecs, and an app that relies on this method will never be able to use modern 64-bit ones without an update, which may not be possible if the product is discontinued, the developer dies, the harddrive with the source crashes, etc).  If the Server process told you what it sees, it would always be correct, and this wouldn&#8217;t be a problem.</p>
	<p>So there&#8217;s no good solution for Problem 1 (well, NIBs/XIBs would solve this, but it&#8217;s not possible with the component API at present), and the &#8220;Solution&#8221; for problem 2 actually just makes more problems.</p>
	<p>Maybe I should look into that MSDN subscription&#8230;&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/08/26/qtkit-qcheatkit/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>NSSound and Enumerating CoreAudio Output Devices</title>
		<link>http://fdiv.net/2008/08/12/nssound-setplaybackdeviceidentifier-coreaudio-output-device-enumeration/</link>
		<comments>http://fdiv.net/2008/08/12/nssound-setplaybackdeviceidentifier-coreaudio-output-device-enumeration/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 15:16:30 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Social Story</category>
	<category>Interactive Media</category>
	<category>Antisocial Story</category>
	<category>Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2008/08/12/nssound-setplaybackdeviceidentifier-coreaudio-output-device-enumeration/</guid>
		<description><![CDATA[	Cocoa&#8217;s NSSound provides a blindingly simple way to play back audio asynchronously, and even provides some metadata and control over how the audio is played back.
	It uses the default sound device, by default.  It gives you the ability to change the output device.
	According to the documentation:
	
- (void)setPlaybackDeviceIdentifier:(NSString *)playbackDeviceIdentifier
	
Specifies the receiver’s output device.
	
playbackDeviceIdentifier
   [...]]]></description>
			<content:encoded><![CDATA[	<p>Cocoa&#8217;s <code>NSSound</code> provides a blindingly simple way to play back audio asynchronously, and even provides some metadata and control over how the audio is played back.</p>
	<p>It uses the default sound device, by default.  It gives you the ability to change the output device.</p>
	<p>According to <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSound_Class/Reference/Reference.html#//apple_ref/doc/uid/20000393-SW10">the documentation</a>:</p>
	<pre class="code">
- (void)setPlaybackDeviceIdentifier:(NSString *)playbackDeviceIdentifier
	
Specifies the receiver’s output device.
	
playbackDeviceIdentifier
    Unique identifier of a sound output device.
</pre>
	<p>That&#8217;s it.  What is the &#8220;Unique identifier of a sound output device&#8221;?  What format is this &#8220;Unique identifier&#8221;?  How do I get a list of the &#8220;Unique identifiers&#8221; of the available output devices on my system?<a id="more-128"></a></p>
	<p>No documentation exists for that part.  Anywhere.  Which makes this method kinda useless.</p>
	<p>Maybe we can use the corresponding method, <code>- (NSString *)playbackDeviceIdentifier</code>?  Nope, that just returns <code>nil</code>.</p>
	<p>So, then, how do I get a list of output devices?</p>
	<p>Turns out I need to detour from Cocoa and use CoreAudio&#8217;s C API directly.  And even then it&#8217;s not documented very well.  There was <a href="http://lists.apple.com/archives/coreaudio-api/2004/Aug/msg00004.html">a request</a> a few years ago to update the archaic, pre-OS X-era KB article, but that request has gone unanswered.</p>
	<p>Can I get a list of output devices directly?  Apparently not.  But I can get a list of ALL devices, and then interrogate each device and get a list of each device&#8217;s buffers.  Then I can interrogate each buffer and add up the number of output channels the device has in total.  If there are more than zero output channels, this device is an output device!</p>
	<p>I was able to piece together the following enumerator:</p>
	<pre class="code">
UInt32 sz;
AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices,&amp;sz,NULL);
AudioDeviceID *audioDevices=(AudioDeviceID *)malloc(sz);
AudioHardwareGetProperty(kAudioHardwarePropertyDevices,&amp;sz,audioDevices);
UInt32 deviceCount = (sz / sizeof(AudioDeviceID));
	
UInt32 i;
for(i=0;i&lt;deviceCount;++i)
{
	NSString *s;
	
	// get buffer list
	UInt32 outputChannelCount=0;
	{
		AudioDeviceGetPropertyInfo(
			audioDevices[i],0,false,
			kAudioDevicePropertyStreamConfiguration,
			&amp;sz,NULL
			);
		AudioBufferList *bufferList=(AudioBufferList *)malloc(sz);
		AudioDeviceGetProperty(
			audioDevices[i],0,false,
			kAudioDevicePropertyStreamConfiguration,
			&amp;sz,&amp;bufferList
			);
	
		UInt32 j;
		for(j=0;j&lt;bufferList.mNumberBuffers;++j)
			outputChannelCount += bufferList.mBuffers[j].mNumberChannels;
	
		free(bufferList);
	}
	
	// skip devices without any output channels
	if(outputChannelCount==0)
		continue;
	
	// output some device info
	{
		sz=sizeof(CFStringRef);
	
		AudioDeviceGetProperty(
			audioDevices[i],0,false,
			kAudioDevicePropertyDeviceUID,
			&amp;sz,&amp;s
			);
		NSLog(@&quot;DeviceUID: [%@]&quot;,s);
		[s release];
	
		AudioDeviceGetProperty(
			audioDevices[i],0,false,
			kAudioObjectPropertyName,
			&amp;sz,&amp;s
			);
		NSLog(@&quot;    Name: [%@]&quot;,s);
		[s release];
	
		NSLog(@&quot;    OutputChannels: %d&quot;,outputChannelCount);
	}
}
</pre>
	<p>On my MacBook Pro, this currently outputs:</p>
	<pre class="code">
DeviceUID: [AppleFWAudioEngineGUID:18202415010545664]
    Name: [EDIROL FA-101 (0000)]
    OutputChannels: 10
DeviceUID: [AppleHDAEngineOutput:0]
    Name: [Built-in Output]
    OutputChannels: 2
</pre>
	<p>Why couldn&#8217;t this have been as easy as <code>NSSound</code>?
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/08/12/nssound-setplaybackdeviceidentifier-coreaudio-output-device-enumeration/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Silicon Dioxide (SiO2)</title>
		<link>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/</link>
		<comments>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 17:50:33 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Social Story</category>
	<category>kineme</category>
	<category>Interactive Media</category>
	<category>Quartz Composer</category>
	<category>Apple</category>
	<category>Software Development</category>
	<category>Kosada</category>
		<guid>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/</guid>
		<description><![CDATA[	In the wee small hours of this morning, Kineme Interactive Media released its first commercial product, QuartzCrystal.
	QuartzCrystal is an offline renderer that turns Quartz Compositions into portable QuickTime movies.  It supports 3rd party plugins, as well as patches that do not work in safe-mode-only environments (such as QuickTime Pro).  It also supports software [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://kineme.net/product/QuartzCrystal"><img style="background: none;" align="right" alt="QuartzCrystal Logo" src="http://kineme.net/files/imagecache/product/files/QuartzCrystal-1.0.png" /></a>In the wee small hours of this morning, <a href="http://kineme.net/">Kineme Interactive Media</a> released its first commercial product, <a href="http://kineme.net/product/QuartzCrystal">QuartzCrystal</a>.</p>
	<p>QuartzCrystal is an offline renderer that turns Quartz Compositions into portable QuickTime movies.  It supports 3rd party plugins, as well as patches that do not work in safe-mode-only environments (such as QuickTime Pro).  It also supports software scene antialiasing, so if you have a Mac with plenty of RAM and a hard-core video card, you can make spectacularly beautiful renderings of your plugins, effects, and compositions.</p>
	<p>Beside QuartzCrystal, the only other product that renders and encodes compositions to movies is <a href="http://www.apple.com">Apple</a>&#8217;s own <a href="http://store.apple.com/us/product/D3380Z/A">QuickTime Pro</a>, which doesn&#8217;t support plugins, unsafe patches, or antialiasing.</p>
	<p><a href="http://kineme.net/product/QuartzCrystal"><img style="background: none;" alt="QuartzCrystal Main Window Screenshot" src="http://kineme.net/system/files/QuartzCrystal+Main+Window_1.png" /></a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The Black Apple Strikes!</title>
		<link>http://fdiv.net/2008/07/16/the-black-apple-strikes/</link>
		<comments>http://fdiv.net/2008/07/16/the-black-apple-strikes/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 13:10:26 +0000</pubDate>
		<dc:creator>mradcliffe</dc:creator>
		
	<category>Social Story</category>
	<category>Apple</category>
		<guid>http://fdiv.net/2008/07/16/the-black-apple-strikes/</guid>
		<description><![CDATA[	It took a few minutes for cwright and smokris to realize what was different yesterday. Yes, the days had finally come. I had begun to shave my proverbial neckbeard.  More than year after and much like similar happenings, 7/15/08 is a day that shall live in infamy.
	I have an Apple product once again.  [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/9n_L7_jCotZ1qVHb871QfRUQwexsq_S0/thumbnail-256" align="right" width="256" height="192" alt="Matt Radcliffe and his Blackbook" />It took a few minutes for <a href="http://perpendiculo.us">cwright</a> and <a href="http://softpixel.com/~smokris">smokris</a> to realize what was different yesterday. Yes, the days had finally come. I had begun to <a href="http://fdiv.net/2007/05/12/project-hayate-prolonging-the-inevitable-part-1/">shave my proverbial neckbeard</a>.  More than year after and much like <a href="http://fdiv.net/2007/04/05/malus-sylvestris-migration-part-1">similar happenings</a>, 7/15/08 is a day that shall live in infamy.</p>
	<p>I have an Apple product once again.  黒林檎（くろりんご、kuroringo）is born! <a id="more-126"></a></p>
	<p>Two weeks ago I committed myself to purchase a macbook to replace my aging <a href="http://fdiv.net/2007/12/11/fail-the-self-replicating-network-connection/">IBM Thinkpad X31</a>.  The X31 had served me well for more then 4 years.  Over the past year I had debated what laptop would best fit my needs.  Although I quite liked the macbook I was put off by the increased weight.  I briefly considered the Macbook Air only to conclude that the decrease battery life was not worth my time.  In the end I decided to eat the weight and possible battery life restrictions of the macbook for the power and ease of <a href="http://apple.com/mac">OS X</a> (not including not being able to print to a Sharp copier).</p>
	<p>In any case after a false start whereupon <a href="http://apple.com">Apple</a> did not have a black macbook in stock despite listing it on their refurbished section. However I checked on 2008.07.09, and a sexy black 2.4ghz core 2 duo macbook was listed. I decided to go with regular shipping hoping it would arrive by the 11th.  Hah! The 15th rolled around, and FedEx delivered the laptop about an hour before my peers would arrive up north.</p>
	<p>So I concocted a devious plan to lure them into a false sense of security. I set this ebony beast of glory onto the port replicator of my X31, propped a Dell 5310n product info. sheet over the back, and then a white piece of paper over the keyboard.</p>
	<p>After a delicious lunch an Pizza Hut we returned. Chris was the first.  He passed right by, sat down, and opened his macbook. I sat down, turned on the power to the hear my blackbook chime for the first time.  Chris mentioned, &#8220;<i>Oh did you change your out-of-sleep sound to that</i>?&#8221; Mission accomplished.</p>
	<p>Steve walked in a little later. At this point I had taken no measures to disguise my macbook. His mind was pre-occupied with other matters, and he missed the white logo in a sea of black directly across from the office door. Over by the refrigerator I said, &#8220;Hey dude check it out&#8230;&#8221;</p>
	<p>After a few moments of shock or disbelief came the inevitable, &#8220;Woah&#8230;&#8221;</p>
	<p>They also missed the list of names that I had jotted down (descriptions added with my thoughts):</p>
	<ul>
	<li>obsidian: sharp, rock, sexy, and black</li>
	<li>fruitbat/okomori/ookoumori: sillier, but black and mobile.</li>
	<li>raven: meh&#8230;</li>
	<li>shikkoku: too phallus-y</li>
	<li>kuroringo: I had thought up kokuringo too with the same meaning, but see above.</li>
	<li>blacksheep: I liked this one along with obsidian.</li>
	<li>kurome: black eyes, meh&#8230;</li>
	</ul>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/07/16/the-black-apple-strikes/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Apple Mail Hack: Move Message To Sent Folder</title>
		<link>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/</link>
		<comments>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 14:43:27 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/</guid>
		<description><![CDATA[	In the year that has elapsed since I failed to explain why I was using PINE for email, I&#8217;ve switched to Apple Mail.  Don&#8217;t ask.
	Well, it&#8217;s been alright, but much to my regret the improved latency due to keystrokes only traveling around my local machine &#8212; instead of through the interweb and back as [...]]]></description>
			<content:encoded><![CDATA[	<p><img style="background-color: #808080" align="right" src="http://img.b33p.net/pub/bMIYbDwt8DlYjnZCp4wFZ7KxnbSr1o7L" alt="Apple Mail Icon" />In the year that has elapsed since I <a href="http://fdiv.net/2007/05/12/keybindings-in-macosx-terminal-app/">failed to explain</a> why I was using PINE for email, I&#8217;ve switched to <a href="http://www.apple.com/macosx/features/mail.html">Apple Mail</a>.  Don&#8217;t ask.</p>
	<p>Well, it&#8217;s been alright, but much to my regret the improved latency due to keystrokes only traveling around my local machine &#8212; instead of through the interweb and back as was the case with PINE on a remote machine &#8212; makes it almost justifiable.  Almost.<br />
<a id="more-124"></a></p>
	<p>Apple Mail makes it really easy to delete messages.  You just press the &#8220;Delete&#8221; button.  Poof.</p>
	<p>Apple Mail, however, makes it a lot more difficult to SAVE messages.  You have to go to the &#8220;Message&#8221; menu, then select &#8220;Move To&#8221;, then select the mailbox you want to save it in.  Or use the mouse to drag-and-drop it into your mailbox of choice.  But this is not acceptable as using the mouse depletes one&#8217;s indie cred even more than simply using a GUI mail client in the first place.</p>
	<p>So, armed with <a href="http://www.bazza.com/~eaganj/weblog/2008/02/16/demystifying-mailapp-plugins-for-leopard/">James Eagan&#8217;s article on writing mailbundles</a> I wrote a hack which adds a menu item, complete with keyboard shortcut, allowing the user to easily and quickly file one or more messages away in the &#8220;Sent&#8221; folder (*).  See here:</p>
	<p><img align="right" src="http://img.b33p.net/pub/9uPTamngrrI4UzA_STkwRLK0tdJ4o0Rn" alt="Move to Sent Menu Screenshot" /></p>
	<p>(*) Since switching to Apple Mail &#8212; and having access to its nifty and swift full-text search capabilities &#8212; I&#8217;ve abandoned the thousand-or-so individual folders in which I used to file things away.  Mail in my Inbox now goes to one of two destinations:  <i>Trash</i>, for spam and automatic notifications and other stuff I have no interest in ever looking at again, or <i>Sent</i>, for anything written by a human and on occasion important things written by computers.</p>
	<p>Download <a href="http://softpixel.com/~smokris/widgets/appleMail/MoveMessageToSentFolder-1.0.zip">MoveMessageToSentFolder-1.0.zip</a>.<br />
Leopard (Mac OS X 10.5) only.</p>
	<p>To install:</p>
	<ul>
	<li>Copy the mailbundle to <code>~/Library/Mail/Bundles</code>.  Create this folder if it doesn&#8217;t already exist.</li>
	<li>Open Terminal and run the following commands to enable mailbundle support:
	<pre>
defaults write com.apple.mail EnableBundles 1
defaults write com.apple.mail BundleCompatibilityVersion 3
</pre>
	</li>
	</ul>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Neural-Go-Round</title>
		<link>http://fdiv.net/2008/03/15/neural-go-round/</link>
		<comments>http://fdiv.net/2008/03/15/neural-go-round/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 18:26:29 +0000</pubDate>
		<dc:creator>bbinkovitz</dc:creator>
		
	<category>ruori</category>
	<category>ruori: pure</category>
		<guid>http://fdiv.net/2008/03/15/neural-go-round/</guid>
		<description><![CDATA[	
Remember those weird things we built for PURE a couple years ago, and posted creepy photos of? Well it&#8217;s become a traveling freakshow of stochastic electronic goodness, appearing after its initial Boston display at electro-music 2007 in Philadelphia, and soon to be inflicted on the public again at Notacon in Cleveland, April 4th - 6th, [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/j5ZKNxqS5rn92isEMPmu2DE0mvtYKbYb/thumbnail-512" alt="project ruori's neural currency exhibit at notacon" /><br />
Remember those weird things we built for <a href="http://reanimationstudios.com/pure/">PURE</a> a couple years ago, and <a href="http://fdiv.net/category/ruori/pure/">posted creepy photos</a> of? Well it&#8217;s become a traveling freakshow of stochastic electronic goodness, appearing after its initial Boston display at <a href="http://event.electro-music.com">electro-music 2007</a> in Philadelphia, and soon to be inflicted on the public again at <a href="http://www.notacon.org/">Notacon</a> in Cleveland, April 4th - 6th, 2008. Come check it out, and we might lovingly assault your ears with our mental vibrational energies if you&#8217;re lucky.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/03/15/neural-go-round/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The Complete Idiot&#8217;s Guide to Voter Fraud</title>
		<link>http://fdiv.net/2008/03/03/the-complete-idiots-guide-to-voter-fraud/</link>
		<comments>http://fdiv.net/2008/03/03/the-complete-idiots-guide-to-voter-fraud/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:53:21 +0000</pubDate>
		<dc:creator>bbinkovitz</dc:creator>
		
	<category>Antisocial Story</category>
		<guid>http://fdiv.net/2008/03/03/the-complete-idiots-guide-to-voter-fraud/</guid>
		<description><![CDATA[	Remember how in 2004 everyone was so freaked out about the terrific hackability of both the hardware and software of Diebold and other electronic voting machines?  Well, the fuss has sort of died down about that.  (Not that there was any reason for it to &#8212; there are no reports that the problems [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/krj82FGmbYujuV91T7VqrAWEI2aNkw1W" alt="Warning - Fraud Hazard Next 1 Elections" align="right"/>Remember how in 2004 everyone was so freaked out about the <a href="http://arstechnica.com/articles/culture/evoting.ars/1">terrific</a> <a href="http://blog.washingtonpost.com/securityfix/2007/07/report_evoting_systems_hackabl.html">hackability</a> of both the <a href="http://www.techdirt.com/articles/20070123/134221.shtml">hardware</a> and <a href="http://itpolicy.princeton.edu/voting/">software</a> of Diebold and other electronic voting machines?  Well, the fuss has sort of died down about that.  (Not that there was any reason for it to &#8212; there are no reports that the problems with the machines were ever adequately addressed.)  And anyway, what vigilante dictator has the time or inclination to mess around with all that techno-crap involved in hacking a voting machine?  Key-cutting takes all of 2-5 minutes per key, and firmware hacking involves learning boring things, like what firmware is.  It&#8217;s enough to get a would-be crooked election worker or stealth saboteur to give up and go back to throwing Molotov cocktails at Planned Parenthood staff. </p>
	<p>But don&#8217;t give up yet, all you burgeoning totalitarians out there! For here I shall reveal a much simpler (albeit slightly less efficient) method of voting fraud.  Here is what I learned in my absentee-ballot-casting experience.  Oh yeah, and dear internets: please use this for good and not evil.  And also don&#8217;t use it at all.  <a id="more-120"></a></p>
	<p>Today I cast my absentee vote for tomorrow&#8217;s Ohio presidential primary at the Franklin County Board of Elections.  Like a good citizen, I arrived there prepared with my opinions and my state-issued, valid photo ID.  I thought I was packing light by leaving my purse in the car and just grabbing my wallet, but it turned out I could have traveled lighter &#8212; you don&#8217;t need a photo ID, or any other kind of ID for that matter, to vote absentee.  And, since there&#8217;s such a large window of time in which you can cast an absentee ballot, you can vote pretty much as many times as you want, provided you have enough people&#8217;s name, address, date of birth, and last four digits of their SSN.</p>
	<p>Parking was hectic and when I rolled my window down to get parking instructions, I was assailed by propagandists from all sides.  I was then directed to a parallel parking space into which the car barely fit.  After that I waited in line for over an hour.</p>
	<p>When I got to the voting booth without ever having been asked to so much as spell my last name, I asked an election worker, &#8220;Isn&#8217;t anyone going to ask me for identification?&#8221;</p>
	<p>&#8220;They don&#8217;t need to,&#8221; she replied.  &#8220;They have all that information in the computer.&#8221;</p>
	<p>&#8220;So, it would be pretty easy, then, for someone to show up and pretend to be me?&#8221; I asked/commented.</p>
	<p>&#8220;No, because there are certain things they wouldn&#8217;t know about you,&#8221; she said, matter-of-factly.</p>
	<p>The absentee ballot request form requires a voter to fill out their name, current address, and the last four digits of their social security number.  <i>That&#8217;s right &#8212; not even the whole number.</i>  This is information that tons of people have about almost everybody.  Employers, former employers, universities, high schools, the postal service, the college board, and lots of others have this info about me. </p>
	<p>I said, &#8220;But anyone with the information on this card&#8221; &#8212; gesturing to my absentee ballot request form &#8212; &#8220;would be able to just show up and claim to be me?  And no one would challenge that?&#8221;</p>
	<p>She looked at me as though I&#8217;d expressed concern that the ballot-boxes weren&#8217;t sufficiently elf-proofed. After an exasperated hand-on-hip-eyeroll-sigh, she demanded, &#8220;Now, who would ever go to that much trouble?&#8221; and huffed away.  My ID never left my pocket.</p>
	<p>(Disclaimer:  this is probably not a new development by any means.  I have never voted absentee before, so I have no idea how long this opportunity for election fraud has been available, and I can only speculate that it&#8217;s been a good many years.  I also can&#8217;t guarantee the efficacy of voting a bajillion times for your chosen candidate, because it seems likely that the number of people on each side of any given controversial ballot issue who carry out this kind of fraud would probably be evenly distributed enough to cancel each other out.  And then there&#8217;s also the question of whether absentee votes are even counted, or whether anyone&#8217;s votes are counted, or whether the word &#8216;counting&#8217; even applies at all to election polling at all anymore. )
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/03/03/the-complete-idiots-guide-to-voter-fraud/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Data Integrity a Posteriori</title>
		<link>http://fdiv.net/2008/03/01/data-integrity-a-posteriori/</link>
		<comments>http://fdiv.net/2008/03/01/data-integrity-a-posteriori/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 00:03:44 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Social Story</category>
		<guid>http://fdiv.net/2008/03/01/data-integrity-a-posteriori/</guid>
		<description><![CDATA[	Data integrity is a hot topic these days.  With data volumes on the rise and hard drive half-lives falling, protecting data has become important in many different fields.
	Conventionally, a storage medium will report its life expectancy in terms of MTBF, or Mean Time Between Failures.  This is often measured in hours.  However, [...]]]></description>
			<content:encoded><![CDATA[	<p><img align="right" src="http://img.b33p.net/pub/WPZI3FbeLDAt8JnhhQuUVjhTP-gedHE7/thumbnail-256" alt="Danger: Corrosive Liquids.  Wear Protective Equipment." />Data integrity is a hot topic these days.  With data volumes on the rise and hard drive half-lives falling, protecting data has become important in many different fields.</p>
	<p>Conventionally, a storage medium will report its life expectancy in terms of <acronym title="Mean Time Between Failures">MTBF</acronym>, or Mean Time Between Failures.  This is often measured in hours.  However, it&#8217;s not always this simple.  Usage patterns and environmental characteristics take a heavy toll on how long our storage devices last.  <a id="more-94"></a></p>
	<p>One fun experiment I unintentionally tried this afternoon helps provide one data point that goes above and beyond our classical MTBF estimate, and into the realm of &#8212; shall we say &#8212; aquatic endurance?</p>
	<p>Several months ago, I purchased a SanDisk 1.0<acronym title="Gigabyte">GB</acronym> Cruzer Micro <acronym title="Universal Serial Bus">USB</acronym> flash drive.  I used this as spill-over when I took too many videos without flushing the data off of my camera while I was in Utah.  Since I didn&#8217;t have a personal computer, and only had limited computer access, the best I could do was shuffle data between various solid-state devices.  So this device has been filled to capacity a couple times, and has been completely erased a couple times, and has had various data-shuffling jobs in between for the past 9 months or so.  Despite being dropped, being X-Rayed at <acronym title="Salt Lake City">SLC</acronym> Airport, and being kept in pockets for long periods of time in various weather extremes, it has held up like a champ.  I&#8217;ve not lost anything, nor have I had any problems shuffling data between my laptops and desktops, as well as other machines.</p>
	<p>This experiment, however, was above and beyond the typical environmental exposure these devices normally take.  Today, my little USB drive got to take a swim through our Frigidaire Washer and then through our Whirlpool Dryer.  For what it&#8217;s worth, the Washer is a sideways one, so it uses less water.  This might have been the show-stopper in disguise.</p>
	<p>The reason this all happened is because I normally hold all of my belongings in my pockets.  That&#8217;s what they&#8217;re there for, after all.  Because I was shuffling data around last week, I must have left it in one of my pockets.</p>
	<p>Upon finding myself nearly out of clothes for the week, I opted to do laundry.  My work clothes were especially dirty (landscaping tends to get lots of dirt on your hands and clothes) so I opted to wash with the Heavy Wash Cycle, which takes about 25-30 minutes, to get my clothes all clean and ready for the coming work week.  It was a fairly large load; several (4) pairs of jeans and many (5) shirts.  No socks.</p>
	<p>After washing, I like to get my clothes into the dryer as soon as possible to avoid the mildew smell.  I&#8217;ve never had much faith in the &#8220;automatic&#8221; setting on dryers, so I put all the clothes in for 60 minutes.  Since I had more than 2 pairs of jeans in there, I also extended the dryer time an additional 20 minutes once the first 60 expired because my jeans like to hold irrationally large quantities of water and are never dry after a mere 60 minutes of high heat.  After this duration, I removed my clothes, and discovered my flash drive sitting comfortably on the bottom of the dryer cylinder.  This, of course, made me a bit downhearted.  Cellphones can&#8217;t endure this kind of rough treatment.  Palm Pilots can&#8217;t either.  I wouldn&#8217;t dare try it on a camera, <acronym title="Compact Disc">CD</acronym> player, or Social Security Card either.  From past experience, things were looking grim for this little data carrier.</p>
	<p>As with any storage medium loss, the first thoughts through my head were &#8220;What did I put on that device that isn&#8217;t backed up somewhere else?&#8221;  Thankfully, I couldn&#8217;t remember anything.  This was in part because I haven&#8217;t explored it much in a long time, making me likely to forget.  It&#8217;s always easier to lose data if you can&#8217;t remember what it was anyway.</p>
	<p>Deciding to test it out and see what I could salvage, I decided to plug it into my laptop and see what would happen.  I was partially expecting it to cause my laptop to reboot;  I&#8217;ve seen computers where shorting the USB +5V and Ground pins acts as a poor man&#8217;s reset switch.  If that didn&#8217;t happen (I&#8217;ve also seen where my MacBook is engineered to be at least a little more resilient than that), I figured it&#8217;d leave some fun console messages, do nothing, or have tons of data errors.</p>
	<p>Much to my surprise, the disk lit up when inserted.  It also blinked a couple times, characteristic of OS auto-mounting.  This was good so far.  The mounted volume showed up on my desktop, and lo-and-behold, all the data was there, intact.  Currently, I have about 450<acronym title="Megabytes">MB</acronym> of data on it.  Disk Utility didn&#8217;t find any File System problems, and inspection using Finder didn&#8217;t either.  The pictures show up fine, the MP3&#8217;s sound fine, and all the source code is intact.  Since <acronym title="Joint Photographic Expert Group">JPEG</acronym><acronym>s and MP3s will be essentially useless if even a few bits are toasted, I find these to be handy metrics in the event of suspected data corruption.</p>
	<p>So, when looking for devices that retain data above and beyond the call of normal duty, look no further.  This little Cruzer took a licking, and has kept on ticking.</acronym>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/03/01/data-integrity-a-posteriori/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Python&#8217;s Flying Circus</title>
		<link>http://fdiv.net/2008/02/22/pythons-flying-circus/</link>
		<comments>http://fdiv.net/2008/02/22/pythons-flying-circus/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 19:35:35 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>kineme</category>
	<category>Antisocial Story</category>
	<category>Language</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2008/02/22/pythons-flying-circus/</guid>
		<description><![CDATA[	
	Lately I&#8217;ve been working on integrating (or, more accurately, attempting to integrate) the Python scripting language into some plugins for an application we develop plugins for.  We&#8217;ve wrapped many libraries with varying levels of success, so this one wasn&#8217;t going to be much different.  Or, so we thought.
	Technically, we&#8217;re interested in &#8220;Embedding&#8221; Python [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/cwIngHlMs0BtBweZ0BcHJrnBo3K6wYeW/thumbnail-256" align="right" alt="Python Logo" /></p>
	<p>Lately I&#8217;ve been working on integrating (or, more accurately, attempting to integrate) the Python scripting language into some plugins for an application we develop plugins for.  We&#8217;ve wrapped many libraries with varying levels of success, so this one wasn&#8217;t going to be much different.  Or, so we thought.<a id="more-118"></a></p>
	<p>Technically, we&#8217;re interested in &#8220;Embedding&#8221; Python &#8212; We have a native Objective-C application that needs to make use of the Python interpreter at various stages of execution.  The Python scripts are user-supplied, and are exceptionally free-form:  the functions they write can take variable numbers of inputs, produce variable numbers of outputs, and can use any Python modules they have installed.</p>
	<p>Unfortunately, this makes the embedding process somewhat complicated:  From Objective-C, we need to be able to parse the script, find all its functions, and get all those functions&#8217; input and output parameters.  From this data, we can expose the Python module&#8217;s interface usefully.  Unfortunately, Python does not appear to allow this kind of introspection from the outside (and it&#8217;s questionable whether or not it&#8217;s even possible from the inside.)</p>
	<p>In searching for information on this, <a href="http://davidf.sjsoft.com/mirrors/mcmillan-inc/embed.html">Numerous</a> <a href="http://www.developer.com/lang/other/article.php/2217941">Documents</a> are <a href="http://twistedmatrix.com/users/glyph/rant/extendit.html">Found</a> that <a href="http://www.linuxjournal.com/article/8497">Needlessly</a> <a href="http://www.python.org/doc/current/ext/embedding.html">Complicate</a> or Obfuscate the difference between Embedding and Extending.  As if it&#8217;s really that difficult (<strong>embed</strong> means &#8220;fix firmly and deeply in a surrounding mass&#8221; while <strong>extend</strong> means &#8220;cause to cover a larger area; make longer or wider&#8221;.  From these obvious definitions, we can infer that &#8220;Embedding&#8221; means putting something inside, while &#8220;Extending&#8221; means adding functionality or abilities.  Maybe it&#8217;s not so clear for non-native english speakers.  I don&#8217;t know.)</p>
	<p>Another annoying side-trip of this research was an overwhelmingly smug idea that almost reeks of Java.  This side effect is the recorded smarmy discussion of why one should &#8220;Extend&#8221; rather than &#8220;Embed&#8221; (these reasons are then used to explain away why there isn&#8217;t any good documentation on actually embedding Python).  The arguments go something like this:</p>
	<ul>
	<li>Python&#8217;s so good, cross-platform, and flexible that it&#8217;s actually more cost-effective to <em>Throw Out All Your C/C++/ObjC Code And Rewrite Everything In Python.</em></li>
	<li>Embedding is so cumbersome to code, and so difficult compared to embedding Python in Python, that you should <em>Throw Out All Your C/C++/ObjC Code And Rewrite Everything In Python.</em></li>
	<li>High-performance code can be written in C, and then called from within Python&#8217;s runtime when you actually need to performance boost.  Why not just <em>Throw Out All Your C/C++/ObjC Code And Rewrite Everything In Python</em> Except for the fast bits?</li>
	<li>If you embed Python, you&#8217;ll annoy Python developers who can&#8217;t access the modules they&#8217;re used to using.  Why not <em>Throw Out All Your C/C++/ObjC Code And Rewrite Everything In Python</em> so you don&#8217;t annoy your Python developers?</li>
	</ul>
	<p>These arguments cover some pretty diverse ground there.  Unfortunately, there are 2 fatals flaws in the list above.  </p>
	<p>First, embedded Python _Can_ in fact use installed modules just like raw Python, so point 4 above is flagrantly incorrect.  There are some suggestions that it&#8217;s simply annoying to develop in such an environment because namespaces are all strange (or wrong) and nothing works quite right.  Guess What:  Welcome To Plugin Development!  It&#8217;s like these Python developers have never worked on real projects before or something.</p>
	<p>Second, All of the above points assume that it&#8217;s possible to discard your entire code-base and rewrite everything.  While this is technically possible, it&#8217;s not very likely when you don&#8217;t have access to the source of the application to be discarded (in our case).  The unfortunate downside is that _All The Listed &#8220;Solutions&#8221; Hinge On This One Idea_.</p>
	<p>What&#8217;s with these non-solutions from allegedly flexible languages?  Even Objective-C, a compiled language, and the (totally undocumented) JavaVM-ObjC bridge, offer enough introspection to at least find methods and parameter counts without too much hassle.  Maybe Python does this just as simply, but if so, no one&#8217;s talking about it&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/02/22/pythons-flying-circus/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Some Crazy MacBook Pro Checkerboard Graphics Corruption / Crash</title>
		<link>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/</link>
		<comments>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 18:34:40 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Antisocial Story</category>
	<category>Yon Reptile Campaign</category>
	<category>Apple</category>
		<guid>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/</guid>
		<description><![CDATA[	Last summer Kosada purchased a MacBook Pro for the president of Yon Reptile Campaign.  It&#8217;s been a great improvement over the old Dell laptop he was formerly using, and, though he was initially worried about whether he&#8217;d be able to grasp the new UI, he seems to have picked it up quickly, and he [...]]]></description>
			<content:encoded><![CDATA[	<p><img align="right" src="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3/thumbnail-256"/>Last summer <a href="http://kosada.com/">Kosada</a> purchased a MacBook Pro for the president of Yon Reptile Campaign.  It&#8217;s been a great improvement over the old Dell laptop he was formerly using, and, though he was initially worried about whether he&#8217;d be able to grasp the new UI, he seems to have picked it up quickly, and he reports that he&#8217;s been loving it.</p>
	<p>But this morning he called me with a rather odd problem:</p>
	<blockquote><p>&#8220;I hooked up my Treo and started syncing it, then walked away for a few minutes.  When I returned, the screen was covered with a bunch of squares, and I can&#8217;t do anything.&#8221;</blockquote>
<a id="more-119"></a></p>
	<p>He took a few photos with his cellphone camera and emailed them to me (click for full-size):<br />
<a target="_new" href="http://img.b33p.net/pub/8l3SZ4dJ8jbUXqjU4jB0O5RnfDph8_bV"><img src="http://img.b33p.net/pub/8l3SZ4dJ8jbUXqjU4jB0O5RnfDph8_bV/thumbnail-256"/></a><a target="_new" href="http://img.b33p.net/pub/bG1i2Tz8SJg39EoEtsm7_48rrHKin1wg"><img src="http://img.b33p.net/pub/bG1i2Tz8SJg39EoEtsm7_48rrHKin1wg/thumbnail-256"/></a><a target="_new" href="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3"><img src="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3/thumbnail-256"/></a></p>
	<p>(You can see bits of the menu-bar scattered around the screen, and it looks like <a href="http://www.markspace.com/missingsync_palmos.php">Missing Sync</a> had launched iPhoto.  Possibly related?)</p>
	<p>I talked him through a few tests.  He was able to see the mouse cursor and move the mouse, but clicking didn&#8217;t cause any apparent response.  He could activate Dashboard &#8212; Dashboard itself looked fine, and the checkerboard showed through in the background.  He then tapped the power button, and the &#8220;Are you sure you want to shut down your computer now?&#8221; dialog appeared, but it was scrambled and the buttons didn&#8217;t work.</p>
	<p>I instructed him to power it off by holding the power button down.  Since rebooting, it&#8217;s been working fine.</p>
	<p><em>*Confused.*</em></p>
	<p>I googled it a bit but wasn&#8217;t able to find any clear reports of this happening to other people.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
