<?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>Code BendersCode | Agile Software Development | </title>
	<atom:link href="http://www.codebenders.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codebenders.com</link>
	<description>Agile Software Developers</description>
	<lastBuildDate>Wed, 01 Feb 2012 20:40:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Preventing Recursion in Ruby</title>
		<link>http://www.codebenders.com/code/preventing-recursion-in-ruby/</link>
		<comments>http://www.codebenders.com/code/preventing-recursion-in-ruby/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 16:54:06 +0000</pubDate>
		<dc:creator>avdi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=1135</guid>
		<description><![CDATA[Sometimes you need to prevent code from executing recursively. I had to do this recently in order to prevent an infinite recursion in ActiveRecord callbacks. A before-save hook needed to save a parent model attribute, which because of an :autosave option would then try to save the child model, which would then try to save [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to prevent code from executing recursively. I had to do this recently in order to prevent an infinite recursion in ActiveRecord callbacks. A before-save hook needed to save a parent model attribute, which because of an <span style="font-family: monospace;color: white">:autosave</span> option would then try to save the child model, which would then try to save the parent… and so on until the stack overflowed.</p>
<p>Unless the method is directly calling itself, the only way to short-circuit a method when it recurses is to have it set some global flag which it can then check in recursive calls. If the flag is already set, the recursively called method bails out early. Once the original invocation is finished it unsets the flag.</p>
<p>It&#8217;s not safe to use a true global variable for this flag, since this would not be threadsafe. The safe way to do it (albeit not a terribly pretty one) is to use thread-local variables.</p>
<p>I decided to go ahead and write a macro which can turn any method into a non-recursive one. Here&#8217;s the code:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">module</span> RecursionHelpers<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> prevent_recursion<span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; flag_name = <span style="color:#996600;">&quot;in:#{name}##{method_name}&quot;</span><br />
&nbsp; &nbsp; original = instance_method<span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span><br />
<br />
&nbsp; &nbsp; define_method<span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|*</span>args<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">begin</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; original.<span style="color:#9900CC;">bind</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">ensure</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>Let&#8217;s take a closer look at that.</p>
<p>The method takes an argument, <span style="font-family: monospace;color: white">method_name</span>, which is the name of the method to make non-recursive.</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">prevent_recursion</span><span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>Then it creates a name for the recursion flag. Since thread-local variables are global for the whole thread, we need a variable name which is reasonably unique. We get one by combining the current class and the method name.</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">flag_name = <span style="color:#996600;">&quot;in:#{name}##{method_name}&quot;</span></div></div>
<p>We&#8217;re going to replace the method with a modified version, so we need to stash the original implementation somewhere. We grab an <span style="font-family: monospace;color: white">UnboundMethod</span> object by calling <span style="font-family: monospace;color: white">#instance_method()</span> on the current class:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">original = instance_method<span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>Then we proceed to redefine the method:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define_method<span style="color:#006600; font-weight:bold;">&#40;</span>method_name<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|*</span>args<span style="color:#006600; font-weight:bold;">|</span></div></div>
<p>The first thing the modified method does is check to see if the recursion flag is set. If it is, it bails out.</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span></div></div>
<p>Otherwise, it sets the flag:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span></div></div>
<p>And then it binds the <span style="font-family: monospace;color: white">UnboundMethod</span> stored in <span style="font-family: monospace;color: white">original</span> to the current instance. This generates a <span style="font-family: monospace;color: white">Method</span> instance, which it proceeds to call, passing any arguments along.</p>
<p>(Note that I wrote this code for a Ruby 1.8 codebase. If it were for 1.9 I would pass the <span style="font-family: monospace;color: white">&amp;block</span> down to the original as well. Since blocks in 1.8 can&#8217;t accept <span style="font-family: monospace;color: white">&amp;block</span> arguments, I can&#8217;t do that here so long as I&#8217;m using the block form of <span style="font-family: monospace;color: white">define_method</span>. So this macro will only work for methods which do not take blocks.)</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">original.<span style="color:#9900CC;">bind</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>Finally, the code ensures that the recursion flag will be unset when the method is finished, even if an exception is raised.</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">ensure</span><br />
&nbsp; <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span>flag_name<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>Note that setting a thread-local variable to <span style="font-family: monospace;color: white">nil</span> removes it:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span>.<span style="color:#9900CC;">keys</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># =&gt; []</span><br />
<span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:foo</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006666;">42</span><br />
<span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span>.<span style="color:#9900CC;">keys</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># =&gt; [:foo, :__inspect_key__]</span><br />
<span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:foo</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span><br />
<span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">current</span>.<span style="color:#9900CC;">keys</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># =&gt; [:__inspect_key__]</span></div></div>
<p>I have no idea what <span style="font-family: monospace;color: white">:__inspect_key__</span> is, but as you can see the <span style="font-family: monospace;color: white">:foo</span> key goes away after setting it to nil.</p>
<p>Let&#8217;s take a look at this in practice. Here&#8217;s are two methods <span style="font-family: monospace;color: white">#foo</span> and <span style="font-family: monospace;color: white">#bar</span> (original, no?). <span style="font-family: monospace;color: white">#foo</span> is recursive, with <span style="font-family: monospace;color: white">#bar</span> as an intermediary, preventing it from passing a recursion flag directly to itself.</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> X<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> foo<br />
&nbsp; &nbsp; bar<br />
&nbsp; &nbsp; <span style="color:#996600;">&quot;foo done&quot;</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> bar<br />
&nbsp; &nbsp; foo<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>Calling the <span style="font-family: monospace;color: white">#foo</span> method results in a stack overflow:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'./prevent-recursion.rb'</span><br />
<br />
X.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">foo</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> $! <span style="color:#008000; font-style:italic;"># =&gt; #&lt;SystemStackError: stack level too deep&gt;</span></div></div>
<p>But if we update the method with <span style="font-family: monospace;color: white">prevent_recursion</span>, it successfully exits:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'./prevent-recursion.rb'</span><br />
<br />
<span style="color:#9966CC; font-weight:bold;">class</span> X<br />
&nbsp; extend RecursionHelpers<br />
<br />
&nbsp; prevent_recursion <span style="color:#ff3333; font-weight:bold;">:foo</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
X.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">foo</span> <span style="color:#008000; font-style:italic;"># =&gt; &quot;foo done&quot;</span></div></div>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Preventing+Recursion+in+Ruby+-+http://goo.gl/SO7ZY&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/preventing-recursion-in-ruby/&amp;title=Preventing+Recursion+in+Ruby&amp;summary=Sometimes%20you%20need%20to%20prevent%20code%20from%20executing%20recursively.%20I%20had%20to%20do%20this%20recently%20in%20order%20to%20prevent%20an%20infinite%20recursion%20in%20ActiveRecord%20callbacks.%20A%20before-save%20hook%20needed%20to%20save%20a%20parent%20model%20attribute%2C%20which%20because%20of%20an%20%3Aautosave%20option%20would%20then%20try%20to%20save%20the%20child%20model%2C%20which&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/preventing-recursion-in-ruby/&amp;t=Preventing+Recursion+in+Ruby" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/preventing-recursion-in-ruby/&amp;title=Preventing+Recursion+in+Ruby" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/preventing-recursion-in-ruby/&amp;title=Preventing+Recursion+in+Ruby" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Preventing%20Recursion%20in%20Ruby%22&amp;body=Link:%20http://www.codebenders.com/code/preventing-recursion-in-ruby/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20Sometimes%20you%20need%20to%20prevent%20code%20from%20executing%20recursively.%20I%20had%20to%20do%20this%20recently%20in%20order%20to%20prevent%20an%20infinite%20recursion%20in%20ActiveRecord%20callbacks.%20A%20before-save%20hook%20needed%20to%20save%20a%20parent%20model%20attribute%2C%20which%20because%20of%20an%20%3Aautosave%20option%20would%20then%20try%20to%20save%20the%20child%20model%2C%20which" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/preventing-recursion-in-ruby/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/preventing-recursion-in-ruby/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Interview with Avdi Grimm, author of &#8220;Exceptional Ruby&#8221;</title>
		<link>http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/</link>
		<comments>http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 00:30:52 +0000</pubDate>
		<dc:creator>Taus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=1044</guid>
		<description><![CDATA[Miles Forrest interviews Avdi Grimm on his new book &#8220;Exceptional Ruby&#8221;. Dealing with unexpected failures in code is tough, and oftentimes error processing is dealt with in a haphazard way. Hear the 5 questions you need to ask before writing code to handle unexpected failures, as well as his story about a cascading failure that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1029" title="avdi" src="http://www.codebenders.com/wp-content/uploads/2011/06/avdi.png" alt="Avdi Grimm" width="176" height="200" /></p>
<p>Miles Forrest interviews Avdi Grimm on his new book &#8220;Exceptional Ruby&#8221;. Dealing with unexpected failures in code is tough, and oftentimes error processing is dealt with in a haphazard way. Hear the 5 questions you need to ask before writing code to handle unexpected failures, as well as his story about a cascading failure that went from bad to worse.</p>
<p>You can listen to the interview and purchase &#8220;Exceptional Ruby&#8221; on the <a href="http://pragprog.com/podcasts/show/37">Pragmatic Bookshelf website</a>.</p>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Interview+with+Avdi+Grimm%2C+author+of+%22Exceptional+Ruby%22+-+http://goo.gl/XksNR&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/&amp;title=Interview+with+Avdi+Grimm%2C+author+of+%22Exceptional+Ruby%22&amp;summary=%0D%0A%0D%0AMiles%20Forrest%20interviews%20Avdi%20Grimm%20on%20his%20new%20book%20%22Exceptional%20Ruby%22.%20Dealing%20with%20unexpected%20failures%20in%20code%20is%20tough%2C%20and%20oftentimes%20error%20processing%20is%20dealt%20with%20in%20a%20haphazard%20way.%20Hear%20the%205%20questions%20you%20need%20to%20ask%20before%20writing%20code%20to%20handle%20unexpected%20failures%2C%20as%20well%20as%20his%20stor&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/&amp;t=Interview+with+Avdi+Grimm%2C+author+of+%22Exceptional+Ruby%22" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/&amp;title=Interview+with+Avdi+Grimm%2C+author+of+%22Exceptional+Ruby%22" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/&amp;title=Interview+with+Avdi+Grimm%2C+author+of+%22Exceptional+Ruby%22" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Interview%20with%20Avdi%20Grimm%2C%20author%20of%20%22Exceptional%20Ruby%22%22&amp;body=Link:%20http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20%0D%0A%0D%0AMiles%20Forrest%20interviews%20Avdi%20Grimm%20on%20his%20new%20book%20%22Exceptional%20Ruby%22.%20Dealing%20with%20unexpected%20failures%20in%20code%20is%20tough%2C%20and%20oftentimes%20error%20processing%20is%20dealt%20with%20in%20a%20haphazard%20way.%20Hear%20the%205%20questions%20you%20need%20to%20ask%20before%20writing%20code%20to%20handle%20unexpected%20failures%2C%20as%20well%20as%20his%20stor" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/interview-with-avdi-grimm-author-of-exceptional-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hate Legacy Apps? Then You&#8217;ll Love DataMapper</title>
		<link>http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/</link>
		<comments>http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 03:45:31 +0000</pubDate>
		<dc:creator>Taus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[DataMapper]]></category>
		<category><![CDATA[Engine Yard]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=970</guid>
		<description><![CDATA[Ruby on Rails makes it easy to bootstrap a greenfield project. Unfortunately not all projects are greenfield, so sometimes you need to work with a legacy database schema. ActiveRecord is a great choice when you have a full control over your database from the very beginning, but what should you do if you need to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codebenders.com/wp-content/uploads/2011/05/DataMapper.png"><img class="alignright size-full wp-image-974" title="DataMapper" src="http://www.codebenders.com/wp-content/uploads/2011/05/DataMapper.png" alt="DataMapper" width="356" height="107" /></a>Ruby on Rails makes it easy to bootstrap a greenfield project. Unfortunately not all projects are greenfield, so sometimes you need to work with a legacy database schema. ActiveRecord is a great choice when you have a full control over your database from the very beginning, but what should you do if you need to connect to a database with a schema that isn’t in-line with Rails conventions?</p>
<p><a href="http://datamapper.org/">DataMapper</a> Core Contributor and Code Benders team member, <a href="http://www.codebenders.com/people/piotr-solnica/">Piotr Solnica</a>, has written a great blog post for our partner <a href="http://www.engineyard.com">Engine Yard</a> entitled <a title="Using DataMapper and Rails with Legacy Schemas" href="http://www.engineyard.com/blog/2011/using-datamapper-and-rails-with-legacy-schemas/"><em><strong>Using DataMapper and Rails with Legacy Schemas</strong></em></a>. Read it and you can say goodbye to your fear of inheriting a legacy app.</p>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Hate+Legacy+Apps%3F+Then+You%27ll+Love+DataMapper+-+http://goo.gl/mKTLc&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/&amp;title=Hate+Legacy+Apps%3F+Then+You%27ll+Love+DataMapper&amp;summary=Ruby%20on%20Rails%20makes%20it%20easy%20to%20bootstrap%20a%20greenfield%20project.%20Unfortunately%20not%20all%20projects%20are%20greenfield%2C%20so%20sometimes%20you%20need%20to%20work%20with%20a%20legacy%20database%20schema.%20ActiveRecord%20is%20a%20great%20choice%20when%20you%20have%20a%20full%20control%20over%20your%20database%20from%20the%20very%20beginning%2C%20but%20what%20should%20you%20do%20if&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/&amp;t=Hate+Legacy+Apps%3F+Then+You%27ll+Love+DataMapper" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/&amp;title=Hate+Legacy+Apps%3F+Then+You%27ll+Love+DataMapper" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/&amp;title=Hate+Legacy+Apps%3F+Then+You%27ll+Love+DataMapper" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Hate%20Legacy%20Apps%3F%20Then%20You%27ll%20Love%20DataMapper%22&amp;body=Link:%20http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20Ruby%20on%20Rails%20makes%20it%20easy%20to%20bootstrap%20a%20greenfield%20project.%20Unfortunately%20not%20all%20projects%20are%20greenfield%2C%20so%20sometimes%20you%20need%20to%20work%20with%20a%20legacy%20database%20schema.%20ActiveRecord%20is%20a%20great%20choice%20when%20you%20have%20a%20full%20control%20over%20your%20database%20from%20the%20very%20beginning%2C%20but%20what%20should%20you%20do%20if" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/hate-legacy-apps-then-youll-love-datamapper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Congratulations, Piotr!</title>
		<link>http://www.codebenders.com/code/congratulations-piotr/</link>
		<comments>http://www.codebenders.com/code/congratulations-piotr/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 20:21:24 +0000</pubDate>
		<dc:creator>Taus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[DataMapper]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=836</guid>
		<description><![CDATA[Piotr Solnica, one of our team members, has just been added to the DataMapper Core Team.  Dan Kubb, the team lead, wrote: &#8220;Piotr has been involved in DataMapper for several years now, and has been doing some amazing work on the DataMapper Property API, heading up our CI server configuration and many other areas&#8230; he&#8217;s been extremely helpful inside [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codebenders.com/people/piotr-solnica/"><img class="alignright" title="Piotr Solnica" src="http://www.codebenders.com/wp-content/themes/codebenders2/images/solnica.png" alt="" width="168" height="190" /></a><a title="Piotr Solnica" href="http://www.codebenders.com/people/piotr-solnica/">Piotr Solnica</a>, one of our team members, has just been added to the <a title="DataMapper" href="http://datamapper.org/">DataMapper</a> Core Team.  <a title="Dan Kubb" href="http://twitter.com/dkubb">Dan Kubb</a>, the team lead, <a href="http://groups.google.com/group/datamapper/browse_thread/thread/beaa97bfc8b2dc13?pli=1">wrote</a>:</p>
<p>&#8220;Piotr has been involved in DataMapper for several years now, and has been doing some amazing work on the DataMapper Property API, heading up our CI server configuration and many other areas&#8230; he&#8217;s been extremely helpful inside the channel and out.&#8221;</p>
<p>Congrats, Piotr&#8230; nicely done!</p>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Congratulations%2C+Piotr%21+-+http://goo.gl/1afoH&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/congratulations-piotr/&amp;title=Congratulations%2C+Piotr%21&amp;summary=Piotr%20Solnica%2C%20one%20of%20our%20team%20members%2C%20has%20just%20been%20added%C2%A0to%20the%20DataMapper%20Core%C2%A0Team.%20%C2%A0Dan%20Kubb%2C%20the%20team%20lead%2C%20wrote%3A%0D%0A%0D%0A%22Piotr%20has%20been%20involved%20in%20DataMapper%20for%20several%20years%20now%2C%20and%20has%C2%A0been%20doing%20some%20amazing%20work%20on%20the%20DataMapper%20Property%20API%2C%20heading%C2%A0up%20our%20CI%20server%20configuration%20&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/congratulations-piotr/&amp;t=Congratulations%2C+Piotr%21" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/congratulations-piotr/&amp;title=Congratulations%2C+Piotr%21" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/congratulations-piotr/&amp;title=Congratulations%2C+Piotr%21" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Congratulations%2C%20Piotr%21%22&amp;body=Link:%20http://www.codebenders.com/code/congratulations-piotr/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20Piotr%20Solnica%2C%20one%20of%20our%20team%20members%2C%20has%20just%20been%20added%C2%A0to%20the%20DataMapper%20Core%C2%A0Team.%20%C2%A0Dan%20Kubb%2C%20the%20team%20lead%2C%20wrote%3A%0D%0A%0D%0A%22Piotr%20has%20been%20involved%20in%20DataMapper%20for%20several%20years%20now%2C%20and%20has%C2%A0been%20doing%20some%20amazing%20work%20on%20the%20DataMapper%20Property%20API%2C%20heading%C2%A0up%20our%20CI%20server%20configuration%20" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/congratulations-piotr/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/congratulations-piotr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Security Plugin for Rackspace Cloud Sites</title>
		<link>http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/</link>
		<comments>http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 20:39:03 +0000</pubDate>
		<dc:creator>Taus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=694</guid>
		<description><![CDATA[Anyone that manages a WordPress site knows that it can be a bit of a challenge to maintain site security. And, if you are managing a lot of them it can be quite an effort. Today, I found myself cleaning out a site that had been the subject of a malicious attack. And  after securing [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone that manages a WordPress site knows that it can be a bit of a challenge to maintain site security. And, if you are managing a lot of them it can be quite an effort.</p>
<p>Today, I found myself cleaning out a site that had been the subject of a malicious attack. And  after securing the site, I came across a new WP plugin that is designed to scan and secure WordPress sites that are being hosted on Rackspace Cloud Sites.</p>
<p>The scanner automatically checks file permissions and provides a on-click correction for permissions. It also scans all of your posts for malicious code such as posts containing base64_decode (or edoced_46esab), script tags, hidden css elements or iframes.</p>
<p><a href="http://www.codebenders.com/wp-content/uploads/2010/07/JW-scanner.png"><img class="aligncenter size-full wp-image-698" title="WordPress Security Scanner" src="http://www.codebenders.com/wp-content/uploads/2010/07/JW-scanner.png" alt="" width="500" /></a></p>
<p style="text-align: center;">
<p>So check out the <a title="WordPress Security Scanner" href="http://wordpress.org/extend/plugins/jw-cloud-sites-wp-scanner/">JW Cloud Sites Scanner</a> and send <a title="Vermont Web Developer" href="http://jacksonwhelan.com/">Jackson Whelan</a> a big thanks (and donation if he gets that going)&#8230; thanks Jackson!</p>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=WordPress+Security+Plugin+for+Rackspace+Cloud+Sites+-+http://goo.gl/623XG&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/&amp;title=WordPress+Security+Plugin+for+Rackspace+Cloud+Sites&amp;summary=Anyone%20that%20manages%20a%20WordPress%20site%20knows%20that%20it%20can%20be%20a%20bit%20of%20a%20challenge%20to%20maintain%20site%20security.%20And%2C%20if%20you%20are%20managing%20a%20lot%20of%20them%20it%20can%20be%20quite%20an%20effort.%0D%0A%0D%0AToday%2C%20I%20found%20myself%20cleaning%20out%20a%20site%20that%20had%20been%20the%20subject%20of%20a%20malicious%20attack.%20And%20%C2%A0after%20securing%20the%20site%2C%20I%20c&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/&amp;t=WordPress+Security+Plugin+for+Rackspace+Cloud+Sites" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/&amp;title=WordPress+Security+Plugin+for+Rackspace+Cloud+Sites" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/&amp;title=WordPress+Security+Plugin+for+Rackspace+Cloud+Sites" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22WordPress%20Security%20Plugin%20for%20Rackspace%20Cloud%20Sites%22&amp;body=Link:%20http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20Anyone%20that%20manages%20a%20WordPress%20site%20knows%20that%20it%20can%20be%20a%20bit%20of%20a%20challenge%20to%20maintain%20site%20security.%20And%2C%20if%20you%20are%20managing%20a%20lot%20of%20them%20it%20can%20be%20quite%20an%20effort.%0D%0A%0D%0AToday%2C%20I%20found%20myself%20cleaning%20out%20a%20site%20that%20had%20been%20the%20subject%20of%20a%20malicious%20attack.%20And%20%C2%A0after%20securing%20the%20site%2C%20I%20c" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/wordpress-security-plugin-for-rackspace-cloud-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Highlighting</title>
		<link>http://www.codebenders.com/code/code-highlighting/</link>
		<comments>http://www.codebenders.com/code/code-highlighting/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 18:01:21 +0000</pubDate>
		<dc:creator>Taus</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.codebenders.com/?p=37</guid>
		<description><![CDATA[Testing CodeColorer, the code highlighting plugin&#8230; # Everything, including a literal, is an object, so this works: -199.abs &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;# 199 &#34;ruby is cool&#34;.length &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Testing <a title="CodeColorer for WordPress" href="http://wordpress.org/extend/plugins/codecolorer/">CodeColorer</a>, the code highlighting plugin&#8230;</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:629px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># Everything, including a literal, is an object, so this works:</span><br />
<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">199</span>.<span style="color:#9900CC;">abs</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#008000; font-style:italic;"># 199</span><br />
<span style="color:#996600;">&quot;ruby is cool&quot;</span>.<span style="color:#9900CC;">length</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># 12</span><br />
<span style="color:#996600;">&quot;Your mother is nice.&quot;</span>.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;u&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># 2</span><br />
<span style="color:#996600;">&quot;Nice Day Isn't It?&quot;</span>.<span style="color:#9900CC;">downcase</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">sort</span>.<span style="color:#9900CC;">uniq</span>.<span style="color:#9900CC;">join</span> &nbsp;<span style="color:#008000; font-style:italic;"># &quot; '?acdeinsty&quot;</span></div></div>
<p>Nice&#8230; <a title="CodeColorer Instructions" href="http://wordpress.org/extend/plugins/codecolorer/installation/">Instructions are here</a>.</p>


<div class="shr-bookmarks shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Code+Highlighting+-+http://goo.gl/5V0ie&amp;source=shareaholic" rel="" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.codebenders.com/code/code-highlighting/&amp;title=Code+Highlighting&amp;summary=Testing%20CodeColorer%2C%20the%20code%20highlighting%20plugin...%0D%0A%0D%0A%5Bcc%20lang%3D%22ruby%22%5D%0D%0A%23%20Everything%2C%20including%20a%20literal%2C%20is%20an%20object%2C%20so%20this%20works%3A%0D%0A-199.abs%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20199%0D%0A%22ruby%20is%20cool%22.length%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%2012%0D%0A%22Your%20mother%20is%20nice.%22.index%28%22u%22%29%20%20%20&amp;source=Code%20Benders" rel="" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.codebenders.com/code/code-highlighting/&amp;t=Code+Highlighting" rel="" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.codebenders.com/code/code-highlighting/&amp;title=Code+Highlighting" rel="" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.codebenders.com/code/code-highlighting/&amp;title=Code+Highlighting" rel="" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Code%20Highlighting%22&amp;body=Link:%20http://www.codebenders.com/code/code-highlighting/%20(sent%20via%20shareaholic)%0D%0A%0D%0A----%0D%0A%20Testing%20CodeColorer%2C%20the%20code%20highlighting%20plugin...%0D%0A%0D%0A%5Bcc%20lang%3D%22ruby%22%5D%0D%0A%23%20Everything%2C%20including%20a%20literal%2C%20is%20an%20object%2C%20so%20this%20works%3A%0D%0A-199.abs%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20199%0D%0A%22ruby%20is%20cool%22.length%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%2012%0D%0A%22Your%20mother%20is%20nice.%22.index%28%22u%22%29%20%20%20" rel="" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.codebenders.com/code/code-highlighting/feed" rel="" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codebenders.com/code/code-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.codebenders.com @ 2012-02-05 08:50:08 -->
