<?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>WriteStreams of Consciousness</title>
	<atom:link href="http://derekwilliams.us/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://derekwilliams.us</link>
	<description>Derek Williams</description>
	<lastBuildDate>Sat, 04 Sep 2010 01:03:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Third Time&#8217;s a Charm</title>
		<link>http://derekwilliams.us/?p=3097</link>
		<comments>http://derekwilliams.us/?p=3097#comments</comments>
		<pubDate>Sat, 04 Sep 2010 01:03:19 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Infosec]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Hashing]]></category>
		<category><![CDATA[SHA]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=3097</guid>
		<description><![CDATA[Reality is firmly rooted: we don&#8217;t quite yet have quantum computers, nor have we really proven that P != NP.  Yet while cracking most modern encryption and hash algorithms falls into the &#8220;not impossible, just highly improbable&#8221; category, academic weaknesses do get attention.  So much so that the old SHA-1 and MD5 hashing mainstays are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/538/"><img class="alignright size-medium wp-image-3104" title="encryption" src="http://derekwilliams.us/wp-content/uploads/2010/09/encryption-300x183.jpg" alt="" width="300" height="183" /></a>Reality is firmly rooted: we don&#8217;t <a title="One More Step on the Path to Quantum Computers" href="http://thefutureofthings.com/news/10233/one-more-step-on-the-path-to-quantum-computers.html?addComment" target="_blank">quite</a> yet have quantum computers, nor have we <a title="Eight Signs A Claimed P is not NP Proof Is Wrong" href="http://www.technologyreview.com/blog/post.aspx?bid=349&amp;bpid=25616" target="_blank">really proven</a> that P != NP.  Yet while cracking most modern encryption and hash algorithms falls into the<em> &#8220;not impossible, just highly improbable&#8221; </em>category, <a title="The Tiny Encryption Algorithm (TEA) - Discusses academic weaknesses" href="http://derekwilliams.us/docs/CPSC-6128-TEA-Encryption.pdf" target="_blank">academic weaknesses</a> do get attention.  So much so that the old SHA-1 and MD5 hashing mainstays are <a title="PCI DSS 3.4 and Secure Hashing" href="http://securitim.blogspot.com/2009/11/pci-dss-34-and-secure-hashing.html" target="_blank">no longer considered acceptable</a>.  Soon enough, SHA-2 will also be as uncool as a <a title="RickRoll'D" href="http://www.youtube.com/watch?v=oHg5SJYRHA0" target="_blank">rickroll</a>.</p>
<p>Just in the nick of time, the NIST is narrowing the list of candidates for the <a title="SHA-3 Cryptographic Hash Algorithm Competition" href="http://csrc.nist.gov/groups/ST/hash/sha-3/index.html" target="_blank">new SHA-3 algorithm</a>.  The <a title="The Second SHA-3 Candidate Conference" href="http://csrc.nist.gov/groups/ST/hash/sha-3/Round2/Aug2010/index.html" target="_blank">second round</a> just finished, and it&#8217;s down to <a title="The SHA-3 Zoo" href="http://ehash.iaik.tugraz.at/wiki/The_SHA-3_Zoo" target="_blank">14 candidates</a>, with the winner to be chosen before the Aztec calendar ends in 2012.  It should be a good contest, as long as FIFA referees aren&#8217;t involved.</p>
<p>This is exciting stuff, and I&#8217;m sure you&#8217;ll want to play along.  Just use your jailbroken, <a title="Kraken - Quickly decrypting cell phone calls" href="http://www.h-online.com/security/news/item/Quickly-decrypting-cell-phone-calls-1048850.html" target="_blank">Kraken</a>-<a title="Kraken - A5/1 Cracking" href="http://reflextor.com/trac/a51/wiki" target="_blank">proofed</a> cell phone to text your favorite to 2600.  I&#8217;m pulling for <a title="The Skein Hash Function Family" href="http://www.schneier.com/skein.html" target="_blank">Skein</a>, mainly because of the cool name and celebrity status.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=3097</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going to Xtreams</title>
		<link>http://derekwilliams.us/?p=1411</link>
		<comments>http://derekwilliams.us/?p=1411#comments</comments>
		<pubDate>Wed, 01 Sep 2010 01:54:02 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Streams]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=1411</guid>
		<description><![CDATA[Perhaps a blog named &#8220;WriteStreams of Consciousness&#8221; has an implied obligation to cover I/O streams.  And since streams are among the most essential programming building blocks, I&#8217;m always interested in better mousetraps there.
Smalltalk is home to perhaps the first truly elegant streams implementation, particularly when compared to other approaches developed around that time, such as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/01/kayak5.jpg"><img class="alignright size-medium wp-image-54" title="kayak5" src="http://derekwilliams.us/wp-content/uploads/2010/01/kayak5-300x234.jpg" alt="" width="126" height="98" /></a>Perhaps a blog named &#8220;<em>WriteStreams </em>of Consciousness&#8221; has an implied obligation to cover I/O streams.  And since streams are among the most essential programming building blocks, I&#8217;m always interested in better mousetraps there.</p>
<p>Smalltalk is home to perhaps the first truly elegant streams implementation, particularly when compared to other approaches developed around that time, such as those in C and C++.  You can&#8217;t get much simpler than <em>&#8216;myfile.txt&#8217; asFilename readStream contents</em> to open and read a file, and yet there&#8217;s significant power in the classes behind that.  But new designs for stream libraries since followed, including pluggable/chainable I/O stream architectures, such as those found in Java, C#, and even advanced parallel <em>stream processing</em> frameworks.</p>
<p>Not to be outdone, Michael Lucas-Smith and Martin Kobetic have recently developed a new pluggable stream framework for Smalltalk called <a title="Xtreams - Google Code project page" href="http://code.google.com/p/xtreams/" target="_blank">Xtreams</a>, and I couldn&#8217;t resist giving it a try.  In the authors&#8217; own words,</p>
<p style="padding-left: 30px; text-align: center;"><em>Xtreams is an abstract producer/consumer pipeline over arbitrary source and destination types&#8230; you get a unified API for accessing files, sockets, pipes, strings, collections and many many other kinds of things.</em></p>
<p>It&#8217;s a <a title="Xtreams - Google Code project page" href="http://code.google.com/p/xtreams/" target="_blank">Google Code</a> project, but the code is in the Cincom Public Repository: just three mouse clicks away after downloading and starting <a title="VisualWorks NC Download" href="http://www.cincomsmalltalk.com/main/developer-community/non-commercial/non-commercial-download/" target="_blank">VisualWorks</a>.  It consists of several packages as described on the project page, along with SUnit test cases.  I loaded the base set of packages and walked through the examples in Michael&#8217;s basic <a title="Xtreams Primer" href="http://www.cincomsmalltalk.com/userblogs/mls/blogView?entry=3444748622" target="_blank">primer</a> and in the various package comments, while reading the wiki documentation.</p>
<p>Immediately, I found the basic API improvements (over conventional streams) refreshing.  But the real beauty lies in &#8220;stacking&#8221; streams, collections, and even block closures.  For example, this stacks an encoding stream atop a write stream atop a byte array to convert your string to UTF-8 encoded bytes:</p>
<p style="padding-left: 30px;">(ByteArray new writing encoding: #utf8) write: &#8216;Hello&#8217;; conclusion</p>
<p>Or, to do Base-64 encoding (for sending binary data as text):</p>
<p style="padding-left: 30px;">String new writing encodingBase64 write: myBytes</p>
<p>For arbitrary transformations, you can provide your own <em>transforming:</em> block, as in this example:</p>
<p style="padding-left: 30px;">&#8220;Multiply each pair of input elements together and return the result&#8221;<br />
((Array withAll: (1 to: 20)) reading transforming: [ :in : out | out put: in get * in get ]) rest</p>
<p>And why limit ourselves to strings and arrays on the inside (as <em>terminals</em>)?  Here&#8217;s streaming over a collection:</p>
<p style="padding-left: 30px;">(1 to: 10000) reading ++ 1000; read: 5</p>
<p>&#8230; and a block closure:</p>
<p style="padding-left: 30px;">| a b | a := 0. b := 1.   &#8220;Fibonacci&#8221;<br />
[ | x | x := a. a := b. b := x + a. x ] reading read: 20</p>
<p>Stacking sources, terminals, and transforms: it&#8217;s nearly as much fun as the <em>Mousetrap </em>or <em>Incredible Machine </em>games, but without the Rube Goldberg chunkiness.</p>
<p>I only scratched the surface in playing around, but it&#8217;s a nice package, which is being further refined and extended.  If you&#8217;re a VisualWorks Smalltalker, give it a try.</p>
<p>While Smalltalk is an important <a title="Pharo" href="http://pharo-project.org/home" target="_blank">incubator</a> <a title="Croquet" href="http://www.opencroquet.org/index.php/Main_Page" target="_blank">for</a> <a title="Seaside Web Framework" href="http://www.seaside.st/" target="_blank">significant</a> <a title="OLPC - Smalltalk" href="http://wiki.laptop.org/go/Smalltalk" target="_blank">technology</a> <a title="Ruby" href="http://www.ruby-lang.org/en/" target="_blank">innovation</a>, it&#8217;s certainly not a &#8220;by the masses&#8221; language.  So if you&#8217;re hesitant to jump into a Smalltalk image and code away, just read the <a title="Xtreams - Google Code project page" href="http://code.google.com/p/xtreams/" target="_blank">summary</a> of what Xtreams does and ask, &#8220;can my streams framework do that?&#8221;  Hopefully we&#8217;ll soon see this kind of power and design elegance in other languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=1411</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Operation Liberate</title>
		<link>http://derekwilliams.us/?p=3053</link>
		<comments>http://derekwilliams.us/?p=3053#comments</comments>
		<pubDate>Mon, 30 Aug 2010 23:35:12 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Biblical worldview]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=3053</guid>
		<description><![CDATA[Operation Liberate is a project of SOF Ministries working to end the horrible problem of child sex slavery in Latin America.  Their initial focus is on Costa Rica, where approximately 10,000 children are exploited at any one time.
I attended a reception last night to hear more about this ministry from some of its board members.  [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Operation Liberate" href="http://www.operationliberate.com/html/Index.html" target="_blank"></a><a href="http://www.operationliberate.com"><img class="alignright size-full wp-image-3059" title="costarica" src="http://derekwilliams.us/wp-content/uploads/2010/08/costarica.jpg" alt="" width="167" height="125" /></a>Operation Liberate is a project of SOF Ministries working to end the horrible problem of child sex slavery in Latin America.  Their initial focus is on Costa Rica, where approximately 10,000 children are exploited at any one time.</p>
<p>I attended a reception last night to hear more about this ministry from some of its board members.  It was at once jolting, eye-opening, and encouraging.</p>
<p>If you&#8217;ve seen the movie <a title="Taken" href="http://en.wikipedia.org/wiki/Taken_(film)" target="_blank">Taken</a>, you get a sense of the anger one feels toward these slavers and traffickers (Matthew 18:6 comes to mind).  However, unlike that movie, there are no powerful families behind these children to come to the rescue.  They need us.</p>
<p>Operation Liberate has a carefully-developed plan to end this problem.  I commend to your their <a title="Operation Liberate" href="http://www.operationliberate.com" target="_blank">web site</a> &#8211; to learn more about the problem and how you can help.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=3053</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DB2fer</title>
		<link>http://derekwilliams.us/?p=2963</link>
		<comments>http://derekwilliams.us/?p=2963#comments</comments>
		<pubDate>Sat, 28 Aug 2010 00:50:13 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2963</guid>
		<description><![CDATA[Code page issues have become unexpectedly common now that recent versions of DB2 LUW default to UTF-8 / 1208 for XML data type support.  In recent days, two separate projects hit errors like the following:
SQL0302N The value of a host variable in the EXECUTE or OPEN statement is out of range for its corresponding use.
The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/08/twofer.jpg"><img class="alignright size-full wp-image-3008" title="twofer" src="http://derekwilliams.us/wp-content/uploads/2010/08/twofer.jpg" alt="" width="174" height="129" /></a>Code page issues have become unexpectedly common now that recent versions of DB2 LUW default to UTF-8 / 1208 for XML data type support.  In recent days, two separate projects hit errors like the following:</p>
<p style="padding-left: 30px;">SQL0302N The value of a host variable in the EXECUTE or OPEN statement is out of range for its corresponding use.</p>
<p>The root cause was that, with code page 1208, certain extended ASCII values were each converted from one byte to two: &#8220;two bytes for the price of one.&#8221;  This stretching data overflowed columns sized to expect one byte per character.</p>
<p>So if you get SQL0302 or similar errors, you can easily check the code page with: <em>get db cfg for DBNAME | grep -i code</em> (or g<em>et db cfg for DBNAME | find /i &#8220;code&#8221;</em>).  The quick fix is to specify a code page like 1252 during database creation: <em>create database DBNAME using codeset ibm-1252 territory us</em>.  I do not recommend changing  the <em>db2codepage </em>registry variable for this problem.</p>
<p>However, code page 1252  prevents you from using XML data types.  So if this is an issue, there are at least two other options:</p>
<div id="_mcePaste">
<ul>
<li>If the data you&#8217;re storing is really binary data, define the column with <em>for bit data</em>.  No codepage conversion will occur, and the data will typically come back to your application as raw bytes, not encoded strings.</li>
<li>Expand the size of the column to accommodate some &#8220;two for one&#8221; conversions.  Only a few extended ASCII characters get this conversion, but unless you go at least twice as large, this becomes a managed risk of how many of these you’ll get.</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2963</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where Was I?</title>
		<link>http://derekwilliams.us/?p=2956</link>
		<comments>http://derekwilliams.us/?p=2956#comments</comments>
		<pubDate>Fri, 27 Aug 2010 01:26:57 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2956</guid>
		<description><![CDATA[I hate meta-posts (things like blogging about blogging).  Here comes one anyway.
A few astute readers noticed the sound of silence here: that I neglected this blog for a month now.
Where was I?
In a word: soccer.  Club soccer is in full swing now for my two L kids, with practices four nights a week, team manager [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/08/where.jpg"><img class="size-full wp-image-2975 alignright" title="where" src="http://derekwilliams.us/wp-content/uploads/2010/08/where.jpg" alt="" width="182" height="114" /></a>I hate meta-posts (things like blogging about blogging).  Here comes one anyway.</p>
<p>A few astute readers noticed the sound of silence here: that I neglected this blog for a month now.</p>
<p><em><strong>Where </strong></em>was I?</p>
<p>In a word: <em>soccer</em>.  Club soccer is in full swing now for my two <em>L</em> kids, with practices four nights a week, team manager duties, and pre-season tournaments every weekend (gone are the good old days when August was still a <em>summer break</em> month).  Family activities and summer reading filled the remaining free hours nicely.  Blog-worthy things continued to happen, but lost was the time in the evenings and weekends to distill and post them.</p>
<p>Where <em><strong>was </strong></em>I?</p>
<p>As I recall, this blog is at least partly <a title="About" href="http://derekwilliams.us/?page_id=2" target="_blank">about</a> technical problems I encounter and solutions.  Yet absence makes the heart grow forgetful, especially against the backdrop of a (justified) social media pendulum swing.  Leo Laporte&#8217;s twitter feed stopped working and <a title="Leo Laporte - Buzz Kill" href="http://leoville.com/buzz-kill" target="_blank">no-one noticed</a>.  Frank Ryan drove off a cliff <a title="Frank Ryan Texting Before Fatal Crash" href="http://abcnews.go.com/Entertainment/heidi-montag-plastic-surgeon-frank-ryan-texting-car/story?id=11427497" target="_blank">tweeting while driving</a>.  Matt Richtel&#8217;s <a title="Digital Overload: Your Brain On Gadgets" href="http://www.npr.org/templates/story/story.php?storyId=129384107" target="_blank">head hurts</a>.  And I didn&#8217;t feel so good (about social media) myself.</p>
<p>Many questions answer themselves just by being asked.  Does the entire intertube and <a title="Library of Congress plan for Twitter: a big, permanent retweet" href="http://www.washingtonpost.com/wp-dyn/content/article/2010/04/15/AR2010041505752.html" target="_blank">Library of Congress</a> need to know what I&#8217;m having for dinner?  Ya&#8217; think?  I quickly abandoned Twitter and cut back my Facebook posts because of my low signal-to-noise ratio.  Perhaps it&#8217;s just that, in <a title="Proverbs 10:19" href="http://www.biblegateway.com/passage/?search=Proverbs+10:19" target="_blank">Proverbs 10:19</a> fashion, as we get older, we &#8220;edit ourselves&#8221; more (yes, knowledge speaks, wisdom listens).  But, taken in proper measure, there is value in the &#8220;reality web.&#8221;</p>
<p>For example, I learn about cool things done by far-flung friends.  I get meaningful technology details that never make it to those one page summaries on corporate sites or in glossy print.  Even subtle, simple things like Garmin streams from fellow runners provide balance and motivation.  And when googling for references and fixes, the best ones now typically come from blogs.  Who needs you, <a title="Experts Exchange" href="http://www.experts-exchange.com/" target="_blank">Experts Exchange</a>?</p>
<p>Perhaps it&#8217;s that debt of gratitude that motivates most.  After gleaning so much helpful information from other blogs and streams, justice demands giving back a little.  And the emails I get in response to even the most unlikely posts help.  So I continue, knowing that WriteStreams sometimes <em>are </em>read.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2956</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Etowah River Run</title>
		<link>http://derekwilliams.us/?p=2917</link>
		<comments>http://derekwilliams.us/?p=2917#comments</comments>
		<pubDate>Sun, 25 Jul 2010 03:14:55 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Running]]></category>
		<category><![CDATA[Etowah River Run]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2917</guid>
		<description><![CDATA[Today&#8217;s Etowah River Run was a hot and humid affair.  I chuckled as I read the weather report on my Droid near race time.  80 degrees and 87% humidity seemed right, but it was the NWS Heat Advisory that caught my attention: &#8220;stay in an air-conditioned room and stay out of direct sunshine.&#8221;  Seemed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/07/lydia-etowah-river-run1.jpg"><img class="size-full wp-image-2923 alignright" title="lydia-etowah-river-run" src="http://derekwilliams.us/wp-content/uploads/2010/07/lydia-etowah-river-run1.jpg" alt="" width="117" height="142" /></a>Today&#8217;s <a title="Etowah River Run" href="http://www.active.com/running/canton-ga/etowah-river-run-road-and-trail-5k-2010" target="_blank">Etowah River Run</a> was a hot and humid affair.  I chuckled as I read the weather report on my Droid near race time.  80 degrees and 87% humidity seemed right, but it was the NWS Heat Advisory that caught my attention: <em>&#8220;stay in an air-conditioned room and stay out of direct sunshine.&#8221; </em> Seemed as good a time as any to run a 5K!</p>
<p>We got a quick perspective check, though, as backpack-clad 24-hour racers from the nearby <a title="YMCA Gold Run 24" href="http://www.ymcaatlanta.org/branches/coy-cherokee_outdoor_ymca/programs/default.asp?id=210" target="_blank">Gold Rush 24 Adventure</a> came running by just before the start of the 5K.  We 5K&#8217;ers cheered them on heartily: cheers of encouragement, and of celebration that we would be done 50 times sooner.</p>
<p>Yet the course was flat and fast, the race is for a good cause, and it has become quite a tradition around Canton.  Turnout was good in spite of the heat, as this is race gets good participation from local cross-country teams (it falls in the training season, just before Saturday meets begin).  This was the second year that Lydia and I ran it, so we knew what to expect.</p>
<p>The one twist to this course is that the first mile is the fast one, with a long downhill.  This means it takes longer to &#8220;thin out&#8221; the crowds, and runners don&#8217;t fall into position until after mile 1.  A lot of folks let that pull them into too fast a pace and end up paying for it in the last half.  I reminded Lydia beforehand not to do that; she managed her pace well, and was strong at the finish.  And what an exciting finish!</p>
<p>After I was done, I stayed near the finish line and watched for Lydia.  As the timer cleared 27 minutes, I walked over and checked the card baskets.  There was nothing yet in the under 10 girls basket, so I knew if Lydia finished at her usual pace, she could grab a first place age group award.  I soon saw her running in, looking great, in first place!  About 20 yards behind her was a girl about her age gaining on her.  She overtook Lydia, and Lydia kicked into a faster sprint and passed her again.  It went back and forth until they passed the finish line side by side, shoulder to shoulder.  It was a dead tie as far as I can tell.  But, while in the chute, the girl grabbed a place card first, which put her in first and Lydia in second.  Lydia was a bit disappointed, but it was the most exciting finish in the race (yes, I&#8217;m a bit biased).</p>
<p>Officially, Lydia placed second at around 29:20.  I ran it in 24:35, and was happy enough to run a sub-8 5K while under a heat advisory.</p>
<p>After Lydia collected her award, we prepared to leave, but she then asked to stay for more door prizes.  Great suggestion!  I had forgotten how good and plentiful the prizes were at this race. Lydia won a $25 Walmart card, and I won a $50 Phidippides card.  And the race T-shirt is a good one.  It&#8217;s cotton, not technical, but it&#8217;s a nice design and an improvement over previous years.</p>
<p>Overall, it was a great morning, and we&#8217;ll run it again next year.  Surely, it will be cooler.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2917</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Painted into a Corner</title>
		<link>http://derekwilliams.us/?p=2900</link>
		<comments>http://derekwilliams.us/?p=2900#comments</comments>
		<pubDate>Sat, 24 Jul 2010 01:45:56 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[DB2 9.7]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2900</guid>
		<description><![CDATA[I&#8217;ve had such good success with DB2 9.7 LUW  under 64-bit Linux that I didn&#8217;t hesitate to install it on my new development laptop (Windows XP 32-bit, the corp-rat standard).  I immediately upgraded to Fix Pack 2, of course: never install fix level zero of anything.  I created and loaded a few databases and was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/07/corner1.jpg"><img class="alignright size-full wp-image-2901" title="corner" src="http://derekwilliams.us/wp-content/uploads/2010/07/corner1.jpg" alt="" width="180" height="132" /></a>I&#8217;ve had such good success with DB2 9.7 LUW  under <a title="Just Add  Water" href="http://derekwilliams.us/?p=507" target="_blank">64-bit Linux</a> that I didn&#8217;t hesitate to install it on my new development laptop (Windows XP 32-bit, the corp-rat standard).  I immediately upgraded to <a title="DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows" href="http://www-01.ibm.com/support/docview.wss?rs=71&amp;uid=swg24026928" target="_blank">Fix Pack 2</a>, of course: never install fix level zero of anything.  I created and loaded a few databases and was on my way.</p>
<p>But it didn&#8217;t take long to notice some very bad behaviors.  I saw  frequent CPU, memory, and I/O spikes, mostly in <em>db2syscs</em> and <em>db2dasstm. </em>On two  occasions, all database operations froze without recovering, and <em>db2syscs </em>suddenly  became a diehard: I couldn&#8217;t kill it from the <em>Service  Control Panel</em>,  <em>Task Manager</em>, or even <em>pskill</em>.  Windows  shutdown then froze, requiring a hard power off.</p>
<p>This sent me on a fact-finding mission.  First stops: the Windows <em>Event   Viewer </em>and <em>db2diag.log</em>.  Since I had not changed <em>diagpath</em>,   I had to remind myself that instance information files are no longer   under <em>SQLLIB </em>(with Windows, they&#8217;re now under <em>Documents and   Settings\All Users\Application Data\IBM\DB2</em>). I spotted a huge and   growing <em>db2diag.log, </em>at <em>diaglevel </em>3.  It was flooded with messages like:</p>
<p>&nbsp;</p>
<div id="_mcePaste" style="padding-left: 30px;">2010-07-23-13.26.00.052000-240 I82554H352          LEVEL: Error</div>
<div id="_mcePaste" style="padding-left: 30px;">PID     : 260                  TID  : 536          PROC :  db2dasstm.exe</div>
<div id="_mcePaste" style="padding-left: 30px;">INSTANCE: DB2                  NODE : 000</div>
<div id="_mcePaste" style="padding-left: 30px;">EDUID   : 536</div>
<div id="_mcePaste" style="padding-left: 30px;">FUNCTION: DB2 Tools, DB2 administration server,   SchedulerThread_run, probe:5</div>
<div id="_mcePaste" style="padding-left: 30px;">DATA #1 : String, 50 bytes</div>
<div id="_mcePaste" style="padding-left: 30px;">Cannot complete scheduler thread&#8217;s initialization!</div>
<p>&nbsp;</p>
<p>The <em>db2diag </em>flooding would certainly account for the CPU,   I/O, and memory spikes, but I&#8217;m not sure about the periodic freezes.    But it&#8217;s one thing at a time, and couldn&#8217;t stop until I had a clean <em> db2diag</em>.</p>
<p>Fortunately, I found a fellow victim who <a title="db2dasstm.exe  error and db2syscs.exe consumes excessive CPU every few secs " href="http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14490183" target="_blank">reported the same issue</a> just yesterday.  The root cause was that the DB2 Admin Server (<em>db2dasstm) </em>did not have   required authorities on <em>toolsdb</em>.  This was surprising, since I   let <em>db2setup </em>create and configure it.  But I&#8217;ve been accustomed   to chanting the <a title="Impersonating Better Security" href="http://derekwilliams.us/?p=1603" target="_blank">grant dbadm   mantra</a> since the introduction of <em>SECADM</em>, so I typed it out.</p>
<p>But in this case, it wouldn&#8217;t work. I couldn&#8217;t get into <em>toolsdb </em>with   an authorization ID that had <em>SECADM </em>in order to do the grant. I  tried  stepping into it first via <em>SYSADM/SYSADM_GROUP</em>, but no  dice. And <em>toolsdb </em>was unique in that <em>SECADM </em>was only  granted to some bogus <em>&#8220;SYSTEM&#8221;</em> ID.  Thank you, <em>db2setup</em>, for  painting me into a corner!</p>
<p>To fix it, I had to drop and re-create the <em>toolsdb</em>,  following the <a title="Creating the Tools Database (TOOLSDB)" href="http://www-01.ibm.com/support/docview.wss?uid=swg21240257" target="_blank">proper steps</a> to keep DAS happy.  A couple of  <em>db2admin stop/starts</em> later and I had a small and steady diag log.</p>
<p>Time will tell if additional problems remain that contributed to   the freeze problem (so far, so good), but I learned an important   lesson: never let the DB2 installation program create the <em>toolsdb</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2900</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Severe but Curable</title>
		<link>http://derekwilliams.us/?p=2788</link>
		<comments>http://derekwilliams.us/?p=2788#comments</comments>
		<pubDate>Thu, 15 Jul 2010 23:16:43 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Biblical worldview]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2788</guid>
		<description><![CDATA[On average, over 22,000 children die each day from preventable, hunger-related causes.  This fact that receives so little media attention should be among our most urgent priorities.
Over half of these deaths occur on the African continent, so as the World Cup turned attentions there, I sought answers to why the tragedy of hunger persists so [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/07/map.jpg"><img class="alignright size-full wp-image-2842" title="map" src="http://derekwilliams.us/wp-content/uploads/2010/07/map.jpg" alt="" width="126" height="122" /></a>On average, over 22,000 children die <em>each day</em> from preventable, <a title="GlobalIssues.org" href="http://www.globalissues.org/article/715/today-over-24000-children-died-around-the-world" target="_blank">hunger-related</a> causes.  This fact that receives so little <a title="American Chronicle" href="http://www.americanchronicle.com/articles/view/106392" target="_blank">media attention</a> should be among our most urgent priorities.</p>
<p>Over half of these deaths occur on the African continent, so as the <a title="South Africa - World Cup" href="http://www.southafrica.info/2010/" target="_blank">World Cup</a> turned attentions there, I sought answers to why the tragedy of hunger persists so cruelly and what can be done about it.  My reading included Richard Stearns&#8217; <a title="The Hole in Our Gospel" href="http://www.theholeinourgospel.com/" target="_blank">The Hole in Our Gospel</a> and Thurow and Kilman&#8217;s <a title="Enough" href="http://enoughthebook.com/" target="_blank">Enough: Why the World&#8217;s Poorest Starve in an Age of Plenty</a>.  Taken together, these provided a well-rounded mix: the heart and perspective of a luxury goods CEO turned children&#8217;s champion, and pragmatic detail from on-the-ground Wall Street Journal correspondents.</p>
<p><span style="text-decoration: underline;"><strong>Structural</strong></span></p>
<p>Thurow and Kilman describe the <em>structural </em>problems that give rise to African hunger.  Bad policy decisions by governments, the World Bank, USAID, agricultural councils, and other groups lock many African nations into a cycle of dependency.  US crops that are dumped on the world market at heavily-subsidized prices undercut African farmers, driving them out of business.  Insistence on food-only aid exacerbates this problem; for example, during the 2003 Ethiopian famine, international aid trucks drove their loads of US grain past warehouses that were overflowing with the same unsold, unused staples grown by <em>local </em>farmers.  Approachable infrastructure problems lie festering.  More recently, subsidized Ethanol production diverted food to fuel, driving grain prices out of reach of the world&#8217;s poor.  As a result, the Green Revolution which decades ago lifted Asia out of hunger and poverty still evades Africa.</p>
<p><span style="text-decoration: underline;"><strong>Spiritual</strong></span></p>
<p>Richard Stearns decribes how it&#8217;s a <em>spiritual </em>problem.  He reminds us of our scriptural obligations (such as <a title="Matthew 25:31-48" href="http://www.biblegateway.com/passage/?search=matt 25:31-48" target="_blank">Matthew 25</a> and <a title="Isaiah 58" href="http://www.biblegateway.com/passage/?search=isa 58" target="_blank">Isaiah 58</a>) to provide for the poor and feed the hungry.  A gospel with a hole in it is one that accepts personal salvation but ignores the parables of the <em>Good Samaritan</em>, <em>Lazarus</em>, the <em>Sheep and the Goats</em>, and the 2,100 other Bible passages about caring for the poor.  Stearns describes how that conviction led him to leave a life of luxury and head <a title="World Vision" href="http://www.worldvision.org/" target="_blank">World Vision</a>.</p>
<p><span style="text-decoration: underline;"><strong>Attainable</strong></span></p>
<p><em>Spiritual </em>and <em>structural</em>.  They&#8217;re both right.  And the solutions are well within reach.</p>
<p>Modifying food aid programs to allow local purchase may reduce US farm subsidies, but it will help African farmers become self-sufficient.  Providing African farmers the same financial security measures (such as futures and crop insurance) that farmers in developed nations enjoy will help shoulder their risks and smooth out the boom and bust cycles.  Relatively small investments in infrastructure (dams, irrigation, higher-yield seeds, and road improvements) can dramatically improve farming productivity.  Simple treatments and immunizations can very effectively prevent and confront the crises of malaria, tuberculosis, and AIDS.  Small yet powerful innovations like <a title="Nutriset Plumpy'nut" href="http://www.nutriset.fr/" target="_blank">Plumpy&#8217;nut</a> and the <a title="KickStart Pump - Micro-irrigation" href="http://kickstart.org/tech/technologies/micro-irrigation.html" target="_blank">KickStart pump</a> can be rapidly deployed.   These proactive and preventative measures are not only affordable, they&#8217;re collectively less expensive than remedial aid has been.</p>
<p><span style="text-decoration: underline;"><strong>Making a Difference</strong></span></p>
<p>But most of us can&#8217;t hop on a plane tomorrow to go build a dam or start a futures exchange in Africa.  So what can we do?  As Mother Theresa has said, &#8220;we cannot do great things on this Earth, only small things with great love.&#8221;</p>
<p>For some quick encouragement and ideas, read Chapter 10 of <em>Enough</em>.  If you don&#8217;t already support World Vision or a similar ministry, sponsor one or more children from their <a title="World Vision" href="http://www.worldvision.org" target="_blank">web site</a>.  I&#8217;ve seen first-hand the effectiveness of World Vision&#8217;s work in the developing world, and I highly recommend them.  And if budgeting is an issue, consider your very prominent position on the <a title="Global Rich List" href="http://www.globalrichlist.com/" target="_blank">Global Rich List</a>; for example, if you make $35,000 annually, you&#8217;re richer than 95% of the world.</p>
<p>Global hunger is a large-scale, often overwhelming problem, but that&#8217;s no excuse for paralysis or inaction.  It can be solved, one step at a time, one person at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2788</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Woodstock Freedom Run</title>
		<link>http://derekwilliams.us/?p=2774</link>
		<comments>http://derekwilliams.us/?p=2774#comments</comments>
		<pubDate>Sat, 03 Jul 2010 16:23:54 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[Running]]></category>
		<category><![CDATA[5k]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2774</guid>
		<description><![CDATA[The annual Woodstock Freedom Run is perhaps my favorite 5K, mainly because it benefits The Hope Center.  It certainly helps to have Woodstock charm, a flat course, and gracious weather for July (around 70 degrees at race time).  And it&#8217;s always a nice surprise to chat with so many folks that I don&#8217;t see often.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/07/woodstockfreedomrun.jpg"><img class="alignright size-full wp-image-2776" title="woodstockfreedomrun" src="http://derekwilliams.us/wp-content/uploads/2010/07/woodstockfreedomrun.jpg" alt="" width="200" height="150" /></a>The annual <a title="Woodstock Freedom Run" href="http://www.active.com/running/woodstock-ga/woodstock-freedom-run-5k1-mile-2010" target="_blank">Woodstock Freedom Run</a> is perhaps my favorite 5K, mainly because it benefits The Hope Center.  It certainly helps to have Woodstock charm, a flat course, and gracious weather for July (around 70 degrees at race time).  And it&#8217;s always a nice surprise to chat with so many folks that I don&#8217;t see often.  It feels like a family reunion.</p>
<p>Lydia won a second-place age group award at 28:09.  Stephen ran very well at 30:06 and was all smiles as he crossed the line, but he&#8217;s in the 11-14 group now, competing with 18-minute finishers.  At 25:32, I was certainly no threat to 15-minute defending champ Sammy Nyamongo, but enjoyed the race all the same.</p>
<p>It should return to July 4 next year, so if you&#8217;re not running the Peachtree, come out for this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2774</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Contrast</title>
		<link>http://derekwilliams.us/?p=2751</link>
		<comments>http://derekwilliams.us/?p=2751#comments</comments>
		<pubDate>Fri, 02 Jul 2010 01:35:28 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[SUnit]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://derekwilliams.us/?p=2751</guid>
		<description><![CDATA[I happened to notice that an SUnit I added today was number 1,000.  Perhaps I should get free groceries for that milestone, but it reminded me just how much and why we take xUnits and test-driven-development (TDD) for granted.  I was a bit more aware, having spent yesterday working on a customer&#8217;s C++ code which [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://derekwilliams.us/wp-content/uploads/2010/07/sunits.jpg"><img class="alignright size-full wp-image-2759" title="sunits" src="http://derekwilliams.us/wp-content/uploads/2010/07/sunits.jpg" alt="" width="200" height="128" /></a>I happened to notice that an SUnit I added today was number 1,000.  Perhaps I should get free groceries for that milestone, but it reminded me just how much and why we take xUnits and test-driven-development (TDD) for granted.  I was a bit more aware, having spent yesterday working on a customer&#8217;s C++ code which had no xUnits or test scaffolding.</p>
<p>It really was a study in contrasts.</p>
<p>For the customer&#8217;s C++ code, I found myself fighting in the <a title="Visual Studio" href="http://msdn.microsoft.com/vstudio" target="_blank">Visual Studio</a> debugger mostly with overzealous constructors and destructors (folks, just instantiate and delete objects in constructors/destructors, don&#8217;t use them for wild stuff like reading registries, calling decryption libraries, and connecting and disconnecting from databases).  But the real hassle was having to run the code-compile-link-bounce-deploy gauntlet far too many times.  Often this isn&#8217;t bad (yes, incremental compile and auto build all help), but in this case, it took a lot set-up time getting data in the state it needed to be in before calling this code, and every code change required repeating that.  That&#8217;s usually true even of hot swap JVMs.</p>
<p>Compare that to my SUnit-driven <a title="VA Smalltalk" href="http://www.instantiations.com/VAST/" target="_blank">VA Smalltalk</a> code.  I wrote the test case and my first stub method before I wrote the code.  I ran the test, and of course, it failed (failed big, too: red, not yellow, due to an expected <em>message not understood</em> exception).  I re-ran the SUnit with <em>Debug</em>, and started filling in the code &#8211; in the debugger.  I added methods and even an entire class that didn&#8217;t exist before I started debugging.  I inspected objects and ivars and even changed a few to guide me through crafting and whittling at the code.  I ran it again and got to yellow.  One more &#8220;code it while debugging it&#8221; pass and the test went green.</p>
<p>Red, then yellow, then green.  My favorite development process.</p>
<p>I&#8217;ll soon upgrade my Visual Studio 2008 to 2010 and look forward to the new features it offers (thank you, Microsoft for finally bundling ASP .NET MVC, and for abandoning your own JavaScript kluges and just adopting jQuery).  But, decades later, it&#8217;s still nowhere near as productive as <a title="VA Smalltalk" href="http://www.instantiations.com/VAST/" target="_blank">VA Smalltalk</a>, <a title="VisualWorks" href="http://www.cincomsmalltalk.com/main/" target="_blank">VisualWorks</a>, and <a title="Pharo" href="http://www.pharo-project.org" target="_blank">Pharo</a>, where you can write the code in the debugger while the system is still running and never have to stop it.</p>
<p>Why haven&#8217;t we learned?</p>
]]></content:encoded>
			<wfw:commentRss>http://derekwilliams.us/?feed=rss2&amp;p=2751</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
