<?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>nearly random &#187; Uncategorized</title>
	<atom:link href="http://www.johnbaylor.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnbaylor.org</link>
	<description>but with a nefarious purpose</description>
	<lastBuildDate>Thu, 18 Nov 2010 19:13:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>On Second Thought – The Avatar Will Stay</title>
		<link>http://www.johnbaylor.org/2009/09/20/on-second-thought-the-avatar-will-stay/</link>
		<comments>http://www.johnbaylor.org/2009/09/20/on-second-thought-the-avatar-will-stay/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 05:04:33 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/?p=62</guid>
		<description><![CDATA[I&#8217;ve now reconsidered my earlier plan to get rid of my avatar. Why? I&#8217;m so glad you asked. Three reasons: I&#8217;m now identified with the avatar. I recently contacted a guy that I hadn&#8217;t corresponded with in a while and he said &#8220;Oh yeah &#8211; I remember you. The guy with the big rock man [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now reconsidered <a href="http://www.johnbaylor.org/2009/05/28/the-avatar-must-die/">my earlier plan</a> to get rid of my avatar. Why? I&#8217;m so glad you asked. Three reasons:</p>
<p>I&#8217;m now identified with the avatar. I recently contacted <a title="Chris, AKA defunkt" href="http://github.com/defunkt">a guy</a> that I hadn&#8217;t corresponded with in a while and he said &#8220;Oh yeah &#8211; I remember you. The guy with the big rock man thing&#8221;. So if I get rid of the avatar, I might lose some of the people that would otherwise &#8220;recognize&#8221; me online.</p>
<p>The Games will blow over but the avatar is still, in my opinion, pretty darn cool. Ya don&#8217;t see huge multi-ton monoliths every day.</p>
<p>Time and inertia. I have very little &#8220;spare&#8221; time in my life and my plan for changing the avatar would likely have taken some time to get right (a series of ~10 images shifting from the rock man to my own smiling face). This is time that would take away from whatever projects I&#8217;d otherwise be working on.</p>
<p>So, I hope you like it &#8211; you&#8217;ll keep seeing it on <a href="http://twitter.com/JohnB">twitter</a> and other places.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2009/09/20/on-second-thought-the-avatar-will-stay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Avatar Must Die</title>
		<link>http://www.johnbaylor.org/2009/05/28/the-avatar-must-die/</link>
		<comments>http://www.johnbaylor.org/2009/05/28/the-avatar-must-die/#comments</comments>
		<pubDate>Thu, 28 May 2009 08:24:28 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/?p=54</guid>
		<description><![CDATA[A few years back, we took a trip from the Bay Area all the way to British Colombia. Near the apex of our journey we saw the most incredible sights. Orca whales, swimming at and under our boat. Brown-colored Black bears (yes, the distinction matters) by the side of the road. And on a mountain [...]]]></description>
			<content:encoded><![CDATA[<p>A few years back, we took a trip from the Bay Area all the way to British Colombia. Near the apex of our journey we saw the most incredible sights. Orca whales, swimming at and <em>under</em> our boat. Brown-colored Black bears (yes, the distinction matters) by the side of the road. And on a mountain near Whistler &#8211; the place where I really learned to ski many years ago (such as a boy from San Diego <em>can</em> actually learn to ski) &#8211; we saw a huge totem called an Anukshuk. Built of huge Stonehenge-style rocks, it was perched  far up the mountain. I liked it so much that I started using it as my avatar on a number of sites.</p>
<p><img class="size-full wp-image-56 alignright" title="Anukshuk" src="http://www.johnbaylor.org/wp-content/uploads/2009/05/johnb_avatar.jpg" alt="Avatar used on twitter, chess.com and others" width="73" height="73" /></p>
<p>Yes, I know that it is one of the mascots of the 2010 Olympic games. I thought it would be so cool to make use it, long before the rest of the world associated it with anything other than me. But now, as the date (February 2010) approaches, I wonder when &#8211; or if &#8211; I should replace it. I&#8217;d like it to be a gradual process &#8211; but that is not usually the way these things work. You replace one image with another. Whoosh. Done.</p>
<p>And so I ponder. But as I ponder, the Games come closer. And with the date getting closer, it impacts The Locals more and more. To house and feed and transport that abrupt influx of humanity that is The Games, there must be changes. A streamlining of transport. A building of hotel rooms. A &#8220;regooding&#8221; of the now-deemed-blighted sections of the city. A streamlining of the food establishments, to cater to the oh-hey-theres-a-Starbucks-right-there crowd. Consistency is chosen, time and again, over flavorful melange.</p>
<p>But these Locals speak our language &#8211; by gosh they&#8217;re almost &#8216;mericans! Some, like the quirky observer William Gibson, <a class="wp-caption" title="William Gibson defines &quot;regood&quot;" href="http://www.theglobeandmail.com/archives/article761742.ece" target="_self">use a delicate turn of phrase to create new words for the process that is unfolding</a>. Others, like Tim Bray of the Urban Geek persuasion (no, I don&#8217;t know what that phrase means either) <a class="wp-caption" title="just follow the damn link" href="http://www.tbray.org/ongoing/When/200x/2007/05/31/Gone-World" target="_self">point us toward</a><a href="http://thetyee.ca/News/2007/05/30/RAVCambie/"> articles detailing the decline of the locals</a> under an onslaught of progress and, later, of the <a href="http://www.tbray.org/ongoing/When/200x/2009/05/27/Justice">fights and Pyrrhic victories</a>. How soon until we see articles about the replacement of family owned businesses with multinational conglomerates? And do I want to be associated with all that through my avatar?</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2009/05/28/the-avatar-must-die/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last of a Generation</title>
		<link>http://www.johnbaylor.org/2008/10/01/last-of-a-generation/</link>
		<comments>http://www.johnbaylor.org/2008/10/01/last-of-a-generation/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 05:02:43 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/?p=41</guid>
		<description><![CDATA[My aunt Barbara passed away yesterday. We were never close, but she was the last of her siblings to pass on, even though she was the oldest. I know that was hard on her. Now its finally her turn. May she find rest. She played a pivotal role in my life, long before I was [...]]]></description>
			<content:encoded><![CDATA[<p>My aunt Barbara passed away yesterday. We were never close, but she was the last of her siblings to pass on, even though she was the oldest. I know that was hard on her. Now its finally her turn. May she find rest.</p>
<p>She played a pivotal role in my life, long before I was even conceived. After her mother, my grandmother, had passed away, Barb took it upon herself to put my mother through college. I doubt she ever understood this nuclear engineering thing my mother studied, but she supported it. And eventually my mother met another engineer and here I am today.</p>
<p>It wasn&#8217;t unexpected &#8211; she had been declining for a while &#8211; but I&#8217;m surprised at how choked up I am about her passing. Outspoken, disapproving, warm and alive &#8211; often in the same sentence.</p>
<p>I remember a message she once left on our answering machine. Her voice sounded so similar to my dead mother&#8217;s voice, with the same Pennsylvania accent, that it sent chills up my spine.</p>
<p>Thanks Barb, for all you&#8217;ve done and all you were &#8211; you&#8217;ll be missed &#8211; and in the end, what more is there, than to be missed?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2008/10/01/last-of-a-generation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Its Official &#8211; My Old Product is Dead</title>
		<link>http://www.johnbaylor.org/2008/03/20/its-official-my-old-product-is-dead/</link>
		<comments>http://www.johnbaylor.org/2008/03/20/its-official-my-old-product-is-dead/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 23:22:38 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2008/03/20/its-official-my-old-product-is-dead/</guid>
		<description><![CDATA[Pay By Touch To Shut Down All Biometric Services Immediately Biometric authentication transactions to cease at 11:59:59PM March 19, 2008 SAN FRANCISCO &#8211; (March 19, 2008) &#8211; Solidus Networks, Inc., dba Pay By Touch, regretfully announced today that it will no longer process biometric transactions on behalf of its merchant customers and consumer membership base, [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: center" align="center"><strong><span style="font-size: 10pt; font-family: 'Arial','sans-serif'"><center>Pay By Touch To Shut Down All Biometric Services Immediately </center></span></strong></p>
<p style="text-align: center" align="center"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif'">Biometric authentication transactions to cease at 11:59:59PM March 19, 2008</span></em></p>
<p><strong><span style="font-size: 10pt; font-family: 'Arial','sans-serif'">SAN FRANCISCO &#8211; (March 19, 2008</span></strong><span style="font-size: 10pt; font-family: 'Arial','sans-serif'">) &#8211; Solidus Networks, Inc., dba Pay By Touch, regretfully announced today that it will no longer process biometric transactions on behalf of its merchant customers and consumer membership base, as of 11:59:59PM March 19, 2008.  </span></p>
<p><span style="font-size: 10pt; font-family: 'Arial','sans-serif'">On December 14, 2007, Solidus Networks filed for U.S. bankruptcy protection under Chapter 11.  As part of the company&#8217;s restructuring, it was determined that the enterprise could no longer support the biometric authentication and payment system as it currently exists, based on lack of funding and current market conditions.  </span></p>
<p><span style="font-size: 10pt; font-family: 'Arial','sans-serif'">Other non-biometric Solidus Networks business units will continue on their current business paths.   </span></p>
<p class="MsoNormal">Solidus Networks extends its sincere gratitude to the shoppers, merchants, vendors, investors, partners, and employees who have been supporting the company&#8217;s vision since its first biometric payment transaction in 2002.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2008/03/20/its-official-my-old-product-is-dead/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>unpack!</title>
		<link>http://www.johnbaylor.org/2008/02/27/u/</link>
		<comments>http://www.johnbaylor.org/2008/02/27/u/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 07:54:16 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2008/02/27/u/</guid>
		<description><![CDATA[[Update 10/11/2009: I just found a better tool, bindata, to do what I'm describing in this post. It also lists, at the bottom of the page, many links to yet other implementations of binary data packing/unpacking. Worth checking out if this is what you need.] [Update: presentation from the 4/15/2008 Ruby Meetup is now available here.] I [...]]]></description>
			<content:encoded><![CDATA[<p>[Update 10/11/2009: I just found a better tool, <a href="http://bindata.rubyforge.org/">bindata</a>, to do what I'm describing in this post. It also lists, at the bottom of the page, many links to yet other implementations of binary data packing/unpacking. Worth checking out if this is what you need.]</p>
<p>[Update: presentation from the <a href="http://ruby.meetup.com/81/calendar/7577430/" target="_blank">4/15/2008 Ruby Meetup</a> is now available <a href="http://docs.google.com/Presentation?id=ad9wfpzzrhx_46fnbpqrgx" target="_blank">here</a>.]</p>
<p>I like reading code. Its like a novel and I want to read it cover-to-cover. Some, such as <a title="why not" href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">Why&#8217;s</a> <a title="The full source code, with many many comments." href="http://github.com/camping/camping/blob/master/lib/camping-unabridged.rb">Camping framework</a>, I struggle to comprehend. But most code that I read comes up slightly short. Like a novel with some mis-spellings, awkward phrasing or repeated analogies, I mentally mark it as &#8220;could be better&#8221;. And sometimes I really do sit down and write something better &#8211; maybe just for my own amusement but often for a useful purpose.</p>
<p>I recently had the experience of reading some code that parsed a variable-length binary data structure. This sort of thing comes up often when parsing a file format or communications protocol. Most of the code looks fairly similar because it does similar stuff: ignore one byte, read the next four as the length of the following junk, read two important bytes, ignore two more, read another four-byte length and skip past the following N bytes &#8211; ad nauseum.</p>
<p>I&#8217;ve written it in C, and it looks something like this (ignoring error conditions like getting to the end of the buffer):</p>
<pre>ptr = &amp;data;                  // start at the beginning of our data
ptr++;                        // skip junk we don't care about
UInt32 len = *(UInt32 *) ptr; // get the 4-byte length
len = ntohl(len);             // convert from network byte ordering
ptr += sizeof(UInt32);        // skip past the length we just read
ptr += len;                   // skip past the data we don't care about
UInt16 cost = *(UInt16 *)ptr; // read our important two bytes
cost = ntohs(cost);           // convert to the correct byte ordering</pre>
<p>In Ruby, this tends to be shorter due to the handy String.unpack() routine, which takes a concise format string to define how many bytes to read and what to do with them. &#8220;a3&#8243; reads 3 bytes as a string, &#8220;N&#8221; reads 4 bytes in network order, &#8220;n&#8221; reads 2 bytes in network order, etc. The code above could be rewritten in Ruby like this:</p>
<pre><span class="ident">array</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">.</span><span class="ident">unpack</span><span class="punct">(</span> <span class="punct">"</span><span class="string">a1N</span><span class="punct">")</span>        <span class="comment"># read the junk and the 4 length bytes</span>
<span class="ident">len</span> <span class="punct">=</span> <span class="ident">array</span><span class="punct">[</span><span class="number">1</span><span class="punct">]</span>                     <span class="comment"># only get the length value we care about</span>
<span class="ident">data</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">[</span><span class="number">5</span><span class="punct">..-</span><span class="number">1</span><span class="punct">]</span>                 <span class="comment"># throw away the stuff we just read</span>
<span class="ident">array</span> <span class="punct">=</span>  <span class="ident">data</span><span class="punct">.</span><span class="ident">unpack</span><span class="punct">(</span> <span class="punct">"</span><span class="string">a<span class="expr">#{len}</span>n</span><span class="punct">"</span> <span class="punct">)</span> <span class="comment"># define the length to read on the fly</span>
<span class="ident">cost</span> <span class="punct">=</span> <span class="ident">array</span><span class="punct">[</span><span class="number">1</span><span class="punct">]</span>                    <span class="comment"># get our data in its correct ordering</span>
<span class="ident">data</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">[(</span><span class="ident">len</span><span class="punct">+</span><span class="number">2</span><span class="punct">)..-</span><span class="number">1</span><span class="punct">]</span>           <span class="comment"># again, throw away what we just read</span></pre>
<p>This code works fine, but its not much more readable than the C code. A first step would be do define a string.unpack!() routine, where the &#8216;!&#8217; exclamation clues us in that it modifies the object we&#8217;re working with. In this case, the modification is to <span style="font-style: italic">eat</span> (discard) the data we just read. This shortens the code to:</p>
<pre><span class="ident">array</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">.</span><span class="ident">unpack!</span><span class="punct">(</span> <span class="punct">"</span><span class="string">a1N</span><span class="punct">")</span>       <span class="comment"># read the junk and the 4 length bytes</span>
<span class="ident">len</span> <span class="punct">=</span> <span class="ident">array</span><span class="punct">[</span><span class="number">1</span><span class="punct">]</span>                     <span class="comment"># only get the length value we care about</span>
<span class="ident">array</span> <span class="punct">=</span>  <span class="ident">data</span><span class="punct">.</span><span class="ident">unpack!</span><span class="punct">("</span><span class="string">a<span class="expr">#{len}</span>n</span><span class="punct">")</span>  <span class="comment"># define the length to read on the fly</span>
<span class="ident">cost</span> <span class="punct">=</span> <span class="ident">array</span><span class="punct">[</span><span class="number">1</span><span class="punct">]</span>                    <span class="comment"># get our data in its correct ordering</span></pre>
<p>But again, this isn&#8217;t much more readable (in my opinion) than the C code. Additionally, it doesn&#8217;t help us understand the code much better in the case where our format string is &#8220;a3Nna5&#8243; and we need to remember which item in &#8216;array&#8217; corresponds to the &#8216;n&#8217; in the string (in this case, it is array[2]). After a test iteration or two, what I finally hit upon was to encapsulate the behavior we want in a separare Unpacker class, that automatically eats the data it reads and stores the results in an internal Hash object, to map the name &#8216;len&#8217; or &#8216;cost&#8217; to the data. I also combined the format string and the resulting variable so we can clearly see the relationships. The result looks like this:</p>
<pre><span class="ident">u</span> <span class="punct">=</span> <span class="constant">Unpacker</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">data</span><span class="punct">)</span>
<span class="ident">u</span><span class="punct">.</span><span class="ident">u!</span> <span class="punct">"</span><span class="string">a1        =&gt; unused
      N         =&gt; len</span><span class="punct">"</span>
<span class="ident">u</span><span class="punct">.</span><span class="ident">u!</span> <span class="punct">"</span><span class="string">a<span class="expr">#{u.len}</span> =&gt; unused
      n         =&gt; cost</span><span class="punct">"</span></pre>
<p>Now we can clearly see which values are ignored, which are given meaningful names, and how the format codes relate to the meaning of the data. Changing it to reflect a better understanding of the underlying data will be very easy. Note that the only reason its in two statements is to define a value for u.len before we use it &#8211; blocks of fixed-length data can be one statement.</p>
<p>The code to implement the Unpacker class is only about 30 lines of Ruby &#8211; including the string.unpack!() routine that can be reused separately.</p>
<pre><span class="keyword">class </span><span class="class">String</span>
  <span class="keyword">def </span><span class="method">unpack!</span> <span class="ident">format</span>
     <span class="ident">array</span> <span class="punct">=</span> <span class="constant">self</span><span class="punct">.</span><span class="ident">unpack</span><span class="punct">(</span><span class="ident">format</span><span class="punct">+"</span><span class="string">a*</span><span class="punct">")</span>
    <span class="constant">self</span><span class="punct">.</span><span class="ident">replace</span> <span class="ident">array</span><span class="punct">.</span><span class="ident">pop</span>
     <span class="keyword">return</span> <span class="ident">array</span>
   <span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">class </span><span class="class">Unpacker</span> <span class="punct">&lt;</span> <span class="constant">Hash</span>
   <span class="ident">attr_reader</span> <span class="symbol">:data</span>
 <span class="keyword">def </span><span class="method">initialize</span> <span class="ident">string</span>
     <span class="attribute">@data</span> <span class="punct">=</span> <span class="ident">string</span>
    <span class="keyword">super</span>
  <span class="keyword">end</span>
  <span class="comment"># format string is expected to have whitespace between each</span>
  <span class="comment"># "unpackCode=&gt;variableName" pairing (which can have whitespace</span>
  <span class="comment"># around the "=&gt;").  u! was picked to be short so it would</span>
  <span class="comment"># look nice, and to connote a destructive "unpack!" operation.</span>
  <span class="keyword">def </span><span class="method">u!</span> <span class="ident">format</span>
    <span class="ident">format</span><span class="punct">.</span><span class="ident">gsub</span><span class="punct">(/</span><span class="regex"><span class="escape">\s</span>*=&gt;<span class="escape">\s</span>*</span><span class="punct">/,'</span><span class="string">=&gt;</span><span class="punct">').</span><span class="ident">strip</span><span class="punct">.</span><span class="ident">split</span><span class="punct">(/</span><span class="regex"><span class="escape">\s</span>+</span><span class="punct">/).</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">segment</span><span class="punct">|</span>
    <span class="ident">src</span><span class="punct">,</span><span class="ident">dst</span> <span class="punct">=</span> <span class="ident">segment</span><span class="punct">.</span><span class="ident">split</span><span class="punct">(/</span><span class="regex">=&gt;</span><span class="punct">/)</span>
    <span class="constant">self</span><span class="punct">[</span><span class="ident">dst</span><span class="punct">]</span> <span class="punct">=</span> <span class="attribute">@data</span><span class="punct">.</span><span class="ident">unpack!</span><span class="punct">("</span><span class="string"><span class="expr">#{src}</span></span><span class="punct">")[</span><span class="number">0</span><span class="punct">]</span>
 <span class="keyword">end</span>
<span class="keyword">end</span>
<span class="comment"># Hash_with_Attrs - For the simplicity of using either u.len or u['len'],</span>
<span class="comment"># makes a hash appear to have members for each hash entry. Many thanks</span>
<span class="comment"># to Why_ for collecting this handy routine on his a href= RedHanded blog.</span>
<span class="comment"># Note of Caution: 'len' is fine but 'length' would not be since u.length</span>
<span class="comment"># would give the number of entries in the hash, not the just-parsed value.</span>
<span class="keyword">def </span><span class="method">method_missing</span><span class="punct">(</span><span class="ident">meth</span><span class="punct">,*</span><span class="ident">args</span><span class="punct">)</span>
  <span class="ident">meth</span> <span class="punct">=</span> <span class="ident">meth</span><span class="punct">.</span><span class="ident">id2name</span>
  <span class="keyword">if</span> <span class="ident">meth</span> <span class="punct">=~</span> <span class="punct">/</span><span class="regex">=$</span><span class="punct">/</span>
    <span class="constant">self</span><span class="punct">[</span><span class="ident">meth</span><span class="punct">[</span><span class="number">0</span><span class="punct">..-</span><span class="number">2</span><span class="punct">]]</span> <span class="punct">=</span> <span class="punct">(</span><span class="ident">args</span><span class="punct">.</span><span class="ident">length</span><span class="punct">&lt;</span><span class="number">2</span> <span class="punct">?</span> <span class="ident">args</span><span class="punct">[</span><span class="number">0</span><span class="punct">]</span> <span class="punct">:</span> <span class="ident">args</span><span class="punct">)</span>
  <span class="keyword">else</span>
    <span class="constant">self</span><span class="punct">[</span><span class="ident">meth</span><span class="punct">]</span>
  <span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
<p>Update: <em>An even cleaner and shorter way would be to implement a <a href="http://en.wikipedia.org/wiki/Domain-specific_programming_language">DSL</a> as a module so the code above could look like this:</em></p>
<pre><span class="ident">a</span> <span class="number">1</span><span class="punct">,</span>    <span class="symbol">:unused</span>
<span class="constant">N</span>       <span class="symbol">:len</span>
<span class="ident">a</span> <span class="symbol">:len</span><span class="punct">,</span> <span class="symbol">:unused</span>
<span class="ident">n</span>       <span class="symbol">:cost</span></pre>
<p><em>(and yes, this is valid Ruby code)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2008/02/27/u/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Recommendation: The Rails Way</title>
		<link>http://www.johnbaylor.org/2008/01/29/book-recommendation-the-rails-way/</link>
		<comments>http://www.johnbaylor.org/2008/01/29/book-recommendation-the-rails-way/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 19:53:16 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2008/01/29/book-recommendation-the-rails-way/</guid>
		<description><![CDATA[The Rails Way is a Ruby on Rails reference book that I bought on Josh Susser&#8217;s recommendation.  I&#8217;ve actually, to my family&#8217;s dismay, been reading the darn thing instead of just referring to it like one would a, well, reference book.  A lot of Rails&#8217;isms that I had a vague idea about I now understand [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Amazon" href="http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321445619">The Rails Way</a> is a Ruby on Rails reference book that I bought on <a href="http://blog.hasmanythrough.com/2007/12/20/book-review-the-rails-way">Josh Susser&#8217;s recommendation</a>.  I&#8217;ve actually, to my family&#8217;s dismay, been <em>reading</em> the darn thing instead of just <em>referring</em> to it like one would a, well, reference book.  A lot of Rails&#8217;isms that I had a vague idea about I now understand with much more clarity.  It will definitely come in handy soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2008/01/29/book-recommendation-the-rails-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Ubuntu</title>
		<link>http://www.johnbaylor.org/2008/01/25/using-ubuntu/</link>
		<comments>http://www.johnbaylor.org/2008/01/25/using-ubuntu/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 22:18:07 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2008/01/25/using-ubuntu/</guid>
		<description><![CDATA[I&#8217;ve heard that dual-booting Ubuntu linux was easy but its really true. I&#8217;m now running Ubuntu and it was as easy as various blog posts have said. The longest step in the process was defragmenting the drive before repartitioning with Ubuntu. There are a few issues remaining around using the data on the Windows partition [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard that dual-booting Ubuntu linux was easy but its really true.  I&#8217;m now running Ubuntu and it  was as easy as various blog posts have said.  The longest step in the process was defragmenting the drive before repartitioning with Ubuntu.  There are a few  issues remaining around using the data on the Windows partition from Linux, but on the whole I&#8217;m very happy with the switch.</p>
<p><em>[Update 1/29/2008: the network is inconsistent.  Upon a boot or un-hibernate it may be completely incapable of finding my router - but then later it is fine. I'll continue trying to track it down... using the Windows OS!] </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2008/01/25/using-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another High-Traffic Rails Site: catalogchoice.org</title>
		<link>http://www.johnbaylor.org/2007/12/17/another-high-traffic-rails-site-catalogchoiceorg/</link>
		<comments>http://www.johnbaylor.org/2007/12/17/another-high-traffic-rails-site-catalogchoiceorg/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 01:12:46 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2007/12/17/another-high-traffic-rails-site-catalogchoiceorg/</guid>
		<description><![CDATA[Its getting a lot of traffic and seems pretty snappy: http://www.catalogchoice.org/ So yes, Virginia, Ruby and Rails do scale.]]></description>
			<content:encoded><![CDATA[<p>Its getting a lot of traffic and seems pretty snappy:</p>
<p><a href="http://www.catalogchoice.org/" title="catalogchoice.org">http://www.catalogchoice.org/</a></p>
<p>So yes, Virginia, Ruby and Rails do scale.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2007/12/17/another-high-traffic-rails-site-catalogchoiceorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even More Rapid Development</title>
		<link>http://www.johnbaylor.org/2007/11/28/even-more-rapid-development/</link>
		<comments>http://www.johnbaylor.org/2007/11/28/even-more-rapid-development/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 20:41:20 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2007/11/28/even-more-rapid-development/</guid>
		<description><![CDATA[The success of the Ruby on Rails web framework is somewhat based on its  ability to soothe the pain caused by the not-so-rapid development process of other, so-called &#8220;enterprise-ready&#8221; frameworks.  But Rails is not the only Ruby web framework, and not the fastest one for initial prototyping(*).  The faster (more rabid?) ones I&#8217;ve looked at: [...]]]></description>
			<content:encoded><![CDATA[<p>The success of the Ruby on Rails web framework is somewhat based on its  ability to soothe the pain caused by the not-so-rapid development process of other, so-called &#8220;enterprise-ready&#8221; frameworks.  But Rails is not the only Ruby web framework, and not the fastest one for initial prototyping(*).  The faster (more rabid?) ones I&#8217;ve looked at:</p>
<ul>
<li><a href="http://camping.rubyforge.org/">Camping</a>.  From the the <a href="http://www.poignantguide.net/ruby/">quirky mind</a> of <a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">why-the-luck-stiff</a> (no other name given) it inspires absurdly fast development (and absurdity!).</li>
<li><a href="http://sinatra.rubyforge.org/">Sinatra</a>.  Some people who have tried Camping have moved on to Sinatra &#8211; it has a clean syntax and a simple metaphor (Sinatra attends events) and is supported by a larger team.</li>
</ul>
<p>Its hard to imagine what faster development would look like &#8211; maybe a web interface for defining Camping or Sinatra event handlers?  Code the app directly from the browser!</p>
<p>(*) Footnote: Note that I use the word &#8220;prototype&#8221; because that is all I have done with them &#8211; I see no reason they couldn&#8217;t scale as well as Rails or any other web framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2007/11/28/even-more-rapid-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Are All Outsourcees</title>
		<link>http://www.johnbaylor.org/2007/09/10/we-are-all-outsourcees/</link>
		<comments>http://www.johnbaylor.org/2007/09/10/we-are-all-outsourcees/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 06:30:17 +0000</pubDate>
		<dc:creator>JohnB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnbaylor.org/2007/09/10/we-are-all-outsourcees/</guid>
		<description><![CDATA[Last night&#8217;s Tech Nation program had an interview with Rob Levy of BEA.  He had some deep insights into dealing with outsourcing companies.  In essence, either make them as peers or at least treat them as peers.  This is a refreshing change to what I&#8217;ve seen, not only when outsourcing, but when purchasing companies outright [...]]]></description>
			<content:encoded><![CDATA[<p>Last night&#8217;s <a href="http://itc.conversationsnetwork.org/shows/detail1913.html" title="Tech Nation program">Tech Nation program</a> had an interview with Rob Levy of BEA.  He had some deep insights into dealing with outsourcing companies.  In essence, either make them as peers or at least treat them as peers.  This is a refreshing change to what I&#8217;ve seen, not only when outsourcing, but when purchasing companies outright to be &#8220;business units&#8221; within the greater company.  In the words of one friend who works at one of these subsidiaries, they feel like the &#8220;red-headed step child&#8221;.  It definitely puts the <em>sub</em> in subsidiary!</p>
<p>Rob Levy made the point that once these places become free-standing entities, with enough work and resources to work independently, then its perfectly normal for them to treat the company headquarters as an outsourcee instead of a parent.  I can&#8217;t imagine a lot of C-level executives (especially in my company) giving this type of free rein.</p>
<p>Whether you agree with him or not, its worth a listen&#8230;</p>
<p>[<em>editor's note: when jotting down my initial notes for this post I found myself writing that they were treated "as </em>if they were<em> peers" - which just goes to show how deeply engrained this sort of thinking is.  The headquarters has the illusion of control, but its only a offering from the employees - if you make the company too difficult or unstable to work at you just may find you've lost all your employees.</em>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnbaylor.org/2007/09/10/we-are-all-outsourcees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

