<?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>The Bratton Blog</title>
	<atom:link href="http://bratton.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://bratton.com</link>
	<description>Infrequent Techy Ramblings</description>
	<lastBuildDate>Fri, 19 Feb 2010 15:39:07 +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>Tips on Using UIGlassButton to Make Shiny Glass iPhone Buttons</title>
		<link>http://bratton.com/index.php/2010/02/19/tips-on-using-uiglassbutton-to-make-shiny-glass-iphone-buttons/</link>
		<comments>http://bratton.com/index.php/2010/02/19/tips-on-using-uiglassbutton-to-make-shiny-glass-iphone-buttons/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:37:37 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=58</guid>
		<description><![CDATA[Erica Sadun linked to Jonathan Wight&#8217;s nifty use of a private UIGlassButton class to make shiny &#8220;glass&#8221; iPhone buttons, and here are a few tricks on using it well.
First up, I like making a new Utility Application in XCode for this, because you can plug Jonathan&#8217;s code into the showInfo method.  When you run the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tuaw.com/2010/02/19/iphone-devsugar-create-shiny-buttons-easily/">Erica Sadun linked</a> to Jonathan Wight&#8217;s <a href="http://twitter.com/schwa/status/9288691077">nifty use of a private UIGlassButton class</a> to make shiny &#8220;glass&#8221; iPhone buttons, and here are a few tricks on using it well.</p>
<p>First up, I like making a new Utility Application in XCode for this, because you can plug <a href="http://pastie.org/830884">Jonathan&#8217;s code</a> into the showInfo method.  When you run the app in the simulator, just tap the info button to generate the button image.</p>
<p>And as for the button image itself, I recommend setting the height of the image (in CGRectMake) to the exact height of the button you are going to be using, plus 8 pixels due to the empty space around the button image where shaodw live.  If you&#8217;re using Interface Builder, check the Size Inspector tab to see what the height of your button is.  Sure, the iPhone SDK will resize your image to fit whatever button size you&#8217;re using, but it won&#8217;t be pixel perfect.  Also I set the width at 29, as you don&#8217;t really need more width than that for making a resizable button image, such as in the following code:</p>
<p>UIImage *blueButtonImage = [[UIImage imageNamed:@"blueButton.png"] stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
[myButton setBackgroundImage:blueButtonImage forState:UIControlStateNormal];</p>
<p>For more details on the right Interface Builder settings for custom UIButtons (such as to be sure to pick Custom for button type or you&#8217;ll end up with an ugly gray outline), check out <a href="http://blog.chomperstomp.com/creating-dynamically-re-sizable-buttons-for-iphone-apps/">Christopher McCulloh&#8217;s tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2010/02/19/tips-on-using-uiglassbutton-to-make-shiny-glass-iphone-buttons/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fast iPhone Clipboard Manager &#8211; Snippets!</title>
		<link>http://bratton.com/index.php/2009/07/09/fast-iphone-clipboard-manager-snippets/</link>
		<comments>http://bratton.com/index.php/2009/07/09/fast-iphone-clipboard-manager-snippets/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:02:39 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=54</guid>
		<description><![CDATA[My iPhone app &#8220;Snippets&#8221; went out a few days ago, and I was lucky enough to get a mention in TUAW, The Unofficial Apple Weblog!
A nice quote from the article:
&#8220;The canned responses included with Snippets are worth its price of $.99 alone, in this blogger&#8217;s opinion. But even if you are wittier than I and [...]]]></description>
			<content:encoded><![CDATA[<p>My iPhone app &#8220;<a href="http://snippets.weebly.com/">Snippets</a>&#8221; went out a few days ago, and <a href="http://www.tuaw.com/2009/07/06/manage-your-iphones-clipboard-with-snippets/">I was lucky enough to get a mention in TUAW, The Unofficial Apple Weblog</a>!</p>
<p>A nice quote from the article:</p>
<p>&#8220;The canned responses included with Snippets are worth its price of $.99 alone, in this blogger&#8217;s opinion. But even if you are wittier than I and appreciate original pieces of text, Snippets is a great app with a very easy-to-use interface that I plan to use again and again.&#8221;</p>
<p>Thanks, <a href="http://www.tuaw.com/bloggers/kevin-harter/">Kevin Harter</a>, for an excellent write-up!</p>
<p>Some people have asked why you would want to use Snippets instead of just the built-in iPhone Notes app&#8230;  Well, Snippets has categories, comes with a slew of premade snippets to use for inspiration, and it&#8217;s fast because you just have to look at a snippet and it&#8217;s automatically copied to the clipboard, instead of doing a double-tap, select button, drag and drag the sliders and then the copy button.  With Snippets it&#8217;s 2 taps and you&#8217;ve got a snippet copied to the clipboard!  (Not counting launching the app) <img src='http://bratton.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2009/07/09/fast-iphone-clipboard-manager-snippets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone FrozenBubble</title>
		<link>http://bratton.com/index.php/2009/01/29/iphone-frozenbubble/</link>
		<comments>http://bratton.com/index.php/2009/01/29/iphone-frozenbubble/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 02:27:20 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=46</guid>
		<description><![CDATA[My port of FrozenBubble to the iPhone has finally been approved, after about two weeks of waiting.  There were some interesting coding hoops to jump through, as this was a port of a javascript version which already worked in mobile Safari (thanks Glenn Hanson!), and I was converting it to run completely local/embedded in an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://frozenbubble.weebly.com/">My port of FrozenBubble to the iPhone</a> has finally been approved, after about two weeks of waiting.  There were some interesting coding hoops to jump through, as this was a port of a <a href="http://glenn.sanson.free.fr/v2/?select=fb">javascript version which already worked in mobile Safari</a> (thanks Glenn Hanson!), and I was converting it to run completely local/embedded in an AppStore application.</p>
<p>Had to hack the javascripts a bit to load everything from the same directory, as the bundle in iPhone apps seems to be flat.  Or it&#8217;s flat if you don&#8217;t unflatten it, or something.  No biggie.</p>
<p>Mobile Safari likes to have &#8220;bouncing&#8221; when you scroll past the end of a web page, even a short one, so gotta turn that off.  And gotta turn off the action menu if you hold your finger down.  And a few hacks to get sounds working.  Most of it came from <a href="http://www.codingventures.com/?p=31">http://www.codingventures.com/?p=31 </a>- thanks fellow iPhone hacker!</p>
<p>Lots of little tweaks to make it feel like a native app, like using the accelerometer for tilt-based aiming.  The animation isn&#8217;t the best, due to poor little iPhone&#8217;s javascript engine breathing hard, but it&#8217;s pretty darn good for what it is.  And fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2009/01/29/iphone-frozenbubble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefly eBook Now Available on the iPhone!</title>
		<link>http://bratton.com/index.php/2009/01/20/firefly-ebook-now-available-on-the-iphone/</link>
		<comments>http://bratton.com/index.php/2009/01/20/firefly-ebook-now-available-on-the-iphone/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 02:50:50 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=42</guid>
		<description><![CDATA[I&#8217;ve read a lot of books by Steven Brust, mostly his Vlad Taltos series.  I stumbled across his website at some point when I was in the midst of serious Firefly withdrawal, after having just finished watching all the TV episodes and then Serenity for a capper.  I had been searching for more Firefly stories [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read a lot of books by <a href="http://en.wikipedia.org/wiki/Steven_Brust">Steven Brust</a>, mostly his <a href="http://en.wikipedia.org/wiki/Vlad_Taltos">Vlad Taltos</a> series.  I stumbled across <a href="http://dreamcafe.com">his website</a> at some point when I was in the midst of serious <a href="http://en.wikipedia.org/wiki/Firefly_(TV_series)">Firefly</a> withdrawal, after having just finished watching all the TV episodes and then Serenity for a capper.  I had been searching for more Firefly stories to gobble up, and had found the graphic novels on Amazon (which seem to rock so far!) and found out that Steven Brust had written a novel in the Firefly universe.</p>
<p>I contacted Steven to see about making a free iPhone app version of his book, and he said to go for it.  I started by looking around for any open source ebook readers I could use as a base.  The best one seemed to be <a href="http://code.google.com/p/iphonetextreader/">iphonetextreader</a>, but like all the others I could find, it was made back before the SDK was available and used a bunch of unsupported API calls.  I downloaded it and tried to strip out all the unofficial calls, but it wasn&#8217;t looking good.</p>
<p>Time to start over.  What was I trying to do?  Get the book onto the iPhone.  <a href="http://www.lexcycle.com/">Stanza</a> is a free ebook reader on the iPhone, but their catalogs of ebooks aren&#8217;t open for adding new items.  Yes, you can find a somewhat hidden place to download from a URL, but typing in a URL by hand, and from memory (no copy &amp; paste on the iPhone), um, blows.</p>
<p>But hey!  Stanza, having been made by some smart folks, has a <a href="http://www.lexcycle.com/faq/linking_to_epub_files">protocol handler for doing direct downloads</a>!  All you need to do is make a stanza:// link to a &#8220;.epub&#8221; version of the book and it will fire up Stanza (assuming you click the link on your iPhone) and install it!  Sweet!  It took a few tries to get a reasonable looking epub version (I didn&#8217;t much like calibre, Stanza Desktop did alright for conversion) and that was it.</p>
<p>So that&#8217;s the punchline, <a href="stanza://bratton.com/freedom.epub">click here if you are on an iPhone and have Stanza installed</a>, and enjoy some Firefly goodness.  Steven will have it up on his website soon, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2009/01/20/firefly-ebook-now-available-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Invalid Binary Error &#8211; Fixed?</title>
		<link>http://bratton.com/index.php/2009/01/17/iphone-invalid-binary-error-fixed/</link>
		<comments>http://bratton.com/index.php/2009/01/17/iphone-invalid-binary-error-fixed/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 19:45:32 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=40</guid>
		<description><![CDATA[The dreaded binary error has bitten me&#8230;
&#8220;The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.&#8221;
Okay, in one case, it was actually valid, as I had been using an icon file that wasn&#8217;t named Icon.png and wasn&#8217;t 57&#215;57.  Thanks to Sean for helping me with [...]]]></description>
			<content:encoded><![CDATA[<p>The dreaded binary error has bitten me&#8230;</p>
<p>&#8220;The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.&#8221;</p>
<p>Okay, in one case, it was actually valid, as I had been using an icon file that wasn&#8217;t named Icon.png and wasn&#8217;t 57&#215;57.  Thanks to <a href="http://sourceitsoftware.blogspot.com/2008/11/iphone-dev-binary-you-uploaded-was.html">Sean</a> for helping me with that.</p>
<p>But today, it was totally bogus.  I made a trivial change for a resubmit of my PrivateWeb app, and the binary was rejected.  Clean the project &amp; rebuild, still hosed.  Restart XCode, still hosed.  Go to the finder and remove every folder from my project&#8217;s build directory and then build again &#8211; and it WORKED???  WTF?!</p>
<p>Ahem.  I&#8217;m glad it worked, but seriously&#8230;  There&#8217;s something buggy in XCode land.</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2009/01/17/iphone-invalid-binary-error-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone AppStore Open For Apps That Vibrate</title>
		<link>http://bratton.com/index.php/2008/12/30/iphone-appstore-open-for-apps-that-vibrate/</link>
		<comments>http://bratton.com/index.php/2008/12/30/iphone-appstore-open-for-apps-that-vibrate/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 02:49:46 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=38</guid>
		<description><![CDATA[After Apple started letting in fart apps recently, it was only a matter of time&#8230;   Flatulence was criteria 5 on the Unofficial App Store Rejection Criteria list.  With farting given the all-clear, I figured more of those criteria would start to open up.  And apparently vibration is now acceptable!
30 Second Massage is now in the [...]]]></description>
			<content:encoded><![CDATA[<p>After Apple started letting in fart apps recently, it was only a matter of time&#8230;   Flatulence was criteria 5 on the <a href="http://10base-t.com/unofficial-appstore-rejection-criteria/">Unofficial App Store Rejection Criteria</a> list.  With farting given the all-clear, I figured more of those criteria would start to open up.  And apparently vibration is now acceptable!</p>
<p><a href="http://massager.weebly.com/">30 Second Massage</a> is now in the AppStore.  It&#8217;s not searchable yet, but the <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300898110&amp;mt=8">direct link to it</a> works.  Game on!</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2008/12/30/iphone-appstore-open-for-apps-that-vibrate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle with Java &#8211; update your JDBC driver now!</title>
		<link>http://bratton.com/index.php/2008/12/07/oracle-with-java-update-your-jdbc-driver-now/</link>
		<comments>http://bratton.com/index.php/2008/12/07/oracle-with-java-update-your-jdbc-driver-now/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 00:38:52 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=32</guid>
		<description><![CDATA[Some quick testing with JMeter showed me that under some serious load on my webapp (100 Tomcat threads, 300 queries a second, some with multi-table joins), the Oracle 11 JDBC driver performs much better than the Oracle 9 JDBC driver, even against a 9i database.  This isn&#8217;t a set of benchmarking results, which I know [...]]]></description>
			<content:encoded><![CDATA[<p>Some quick testing with <a href="http://jakarta.apache.org/jmeter/">JMeter</a> showed me that under some serious load on my webapp (100 Tomcat threads, 300 queries a second, some with multi-table joins), the Oracle 11 JDBC driver performs much better than the Oracle 9 JDBC driver, even against a 9i database.  This isn&#8217;t a set of benchmarking results, which I know Oracle doesn&#8217;t like anyone to talk about, it&#8217;s just comparing old vs new Oracle drivers.</p>
<p>The takeaway, <a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/">go get an updated JDBC driver, now</a>!  Even if you&#8217;re running against Oracle 9i or 10g for the database, the new driver will give you a performance boost.  For free!</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2008/12/07/oracle-with-java-update-your-jdbc-driver-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TowerSmash for the iPhone</title>
		<link>http://bratton.com/index.php/2008/10/20/towersmash-for-the-iphone/</link>
		<comments>http://bratton.com/index.php/2008/10/20/towersmash-for-the-iphone/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 02:57:26 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=19</guid>
		<description><![CDATA[For a hobby project, my brother Alex and I wrote a game for little kids called TowerSmash.  I wanted to write a game, well really more of a toy, that was truly meant for little kids.  So  many &#8220;kid games&#8221; on the iPhone seem to have little buttons all over the place and levels that [...]]]></description>
			<content:encoded><![CDATA[<p>For a hobby project, <a href="http://www.linkedin.com/in/alexbratton">my brother Alex</a> and <a href="http://www.linkedin.com/in/erichbratton">I</a> wrote a game for little kids called <a href="http://brattonbrothers.com/towersmash/">TowerSmash</a>.  I wanted to write a game, well really more of a toy, that was truly meant for little kids.  So  many &#8220;kid games&#8221; on the iPhone seem to have little buttons all over the place and levels that load and things you can and can&#8217;t touch and scores and bleeps and then boom the game is over.  Um, did we have fun yet?</p>
<p>I wanted something that was open-ended, and that kids could just play with.  What sprang to mind was how all kids seem to endlessly ask grownups to build towers out of wooden blocks so that they can smash them down using cars or their hands or whatnot.  So that&#8217;s what we built.  A toy where it&#8217;s easy to create towers of blocks and watch them tumble if they&#8217;re not balanced, and then easy to throw shiny balls at the blocks to knock them off the table and off the screen.</p>
<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293910534&amp;mt=8">Get it from the AppStore &#8211; $1.99</a></p>
<p><a href="http://brattonbrothers.com/towersmash/"><img class="aligncenter" title="TowerSmash Screen Capture" src="http://brattonbrothers.com/towersmash/images/screen_shot.jpg" alt="" width="250" height="217" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2008/10/20/towersmash-for-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wide Finder 2 in Java</title>
		<link>http://bratton.com/index.php/2008/06/10/wide-finder-2-in-java/</link>
		<comments>http://bratton.com/index.php/2008/06/10/wide-finder-2-in-java/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 04:05:19 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bratton.com/?p=16</guid>
		<description><![CDATA[I wanted to give WF2 a decent shot in Java, to see how it compares to the funky OCaml / Scala / Ruby versions that other people were making.  It runs pretty well, about 15 minutes, and isn&#8217;t that complex.  Okay, I did make it a single class file just to be simpler, [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to give WF2 a decent shot in Java, to see how it compares to the funky OCaml / Scala / Ruby versions that other people were making.  It runs pretty well, about 15 minutes, and isn&#8217;t that complex.  Okay, I did make it a single class file just to be simpler, but OO purists won&#8217;t like it <img src='http://bratton.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   It&#8217;s a hack, a test, just to see how well it will run.</p>
<p>Notes from my big run with it&#8230;</p>
<p>nohup time ~bratton/jdk1.6.0_06/bin/java -d64 -XX:+UseConcMarkSweepGC -Xmx13000m -Xms13000m -cp . egb.MTNIOStats 40 128 /wf1/data/logs/O.all &gt; nohup.30T.128k.out &amp;</p>
<p>real    15:33.9<br />
user  6:02:50.9<br />
sys      8:36.0</p>
<p>Let&#8217;s see&#8230;</p>
<p>UseConcMarkSweepGC is a good thing.  UseParallelGC sounds like it would be good with lots of cores, but it kept killing the VM about 70% through.</p>
<p>I went with a gigantomous heap, just because <img src='http://bratton.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I don&#8217;t really need it all, but as the queues get bigger, it&#8217;s nice to have.  It probably would run fine with much, much less.</p>
<p>Java6 does much better than Java5.  I&#8217;m using a locally-installed version since the /usr version wasn&#8217;t working.  You need to unpack the 32bit sparc9 binaries first, then unpack the 64bit binaries on top of that.  Have to use -d64 to get a heap bigger than 3G.</p>
<p>The -server JIT flag didn&#8217;t make any difference in processing time for me.</p>
<p>Interestingly, NIO block read size didn&#8217;t matter that much from 32k up to 4M, and neither did the number of threads, whether 25, 30, 35, 40, 50, 60, or even 90.  Wacky!  Not too much overhead in terms of context switching&#8230;</p>
<p>My app design has a single thread doing all the IO, simple reads, and then it hands the ByteBuffers to a separate blocking queue for each worker thread, to avoid any lock overhead.  I think that&#8217;s probably irrelevant now, and that locking would be nanoseconds, so maybe I&#8217;ll redesign it, but it works fine.</p>
<p>My biggest problem is that my worker threads are for the most part waiting on IO to get more data to process.  And the reduce phase at the end is not very long, 64 seconds, and it&#8217;s actually single threaded for now because shrinking 64 seconds to 64/5 seconds isn&#8217;t going to drop me from 15 minutes to 7 minutes <img src='http://bratton.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>And okay, my results are off by .01% or something, but I haven&#8217;t re-run since I updated my parser to handle spaces in URLs.  Close enough for me, not close enough for some other WF2ers.  <img src='http://bratton.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   It all depends on your business domain what your accuracy needs to be.</p>
<p><a href="http://bratton.com/wp-content/uploads/2008/06/mtniostats.java">MTNIOStats</a>.java &#8211; file name capitalization may be munged &#8211; thanks WordPress! <img src='http://bratton.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2008/06/10/wide-finder-2-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Derby Data Corruption</title>
		<link>http://bratton.com/index.php/2007/11/12/apache-derby-data-corruption/</link>
		<comments>http://bratton.com/index.php/2007/11/12/apache-derby-data-corruption/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 02:44:08 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Fubario]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bratton.com/index.php/2007/11/12/apache-derby-data-corruption/</guid>
		<description><![CDATA[It saddens me to say, but after a year of fiddling with Apache Derby, working around its quirks, making a custom statement cache so that it&#8217;s not so frickin&#8217; slow, that it&#8217;s finally time to call it quits and move on to something else.
Data corruption&#8230; Over the past year, I have been using Derby as [...]]]></description>
			<content:encoded><![CDATA[<p>It saddens me to say, but after a year of fiddling with <a href="http://db.apache.org/derby/">Apache Derby</a>, working around its quirks, making a custom statement cache so that it&#8217;s not so frickin&#8217; slow, that it&#8217;s finally time to call it quits and move on to something else.</p>
<p>Data corruption&#8230; Over the past year, I have been using Derby as an embedded database inside of <a href="http://fubario.com">Fubario</a>.  I&#8217;ve been running it on Windows2000, WindowsXP, and OSX 10.4.  On all of these OSes, some are laptops, some are desktop machines on all the time, I&#8217;ve had varied data corruption scenarios occur, even under relatively little load.</p>
<p>I will admit, I haven&#8217;t done a good job keeping records of each kind of data corruption, probably because of foolish optimism that when a big point release of Derby came out it would have solved the problems with the prior version.  But alas, every release has had various things go wrong.  I&#8217;ve had entire databases corrupt so that Derby would refuse to startup, or even an interesting &#8220;poison table&#8221; corruption where everything was fine until I issue a query against a particular table that was corrupt, at which point Derby went out to lunch.</p>
<p>And when I say little load, I mean pretty much the databases were idling 24&#215;7, with maybe a few thousand rows in them.  And to think that I switched to Derby <strong>specifically to get more reliability</strong> than I had been having with <a href="http://hsqldb.org">hsqldb</a> or its <a href="http://www.h2database.com/">shiny new cousin h2</a>&#8230;</p>
<p>So where am I now?  I&#8217;ve built a custom flat-file store for Fubario for storing encrypted backup files.  It&#8217;s pretty simple, really, with a few key characteristics of secret sauce that make it perfect for Fubario and it&#8217;s really tiny in terms of amount of code, because it doesn&#8217;t have to do very much at all.  I&#8217;m also using h2 again for storing maybe tens of properties or something like that, miniscule really, probably could use properties in a flat file, but I&#8217;m just reusing the sql-driven classes that had been talking to Derby.</p>
<p>I&#8217;m done with the 20 second startup and shutdown times.</p>
<p>I&#8217;m done with these random and varied and all peculiar data corruption scenarios.</p>
<p>I&#8217;m done with foolish optimism?  Maybe.</p>
]]></content:encoded>
			<wfw:commentRss>http://bratton.com/index.php/2007/11/12/apache-derby-data-corruption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
