<?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"
	>

<channel>
	<title>InquiryLabs</title>
	<atom:link href="http://blog.inquirylabs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inquirylabs.com</link>
	<description>Politics, Programming and Possibilities</description>
	<pubDate>Fri, 16 May 2008 04:24:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>A Cleaner, Happier Blog</title>
		<link>http://blog.inquirylabs.com/2008/05/15/a-cleaner-happier-blog/</link>
		<comments>http://blog.inquirylabs.com/2008/05/15/a-cleaner-happier-blog/#comments</comments>
		<pubDate>Fri, 16 May 2008 04:24:56 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=279</guid>
		<description><![CDATA[
The dubious links have finally been cleaned up from my blog&#8217;s feeds.  A search reveals none of the key words (e.g. loans, ringtones, porn) that were there before, so all evidence points to things being back to normal.
For the record, I tried to clean things up manually at first, but that quickly became an [...]]]></description>
			<content:encoded><![CDATA[<link rel="stylesheet" href="/mac_classic_code.css" type="text/css" charset="utf-8">
<p>The dubious links have finally been cleaned up from my blog&#8217;s feeds.  A search reveals none of the key words (e.g. loans, ringtones, porn) that were there before, so all evidence points to things being back to normal.</p>
<p>For the record, I tried to clean things up manually at first, but that quickly became an awful chore: more then 200 posts had been magically &#8220;edited&#8221; and the nefarious links inserted at the end.  So I wrote a script to clean things up, using Ruby and Sequel:</p>
<pre class="textmate-source mac_classic"><span class="source source_ruby"><span class="meta meta_require meta_require_ruby"><span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby">require</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>rubygems<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span></span>
<span class="meta meta_require meta_require_ruby"><span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby">require</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>mysql<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span></span>
<span class="meta meta_require meta_require_ruby"><span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby">require</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>sequel<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span></span>

db <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> <span class="support support_class support_class_ruby">Sequel</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>mysql <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>inquirylabs_wordpress<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
  <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>user</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>user<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
  <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>password</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>password<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
  <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>host</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8216;</span>localhost<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8216;</span></span>

posts <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> db<span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">[</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>wp_posts</span><span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">]</span>
posts<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>all<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>each <span class="keyword keyword_control keyword_control_start-block keyword_control_start-block_ruby">do </span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span><span class="variable variable_other variable_other_block variable_other_block_ruby">p</span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span>
  posts<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>filter<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>ID</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> p<span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">[</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>ID</span><span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">]</span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>update<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span>
    <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>post_content</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> p<span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">[</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>post_content</span><span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">]</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>gsub<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span>
      <span class="string string_regexp string_regexp_classic string_regexp_classic_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_ruby">/</span><span class="string string_regexp string_regexp_group string_regexp_group_ruby"><span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">(</span>&lt;font|&lt;div<span class="constant constant_character constant_character_escape constant_character_escape_ruby">\s</span>id=wp_internal<span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">)</span></span>.*
        <span class="string string_regexp string_regexp_group string_regexp_group_ruby"><span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">(</span>porn|
         payday<span class="string string_regexp string_regexp_character-class string_regexp_character-class_ruby"><span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">[</span>-<span class="constant constant_character constant_character_escape constant_character_escape_ruby">\s</span><span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">]</span></span>loan|
         home<span class="string string_regexp string_regexp_character-class string_regexp_character-class_ruby"><span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">[</span>-<span class="constant constant_character constant_character_escape constant_character_escape_ruby">\s</span><span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">]</span></span>loan|
         ringtone<span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">)</span></span>.*$<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_ruby">/x</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">&#8220;</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">&#8220;</span></span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span>
<span class="keyword keyword_control keyword_control_ruby">end</span></span></pre>
<p>Much better.  <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to those of you who helped me to identify the problem and, recently, to see that I hadn&#8217;t scoured all of the dark corners of the website.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/05/15/a-cleaner-happier-blog/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mass Bank Withdrawal Next Month?</title>
		<link>http://blog.inquirylabs.com/2008/05/13/mass-bank-withdrawal-next-month/</link>
		<comments>http://blog.inquirylabs.com/2008/05/13/mass-bank-withdrawal-next-month/#comments</comments>
		<pubDate>Wed, 14 May 2008 03:58:00 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=278</guid>
		<description><![CDATA[I&#8217;m not sure how I feel about ThisJune5th.  On one hand, it could potentially cause a lot of damage to our financial infrastructure&#8212;it&#8217;s basically an organized bank run.  But on the other hand, actively supporting something like this is a peaceful and legal way to support a (possibly abrupt) transition to honest (commodity-backed) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure how I feel about <a href="http://thisjune5th.com/">ThisJune5th</a>.  On one hand, it could potentially cause a lot of damage to our financial infrastructure&#8212;it&#8217;s basically an organized bank run.  But on the other hand, actively supporting something like this is a peaceful and legal way to support a (possibly abrupt) transition to honest (commodity-backed) money and require accountability at the hands of the Federal Reserve and large investment banks for years of dollar debasement and <a href="http://www.bloomberg.com/apps/news?pid=20601109&#038;sid=a1ctn1Xfq5Do&#038;refer=home">moral hazard</a>.</p>
<p>The funny thing is, whoever made this site might get me to do what they suggest regardless of my leanings&#8230; I don&#8217;t want to find out that, come June 5th, I <i>can&#8217;t</i> withdraw my money.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/05/13/mass-bank-withdrawal-next-month/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TextMate Footnotes 3.0</title>
		<link>http://blog.inquirylabs.com/2008/05/12/textmate-footnotes-30/</link>
		<comments>http://blog.inquirylabs.com/2008/05/12/textmate-footnotes-30/#comments</comments>
		<pubDate>Mon, 12 May 2008 18:04:23 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=277</guid>
		<description><![CDATA[José Valim has improved the Footnotes plugin and kindly taken the lead on maintaining it for Rails 2.0.  Read about his awesome new features here.  Thanks, José!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://josevalim.blogspot.com/">José Valim</a> has improved the <a href="http://blog.inquirylabs.com/2006/09/28/textmate-footnotes-v16-released/">Footnotes plugin</a> and kindly taken the lead on maintaining it for Rails 2.0.  Read about his awesome new features <a href="http://josevalim.blogspot.com/2008/05/footnotes-v30.html">here</a>.  Thanks, José!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/05/12/textmate-footnotes-30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Victory! (Part I)</title>
		<link>http://blog.inquirylabs.com/2008/05/08/victory-part-i/</link>
		<comments>http://blog.inquirylabs.com/2008/05/08/victory-part-i/#comments</comments>
		<pubDate>Fri, 09 May 2008 04:16:10 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=276</guid>
		<description><![CDATA[B.J. Lawson became the Republican nominee in his North Carolina district 4 last Tuesday.  Congratulations, Dr. Lawson!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lawsonforcongress.com/">B.J. Lawson</a> <a href="http://www.wral.com/news/political/page/2773460/?group=us_house">became the Republican nominee</a> in his North Carolina district 4 last Tuesday.  Congratulations, Dr. Lawson!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/05/08/victory-part-i/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Visit With Lance Walley</title>
		<link>http://blog.inquirylabs.com/2008/05/04/a-visit-with-lance-walley/</link>
		<comments>http://blog.inquirylabs.com/2008/05/04/a-visit-with-lance-walley/#comments</comments>
		<pubDate>Sun, 04 May 2008 16:54:33 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=275</guid>
		<description><![CDATA[I had a fascinating conversation last Thursday with Lance Walley (of Engine Yard) regarding life, religion, economics and building businesses.  There were so many gems that came out of the conversation that I&#8217;m afraid this post may be a little haphazard.  In any case, I was pleased to finally meet him and to [...]]]></description>
			<content:encoded><![CDATA[<p>I had a fascinating conversation last Thursday with <a href="http://engineyard.com/whoweare">Lance Walley</a> (of Engine Yard) regarding life, religion, economics and building businesses.  There were so many gems that came out of the conversation that I&#8217;m afraid this post may be a little haphazard.  In any case, I was pleased to finally meet him and to have a night on the town here in Chicago.</p>
<p>On economics, Lance mentioned a friend who had lived in Finland for a while.  This friend observed that the people there were generally happy, but the interesting thing is that they&#8217;ve essentially &#8220;squelched&#8221; the amplitude of their economy&#8212;there are fewer really poor people, and fewer really rich people.  The middle &#8220;band&#8221; of the economic wave is the place of the majority.  Here in America, on the other hand, the capitalist economy is a little different.  People have the potential for greater wealth as well as greater disaster and poverty.</p>
<p>We talked about the advantages of capitalism, especially in the context of a book called The Commanding Heights by Daniel Yergen.  From what I understood, Yergen makes a convincing case for capitalism by observing the many economic systems throughout the world and through time.  I brought up the point that capitalism does not work in the context of families, however.  That may be somewhat absurd (applying capitalism within a family structure), but the absurdity just shows how at some level of the social structure, capitalism loses touch with humanity.  So we have competing ideologies that want more or less social responsibility and redistribution of wealth.</p>
<p>On another subject, Lance mentioned a book that I will definitely have to get my hands on, called &#8220;The Singularity is Near&#8221;.  Apparently it&#8217;s quite popular, even though I hadn&#8217;t heard of it (but when did my having heard about it ever mean anything? <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )  The premise of the book is the the pace of progress is itself progressing, and that at some point in the near future, something that we humans create (e.g. self-replicating artificial intelligence) will be born and it will forever change the trajectory of our evolution and our planet.</p>
<p>We also had a chance to talk about EngineYard and the cool things going on there.  <a href="http://rubini.us/">Rubinius</a>, <a href="http://merbivore.com/">Merb</a> and a full stack <a href="http://engineyard.com/">hosted Rails solution</a> are all enticing projects.  They&#8217;re on the edge, pushing the technology forward and for that I applaud their willingness to take risks, as well as their vision for the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/05/04/a-visit-with-lance-walley/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Merb in Your Home Directory</title>
		<link>http://blog.inquirylabs.com/2008/04/30/installing-merb-in-your-home-directory/</link>
		<comments>http://blog.inquirylabs.com/2008/04/30/installing-merb-in-your-home-directory/#comments</comments>
		<pubDate>Thu, 01 May 2008 04:01:08 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Software Engineering]]></category>

		<category><![CDATA[merb]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=274</guid>
		<description><![CDATA[I have a shared account on a server where Ruby 1.8.5 is installed but Merb is not.  To install gems, I added &#8220;$HOME/lib/ruby/gems/1.8/bin&#8221; to my path, and the following 3 lines to my .profile:
export GEM_HOME=$HOME/lib/ruby/gems/1.8
export RUBYLIB=$HOME/lib/ruby:$HOME/lib/site_ruby/1.8
export RB_USER_INSTALL=true

I had to add the last line because hpricot is a compiled extension that uses the &#8220;install&#8221; command [...]]]></description>
			<content:encoded><![CDATA[<p>I have a shared account on a server where Ruby 1.8.5 is installed but Merb is not.  To install gems, I added &#8220;$HOME/lib/ruby/gems/1.8/bin&#8221; to my path, and the following 3 lines to my .profile:</p>
<pre class="textmate-source mac_classic"><span class="source source_shell"><span class="storage storage_modifier storage_modifier_shell">export</span> GEM_HOME=<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>HOME</span>/lib/ruby/gems/1.8
<span class="storage storage_modifier storage_modifier_shell">export</span> RUBYLIB=<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>HOME</span>/lib/ruby:<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>HOME</span>/lib/site_ruby/1.8
<span class="storage storage_modifier storage_modifier_shell">export</span> RB_USER_INSTALL=true
</span></pre>
<p>I had to add the last line because hpricot is a compiled extension that uses the &#8220;install&#8221; command to put it in the correct directory once it&#8217;s done.  Tip came from <a href="http://d.hatena.ne.jp/mostlyfine/mobile?date=20080414">this site</a>.  Without RB_USER_INSTALL set to true, I received the following error:</p>
<pre class="textmate-source mac_classic"><span class="source source_shell">/usr/bin/install -c -o root -g wheel -m 0755 hpricot_scan.so
install: /&#8230;/hpricot_scan.so: chown/chgrp:
Operation not permitted *** Error code 71
</span></pre>
<p>Next, I installed rubygems:</p>
<pre class="textmate-source"><span class="source source_shell">wget http://rubyforge.org/frs/download.php/20989/\
  rubygems-0.9.4.tgz
tar xzvf rubygems-0.9.4.tgz
cd rubygems-0.9.4

ruby setup.rb all &#8211;prefix=<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>HOME</span> &#8211;siterubyver=<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>HOME</span>\
  /lib/site_ruby/1.8</span></pre>
<p>And last but not least:</p>
<pre class="textmate-source mac_classic"><span class="source source_shell">gem install -y merb</span></pre>
<p>Thanks to <a href="http://ianloic.com/2007/08/29/installing_ruby_gems_in_your_home_directory/">Ian Mckellar</a> for starting me off.</p>
<p><strong>Update:</strong> For the record, the following gems were needed for my project:
<ul>
<li>mongrel (installs fastthread, daemons, gem_plugin, cgi_multipart_eof_fix)</li>
<li>sqlite3-ruby</li>
<li>ruby2ruby (installs ParseTree, RubyInline, hoe, rubyforge</li>
<li>merb_sequel (installs sequel, sequel_core, metaid, sequel_model, assistance)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/30/installing-merb-in-your-home-directory/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What Makes jQuery a Good Choice?</title>
		<link>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/</link>
		<comments>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:55:01 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Software Engineering]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=273</guid>
		<description><![CDATA[jQuery has been around since January of 2006.  Since last year, many developers within the Ruby community have been embracing it as an alternative to Prototype and Scriptaculous.  Lately, I've been working on a browser-based application at a company in Chicago that needs a simple user interface and fairly powerful front-end.  I've advocated the use of jQuery, and thought it would be useful to set out the reasons for my preference here for others as well.]]></description>
			<content:encoded><![CDATA[<link rel="stylesheet" href="/mac_classic_code.css" type="text/css" charset="utf-8">
<p>I&#8217;ve been told that jQuery has been around since January of 2006.  At some point during the last year, many developers within the Ruby community began to embrace it as an alternative to Prototype and Scriptaculous.  Many of the programmer friends I look up to in the Merb community, specifically, are big advocates of jQuery.</p>
<p>So this post is an attempt at summarizing the strengths I&#8217;ve found in jQuery as opposed to the two other javascript libraries that I&#8217;ve worked closely with: <a href="http://mootools.net/">mooTools</a> and <a href="http://www.prototypejs.org/">Prototype</a> / <a href="http://script.aculo.us/">Scriptaculous</a>.  My motivation for this is a soon-to-be-made decision regarding the javascript library that will be used in a browser-based application that I&#8217;m working on at a company in Chicago.  The application needs a simple user interface and fairly powerful front-end.  I&#8217;ve advocated the use of jQuery, and thought it would be useful to set out the reasons for my preference here on the InquiryLabs blog.</p>
<h3>jQuery is well-documented</h3>
<p>There is a fine set of documentation at <a href="http://docs.jquery.com/Main_Page">jquery.com</a>.  Scriptaculous hasn&#8217;t seen much improvement in its documentation in over a year.  Prototype&#8217;s documentation is (in my opinion) pretty, but still lacking.</p>
<h3>jQuery is concise</h3>
<p>It uses as its central paradigm the idea of &#8220;querying&#8221; the DOM for the desired elements and returning a collection (like a dataset, but with DOM elements) and then acting on the result, or set of elements.  The reason it can be concise is that the element sets are chainable.  For example:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="support support_class support_class_js">document</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>ready<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">()</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  <span class="keyword keyword_control keyword_control_js">for</span> <span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">var</span> i <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="constant constant_numeric constant_numeric_js">0</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span> i <span class="keyword keyword_operator keyword_operator_js">&lt;=</span> <span class="constant constant_numeric constant_numeric_js">6</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span> i<span class="keyword keyword_operator keyword_operator_js">++</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span>
    <span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span> <span class="keyword keyword_operator keyword_operator_js">+</span> i <span class="keyword keyword_operator keyword_operator_js">+</span> <span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span> [@id]<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>each<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">()</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
      <span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>&lt;a class=&#8221;anchorlink&#8221;&gt;<span class="constant constant_character constant_character_escape constant_character_escape_js">\u</span>00B6&lt;/a&gt;<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        attr<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>href<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>#<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span> <span class="keyword keyword_operator keyword_operator_js">+</span> <span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_constant support_constant_dom support_constant_dom_js">id</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        attr<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>title<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>Permalink to this headline<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        appendTo<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
    <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
</span></pre>
<p>(Hat tip, <a href="http://lucumr.pocoo.org/articles/why-jquery-is-the-answer">lucumr</a>)  In the above example, anchor tags are added to all headlines in the document.  Note the clever use of chaining which reduces the size of the code, yet retains its expressiveness.</p>
<h3>jQuery is easily extended</h3>
<p>Whether it&#8217;s a simple function or an entire plugin, jQuery is built for extending.  The ability to query for &#8220;element sets&#8221; and then act directly on those results is not limited by the core code.  Since it&#8217;s so easy to add custom functions to element sets, it becomes natural.  For example, I found that I often needed to add or subtract a value from a CSS property.  I solved this problem by extending the jQuery core element set, like so:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="meta meta_function meta_function_js"><span class="support support_class support_class_js">jQuery.fn</span>.<span class="entity entity_name entity_name_function entity_name_function_js">cssDelta</span> = <span class="storage storage_type storage_type_function storage_type_function_js">function</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js">(</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_js">property, delta</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js">)</span></span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  <span class="storage storage_type storage_type_js">var</span> value <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="support support_function support_function_js">parseInt</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>css<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>property<span class="meta meta_brace meta_brace_round meta_brace_round_js">))</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="keyword keyword_control keyword_control_js">return</span> <span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>css<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>property<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>value <span class="keyword keyword_operator keyword_operator_js">+</span> delta<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span> <span class="keyword keyword_operator keyword_operator_js">+</span> <span class="string string_quoted string_quoted_double string_quoted_double_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8220;</span>px<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8220;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
</span></pre>
<p>Using the above code, I can query for a set of elements and adjust the height property (for example) in one fell swoop.  This will now add 5 pixels to the height of each &#8220;rack-item&#8221; element:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>.rack-item<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>cssDelta<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>height<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="constant constant_numeric constant_numeric_js">5</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
</span></pre>
<h3>jQuery is small</h3>
<p>According to <a href="http://www.lullabot.com/audiocast/drupal_podast_no_21_jquery_author_john_resig">Jeff Robbins and John Resig</a>, the Drupal team chose it over Prototype because it is a mere 15k compared to Prototype&#8217;s 80k.  The Dojo library is even larger.</p>
<p><strong>Update:</strong>I decided to test this out myself to see what results I&#8217;d get.  Resig&#8217;s comment was probably from jQuery&#8217;s earlier days when it was a micro framework.  As far as I understand, it&#8217;s still possible to compress the jQuery library down to 18k or so, but that&#8217;s possible for Prototype, too.  In fact, my tests show that un-gzipped, compressed code gets both down to 51k using Dojo&#8217;s <a href="http://dante.dojotoolkit.org/shrinksafe/">ShrinkSafe</a> online app.</p>
<p><strong>Update 2:</strong>Thanks to Peter Higgins below for commenting on the size of Dojo.  For comparison, its compressed (but un-gzipped) size is 77k.</p>
<h3>jQuery has broad acceptance</h3>
<p>Feedburner, Technorati, Drupal, Edgewall Trac, etc.</p>
<h3>Contrasting Prototype</h3>
<p>Here are some examples of the concise nature of jQuery, taken from the <a href="http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/">jQuery blog</a>:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> AJAX Updater in Prototype:
</span>
<span class="meta meta_class meta_class_instance meta_class_instance_constructor"><span class="keyword keyword_operator keyword_operator_new keyword_operator_new_js">new</span> <span class="entity entity_name entity_name_type entity_name_type_instance entity_name_type_instance_js">Ajax.Updater</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>placeholder<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>url<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span> method: <span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>get<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>parameters: par <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> AJAX Updater In jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>#placeholder<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_function support_function_js">load</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>url <span class="keyword keyword_operator keyword_operator_js">+</span> par<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Note: This example doesn’t deal with the obvious
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> iteration benefits we get if we wanted to load the
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> response into every &lt;p&gt; object, for instance.
</span>
<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Adding a class to an element in Prototype:
</span>
Element<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClassName<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Adding a class to an element in jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>#element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClass<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Adding a class to a group of elements in Prototype:
</span>
<span class="keyword keyword_operator keyword_operator_js">$$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>.element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>each<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>node<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  Element<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClassName<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>node<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Adding a class to a group of elements in jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>.element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClass<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
</span></pre>
<p>&#8220;That last one is the clearest example of the difference in methodology. Because jQuery is passing messages to jQuery objects, the code is barely changed. jQuery doesn’t care that we’re now adding a class to a group of objects instead of one object; the underlying code is the same (add the class to the set of elements in the object). Prototype, on the other hand, requires an iterator.&#8221;</p>
<p>&#8220;And as your code becomes more complex, jQuery’s scales easily, while nested loops become the norm in frameworks like Prototype.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hey, Graduate!  I Love You!</title>
		<link>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/</link>
		<comments>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 00:57:25 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=272</guid>
		<description><![CDATA[Extraordinary as it may seem, my loving and persistent wife, Kelty, has finally graduated from BYU!  I&#8217;m so happy for her, and relieved to finally see her on the other side of the divide.  Now we just have to get me over there  
Here&#8217;s a 3-minute video I made for her.  [...]]]></description>
			<content:encoded><![CDATA[<p>Extraordinary as it may seem, my loving and persistent wife, Kelty, has <strong>finally graduated from BYU!</strong>  I&#8217;m so happy for her, and relieved to finally see her on the other side of the divide.  Now we just have to get me over there <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s <a href="http://inquirylabs.com/downloads/ToKelty/">a 3-minute video</a> I made for her.  Feel free to share this moment with us and send her your thoughts!</p>
<p align="center">
<a href="http://inquirylabs.com/downloads/ToKelty/"><img src="http://inquirylabs.com/downloads/ToKelty/KeltyGradVideo.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Notes on the Facets Gem</title>
		<link>http://blog.inquirylabs.com/2008/04/25/notes-on-the-facets-gem/</link>
		<comments>http://blog.inquirylabs.com/2008/04/25/notes-on-the-facets-gem/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 22:41:03 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=271</guid>
		<description><![CDATA[The Facets gem is fairly popular, and for good reason.  I was poking through the documentation on the plane home from Chicago (I have a contract position there for the next month) and found a couple of neat things to share:
Facets library

Autoarray class&#8212;an Array that autovivifies any number of dimensions.  For example:a = [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://facets.rubyforge.org/">Facets gem</a> is fairly popular, and for good reason.  I was poking through the documentation on the plane home from Chicago (I have a contract position there for the next month) and found a couple of neat things to share:</p>
<p><strong>Facets library</strong></p>
<ul>
<li>Autoarray class&mdash;an Array that autovivifies any number of dimensions.  For example:<code>a = Autoarray.new<br />
a[3][4][5] = 1</code>would create a 3-dimensional array with values initialized to &#8216;nil&#8217; and the appropriate cell set to 1.</li>
<li>Dictionary class&mdash;a Hash that retains order.  The order, by default, is whatever order its contents were given in; however, it can also enforce any arbitrary ordering that you provide.</li>
<li>Enumerable extensions&mdash;a (very nice) module that extends the Enumerable mixin.  It&#8217;s huge!  There are so many idioms captured in this that I can&#8217;t explain them all.  But if you like Ruby for it&#8217;s concise syntax and easy chaining of things like &#8216;each&#8217;, &#8216;map&#8217; and &#8217;select&#8217;, you&#8217;ll like what you see in here.</li>
<li>File.rewrite&mdash;open, modify, write back to disk, all in a single ruby block.</li>
<li>FileUtils.head and FileUtils.tail&mdash;handy functions that let you get at the first few or last few lines of a file.</li>
</ul>
<p>There&#8217;s plenty more to look at in the Facets gem&#8230; these are just a few that caught my attention.  Install the gem and then use &#8220;gem server&#8221; to check out the documentation <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/25/notes-on-the-facets-gem/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Did You Know About &#8220;gem server&#8221;?</title>
		<link>http://blog.inquirylabs.com/2008/04/24/did-you-know-about-gem-server/</link>
		<comments>http://blog.inquirylabs.com/2008/04/24/did-you-know-about-gem-server/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 17:47:57 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Software Engineering]]></category>

		<category><![CDATA[gem]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=270</guid>
		<description><![CDATA[I can&#8217;t believe I didn&#8217;t know about this until recently&#8230; it&#8217;s such a gem of a tip.   
If you type &#8220;gem server&#8221; in the shell, you&#8217;ll start a webrick server that&#8217;s listening on port 8808 to dish out all of the help files for your installed ruby gems.  Here&#8217;s a little alias [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe I didn&#8217;t know about this until recently&#8230; it&#8217;s such a gem of a tip.  <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you type &#8220;gem server&#8221; in the shell, you&#8217;ll start a webrick server that&#8217;s listening on port 8808 to dish out all of the help files for your installed ruby gems.  Here&#8217;s a little alias I made that helps me get right to the documentation from the console:</p>
<pre><code>
alias gemdocs="gem server >/dev/null 2>&#038;1 &#038; \
    sleep 0.2 ; open http://localhost:8808"
</code></pre>
<p>Basically, it starts the gem server and ignores the log output.  Next, it waits a fraction of a second for the server to start listening on port 8808, and then uses the Mac OS &#8220;open&#8221; command to open the default browser and points it to the gem server so you can start looking at your documentation.</p>
<p>Having a gem server is Brilliant!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/24/did-you-know-about-gem-server/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
