<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Fractions Of A Penny</title>
	
	<link>http://www.fractionsofapenny.com</link>
	<description>Some mundane details...</description>
	<lastBuildDate>Thu, 01 Apr 2010 00:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/FractionsOfAPenny" /><feedburner:info uri="fractionsofapenny" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>FractionsOfAPenny</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Python, DB2, and FOR BIT DATA Columns</title>
		<link>http://feedproxy.google.com/~r/FractionsOfAPenny/~3/zxIIm2ZCyMI/python-db2-and-for-bit-data-columns</link>
		<comments>http://www.fractionsofapenny.com/software-development/python-db2-and-for-bit-data-columns#comments</comments>
		<pubDate>Mon, 22 Mar 2010 02:17:30 +0000</pubDate>
		<dc:creator>Brandon Hornseth</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.fractionsofapenny.com/?p=232</guid>
		<description><![CDATA[I&#8217;ve been doing some research lately on how well various languages and web application frameworks integrate with IBM DB2 and happened across some less than ideal results. An errant strlen() call nearly killed the project before it ever got off the ground. As you&#8217;d expect, the DB2 drivers for Python and Ruby are written in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing some research lately on how well various languages and web application frameworks integrate with IBM DB2 and happened across some less than ideal results. An errant <code>strlen()</code> call nearly killed the project before it ever got off the ground.</p>
<p>As you&#8217;d expect, the DB2 drivers for <a title="Google Code: ibm-db" href="http://code.google.com/p/ibm-db/">Python</a> and <a title="RubyForge: Rails Adapter/Driver for IBM DataServers" href="http://rubyforge.org/projects/rubyibm/">Ruby</a> are written in C and compiled to modules for their respective language targets. What you might not expect is that DB2 has a <code>CHAR/VARCHAR</code> type modifier that makes it difficult, if not impossible to work out of the box with nearly every mainstream framework. It&#8217;s called <em>CHAR FOR BIT DATA</em>. <a href="http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/rrefsqlj57924.html">Here&#8217;s what IBM has to say about it</a>:</p>
<blockquote>
<div>A CHAR FOR BIT DATA type allows you to store byte strings of a specified length. It is useful for unstructured data where character strings are not appropriate.</div>
</blockquote>
<p>So, these basically take a string that looks like <code>'20100322014820681369000000'</code> and turns it into something like <code>' \x10\x03"\x01H h\x13i\x00\x00\x00'</code>. DB2 also includes a function called generate_unique() that, not surprisingly, generates IDs for these column types that are guaranteed unique across an entire database. Since the Python C API knows how to take a <a href="http://docs.python.org/c-api/string.html#PyString_FromString">byte array and turn them into a Python string</a>, everything should be good, right? Wrong.</p>
<p>What happens if you try to compress data for one of these columns, but it looks like <code>'20000000000000000000000000'</code> instead? You get this:</p>
<pre>&gt;&gt;&gt; from binascii import a2b_hex
&gt;&gt;&gt; a2b_hex('20000000000000000000000000')
' \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
</pre>
<p>That&#8217;s a lot of null bytes, but it&#8217;ll store in the database just fine. Retrieving that from the database, however, has some unexpected results: <strong>Python only gives you one of the 26 characters you stored</strong>.  Turns out the driver does <a href="http://code.google.com/p/ibm-db/source/browse/trunk/IBM_DB/ibm_db/ibm_db.c#6567">a strlen on the binary data</a> sent from the database engine, which sees a null byte and treats it as a string terminator, truncating your data.</p>
<p>The good news is <a href="http://code.google.com/p/ibm-db/issues/detail?id=46">the fix</a> was trivial once a convention was agreed upon. The group responsible for the Ruby driver also <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=27954&amp;group_id=2361&amp;atid=9175">picked up the fix</a> and will be releasing a comparable patch it in the near future. Big thanks to both groups for helping us get over a substantial hurdle.</p>
<p><strong>Update (3/31/2010): </strong>The devs for the Python ibm_db project have <a href="http://pypi.python.org/pypi/ibm_db/1.0.1">released a new version</a> that includes the fix mentioned above. I finally got around to testing the change, and it looks to have solved our problem. Hopefully the Ruby driver is corrected upstream as well shortly.</p>
<img src="http://feeds.feedburner.com/~r/FractionsOfAPenny/~4/zxIIm2ZCyMI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fractionsofapenny.com/software-development/python-db2-and-for-bit-data-columns/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fractionsofapenny.com/software-development/python-db2-and-for-bit-data-columns</feedburner:origLink></item>
		<item>
		<title>How easy is the process?</title>
		<link>http://feedproxy.google.com/~r/FractionsOfAPenny/~3/v7WTEjh0cYY/how-easy-is-the-process</link>
		<comments>http://www.fractionsofapenny.com/software-development/how-easy-is-the-process#comments</comments>
		<pubDate>Tue, 12 Jan 2010 03:09:45 +0000</pubDate>
		<dc:creator>Brandon Hornseth</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[web-development]]></category>

		<guid isPermaLink="false">http://www.fractionsofapenny.com/?p=213</guid>
		<description><![CDATA[I was doing a bit of catching up in my feed reader today, and one of the latest 37signals posts caught my attention. The post was simple enough, but it was this comment in response to a few other posters that really nailed it: Who cares about how you do it. That’s just techniques.No matter [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing a bit of catching up in my feed reader today, and <a href="http://37signals.com/svn/posts/2097-you-dont-really-know-if-your-templates-and">one of the latest 37signals posts</a> caught my attention. The post was simple enough, but it was this comment in response to a few other posters that really nailed it:</p>
<blockquote>
<div>
<p>Who cares about how you do it. That’s just techniques.No matter how you devide[sic] it up into templates and scripts, if the site changes, you have to make those changes. How easy is that process?? That is the question.</p>
</div>
</blockquote>
<p>Apologies for taking that somewhat out of context to prove a point.</p>
<p>If your software maintenance is painful or <a href="http://www.fractionsofapenny.com/software-development/boredom-driven-development">leaves you feeling apprehensive</a>, you need to figure out why it&#8217;s that way and go after the core of the problem. It only gets worse the longer you ignore it.</p>
<img src="http://feeds.feedburner.com/~r/FractionsOfAPenny/~4/v7WTEjh0cYY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fractionsofapenny.com/software-development/how-easy-is-the-process/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fractionsofapenny.com/software-development/how-easy-is-the-process</feedburner:origLink></item>
		<item>
		<title>Firebug 1.4 Activation Model</title>
		<link>http://feedproxy.google.com/~r/FractionsOfAPenny/~3/CWTpOP-8A9g/firebug-1-4-activation-model</link>
		<comments>http://www.fractionsofapenny.com/uncategorized/firebug-1-4-activation-model#comments</comments>
		<pubDate>Sat, 09 Jan 2010 01:59:37 +0000</pubDate>
		<dc:creator>Brandon Hornseth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[web-development]]></category>

		<guid isPermaLink="false">http://www.fractionsofapenny.com/?p=198</guid>
		<description><![CDATA[I use Gentoo Linux with KDE for my development box at my day job. Gentoo is pretty good about keeping their package repository as close to matching what&#8217;s stable upstream as they can, but Firefox 3.5.x took a good long while to be marked stable and consequently, I was running Firebug 1.3 until just recently. [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.gentoo.org/">Gentoo Linux</a> with KDE for my development box at my day job. Gentoo is pretty good about keeping their package repository as close to matching what&#8217;s stable upstream as they can, but Firefox 3.5.x took a good long while to be marked stable and consequently, I was running Firebug 1.3 until just recently.</p>
<p>Upon upgrading, I spent a couple days being pretty annoyed by it&#8217;s new <a href="http://blog.getfirebug.com/2009/03/25/firebug-14-auto-suspend-and-simplified-activation/">&#8220;simplified&#8221; activation model</a>.  Each dev has a subdomain for a development site, but our issue tracker and wiki is also on a subdomain causing firebug to automatically activate itself for the wiki or tracker anytime I had activated it for a development site. My google-fu must have been weak because I couldn&#8217;t find a good solution to the problem. Only frustrated people.</p>
<p>I stumbled upon the answer today: <strong><em>Activate Same Origin URLs</em></strong> under Tools &gt; Firebug &gt; Options. Unchecking it restored my sanity.</p>
<p style="text-align: center;"><a href="http://www.fractionsofapenny.com/wp-content/uploads/2010/01/firebug-settings.jpg"><img class="size-medium wp-image-199 aligncenter" title="Firebug Settings" src="http://www.fractionsofapenny.com/wp-content/uploads/2010/01/firebug-settings-300x206.jpg" alt="" width="300" height="206" /></a></p>
<img src="http://feeds.feedburner.com/~r/FractionsOfAPenny/~4/CWTpOP-8A9g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fractionsofapenny.com/uncategorized/firebug-1-4-activation-model/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.fractionsofapenny.com/uncategorized/firebug-1-4-activation-model</feedburner:origLink></item>
		<item>
		<title>Making It Work Is Only Part of the Project</title>
		<link>http://feedproxy.google.com/~r/FractionsOfAPenny/~3/zpNRCNH8wfI/making-it-work-is-only-part-of-the-project</link>
		<comments>http://www.fractionsofapenny.com/software-development/making-it-work-is-only-part-of-the-project#comments</comments>
		<pubDate>Fri, 20 Nov 2009 01:44:10 +0000</pubDate>
		<dc:creator>Brandon Hornseth</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.fractionsofapenny.com/?p=191</guid>
		<description><![CDATA[I&#8217;ve been slowly working my way through Coders At Work the last few weeks. So far, it&#8217;s been a great read. Seibel did an excellent job leading the conversations, and the peek into the minds of high profile coders and the evolution they&#8217;ve undergone has been beyond intriguing. This quote from Joshua Bloch really struck [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slowly working my way through <a title="Amazon: Coders At Work (Seibel)" href="http://www.amazon.com/Coders-at-Work-Peter-Seibel/dp/1430219483"><em>Coders At Work</em></a> the last few weeks. So far, it&#8217;s been a great read. Seibel did an excellent job leading the conversations, and the peek into the minds of high profile coders and the evolution they&#8217;ve undergone has been beyond intriguing. This quote from Joshua Bloch really struck a chord with me tonight:</p>
<blockquote><p>The older I get, the more I realize it isn&#8217;t just about making it work; it&#8217;s about producing an artifact that is readable, maintainable, and efficient.</p></blockquote>
<p>I couldn&#8217;t agree more. Except for the &#8216;older&#8217; part. I&#8217;m not that old yet.</p>
<p>My experience with software development in the wild thus far points to the same sentiment. Personal projects tend to be thrown together quite often. Mine are certainly no exception. What I&#8217;ve found interesting, however, is that the projects (even small ones going back to my college days) where I&#8217;ve put in a little extra effort to better organize my code have proven much, much quicker to change down the road.</p>
<p>Of course, there has to be a balance. Code is worthless if it&#8217;s never shipped. The flip side is that it&#8217;s not worth a whole heck of a lot if it easily change over time to change with the business requirements.</p>
<p>Here&#8217;s a test: Find some code written by someone else in a module that you aren&#8217;t familiar with. How long does it take you to understand the purpose of that code? If it&#8217;s more than a couple minutes, take that into consideration the next time you&#8217;re hacking away on a project, even if just to write better comments. *Guaranteed* someone will appreciate the extra effort down the road.</p>
<img src="http://feeds.feedburner.com/~r/FractionsOfAPenny/~4/zpNRCNH8wfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fractionsofapenny.com/software-development/making-it-work-is-only-part-of-the-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fractionsofapenny.com/software-development/making-it-work-is-only-part-of-the-project</feedburner:origLink></item>
		<item>
		<title>Are aUnit frameworks on the horizon?</title>
		<link>http://feedproxy.google.com/~r/FractionsOfAPenny/~3/b7Hta0TIS0A/are-aunit-frameworks-on-the-horizon</link>
		<comments>http://www.fractionsofapenny.com/software-development/are-aunit-frameworks-on-the-horizon#comments</comments>
		<pubDate>Fri, 16 Oct 2009 03:01:35 +0000</pubDate>
		<dc:creator>Brandon Hornseth</dc:creator>
				<category><![CDATA[Quality]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.fractionsofapenny.com/?p=182</guid>
		<description><![CDATA[Something that&#8217;s been rolling around in the back of my mind for some time is the term aUnit Framework. A lot of developers are familiar with xUnit family, as least by name if nothing else. If not, I highly recommend reading Martin Fowler&#8217;s xUnit history writeup. &#8220;aUnit&#8221; is not the greatest title, but neither was [...]]]></description>
			<content:encoded><![CDATA[<p>Something that&#8217;s been rolling around in the back of my mind for some time is the term <em><strong><span title="short for 'Ajax-Unit'">aUnit</span></strong></em> <em><strong> Framework</strong></em>. A lot of developers are familiar with xUnit family, as least by name if nothing else. If not, I highly recommend reading <a href="http://www.martinfowler.com/bliki/Xunit.html">Martin Fowler&#8217;s xUnit history writeup</a>. &#8220;aUnit&#8221; is not the greatest title, but neither was Microsoft Bob if you ask me.</p>
<p>I say it&#8217;s a poor choice of names because I&#8217;m not talking about unit-tests in the traditional sense. The web development community needs a well-designed tool crafted around the constructs that the modern-day web is fashioned from. Selenium is quite powerful, but my experience has been that it&#8217;s a royal pain to make any but the simplest tests tolerant of response delays with Ajax calls. In the pure Unit Testing world, <a href="http://developer.yahoo.com/yui/3/test/">YUI Test</a> and my personal favorite, <a href="http://docs.jquery.com/QUnit">QUnit</a> are excellent for running suites against strictly client-side code, and are capable of wrapping tests around Ajax calls, but there isn&#8217;t a clean way to tie those into any kind of continuous integration build.</p>
<p>Looking around StackOverflow and the various feeds I subscribe to from other developers, I see a huge desire for something that <em>just works</em> without an undue amount of pain and suffering.</p>
<img src="http://feeds.feedburner.com/~r/FractionsOfAPenny/~4/b7Hta0TIS0A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fractionsofapenny.com/software-development/are-aunit-frameworks-on-the-horizon/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fractionsofapenny.com/software-development/are-aunit-frameworks-on-the-horizon</feedburner:origLink></item>
	</channel>
</rss>
