<?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>TJ Singleton</title>
	<atom:link href="http://tjsingleton.name/feed/" rel="self" type="application/rss+xml" />
	<link>http://tjsingleton.name</link>
	<description>Software Engineer, Baptist Preacher</description>
	<lastBuildDate>Thu, 01 Jul 2010 17:28:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Optimize Legibility with CSS</title>
		<link>http://tjsingleton.name/2010/07/optimize-legibility-with-css/</link>
		<comments>http://tjsingleton.name/2010/07/optimize-legibility-with-css/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:54:26 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=307</guid>
		<description><![CDATA[Love the new support for text-rendering. Cross-browser kerning-pairs &#038; ligatures]]></description>
			<content:encoded><![CDATA[<p>Love the new support for text-rendering. <a href="http://www.aestheticallyloyal.com/public/optimize-legibility">Cross-browser kerning-pairs &#038; ligatures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/07/optimize-legibility-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MountainWest RubyConf 2010 Videos</title>
		<link>http://tjsingleton.name/2010/07/mountainwest-rubyconf-2010-videos/</link>
		<comments>http://tjsingleton.name/2010/07/mountainwest-rubyconf-2010-videos/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:41:20 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=319</guid>
		<description><![CDATA[Confreaks has been releasing videos of the MountainWest RubyConf. I love me some Confreaks.]]></description>
			<content:encoded><![CDATA[<p>Confreaks has been releasing <a href="http://mwrc2010.confreaks.com/">videos of the MountainWest RubyConf</a>. I love me some Confreaks.</p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/07/mountainwest-rubyconf-2010-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regex Result Access Benchmark</title>
		<link>http://tjsingleton.name/2010/07/regex-result-access-benchmark/</link>
		<comments>http://tjsingleton.name/2010/07/regex-result-access-benchmark/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 08:35:32 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=310</guid>
		<description><![CDATA[The question came on forrst.com about which of the following two styles of accessing the results of a regex match were preferred: &#34;qqq100601.txt&#34;&#91;/\A&#40;&#91;a-z&#93;+&#41;/, 1&#93; &#34;qqq100601.txt&#34;.match&#40;/\A&#40;&#91;a-z&#93;+&#41;/&#41;&#91;0&#93; So I benchmarked it and was surprised that there was such a difference in the performance. Except on jruby, the array style access is the clear winner. Benchmark and Raw [...]]]></description>
			<content:encoded><![CDATA[<p>The question came on <a href="http://forrst.com">forrst.com</a> about which of the following two styles of accessing the results of a regex match were preferred:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#996600;">&quot;qqq100601.txt&quot;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">/</span>\A<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>z<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#996600;">&quot;qqq100601.txt&quot;</span>.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\A<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>z<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>

<p>So I benchmarked it and was surprised that there was such a difference in the performance. Except on jruby, the array style access is the clear winner.</p>
<p><a href="http://tjsingleton.name/wp-content/uploads/2010/07/Screen-shot-2010-07-01-at-4.23.46-AM.png"><img class="alignnone size-full wp-image-311" title="Graph of Results" src="http://tjsingleton.name/wp-content/uploads/2010/07/Screen-shot-2010-07-01-at-4.23.46-AM.png" alt="" width="545" height="408" /></a></p>
<p><a href="http://gist.github.com/459719">Benchmark and Raw Results</a></p>
<p><strong id="update">Update</strong> I went ahead and ran this through <a href="http://gist.github.com/459719#file_3_ruby_prof.txt">RubyProf</a> in 1.8.7. It turns out that #[/REGEXP/] is optimized to one method call and doesn't instantiate the MatchData object. String#match is delegated to Regexp which instantiates MatchData and then accesses the result for a total of 3 method calls. So the real savings is less object churn and method calls. </p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/07/regex-result-access-benchmark/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lisp-like Ruby</title>
		<link>http://tjsingleton.name/2010/06/lisp-like-ruby/</link>
		<comments>http://tjsingleton.name/2010/06/lisp-like-ruby/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:47:57 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=308</guid>
		<description><![CDATA[Gregory Brown had an fun tweet demonstrating a SICP example in both clojure and ruby. The code]]></description>
			<content:encoded><![CDATA[<p>Gregory Brown had an fun <a href="http://twitter.com/seacreature/status/17425701811">tweet</a> demonstrating a <a href="http://mitpress.mit.edu/sicp/">SICP</a> example in both clojure and ruby.</p>
<p><a href="http://pastie.org/1025245">The code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/lisp-like-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your first app ui</title>
		<link>http://tjsingleton.name/2010/06/your-first-app-ui/</link>
		<comments>http://tjsingleton.name/2010/06/your-first-app-ui/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 02:11:27 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=305</guid>
		<description><![CDATA[This stings a bit, but only because you know it's true. Simplicity]]></description>
			<content:encoded><![CDATA[<p>This stings a bit, but only because you know it's true. <a href="http://tumblog.themeforest.net/post/737941844/simplicity-what-we-can-learn-about-usability">Simplicity</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/your-first-app-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter&#8217;s Snowflake</title>
		<link>http://tjsingleton.name/2010/06/twitters-snowflake/</link>
		<comments>http://tjsingleton.name/2010/06/twitters-snowflake/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 15:26:49 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=300</guid>
		<description><![CDATA[When you have data at the size and coming at the rate of twitter, even the "little things" are a challenge. Twitter's snowflake is the internal service it uses to generate unique ID's for tweets.]]></description>
			<content:encoded><![CDATA[<p>When you have data at the size and coming at the rate of twitter, even the "little things" are a challenge. <a href="http://engineering.twitter.com/2010/06/announcing-snowflake.html">Twitter's snowflake</a> is the internal service it uses to generate unique ID's for tweets. </p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/twitters-snowflake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Rules of Agile Estimation</title>
		<link>http://tjsingleton.name/2010/06/the-rules-of-agile-estimation/</link>
		<comments>http://tjsingleton.name/2010/06/the-rules-of-agile-estimation/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 15:19:30 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=297</guid>
		<description><![CDATA["1. Estimates are always wrong", so true. Read the reset on Rails Test Prescriptions Blog]]></description>
			<content:encoded><![CDATA[<p>"1. Estimates are always wrong", so true. Read the reset on<br />
<a href="http://railsrx.com/2010/05/13/may-13-2010-the-rules-of-agile-estimation/?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%253A+railsprescriptions+%2528Rails+Prescriptions+24+Hour+Window+Blog%2529">Rails Test Prescriptions Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/the-rules-of-agile-estimation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One of the hardest thing in computer science</title>
		<link>http://tjsingleton.name/2010/06/role-suggesting-name/</link>
		<comments>http://tjsingleton.name/2010/06/role-suggesting-name/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 04:44:14 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=294</guid>
		<description><![CDATA[...is naming things. An older, but timeless post on naming. Role Suggesting Name]]></description>
			<content:encoded><![CDATA[<p>...is naming things. An older, but timeless post on naming.</p>
<p><a href="http://robots.thoughtbot.com/post/191132156/role-suggesting-name">Role Suggesting Name</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/role-suggesting-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing as contract</title>
		<link>http://tjsingleton.name/2010/06/testing-as-contract/</link>
		<comments>http://tjsingleton.name/2010/06/testing-as-contract/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 04:28:14 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Clips]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=289</guid>
		<description><![CDATA[Here is an intriguing post that asks the question, "Should the best developers in a team write the interfaces and all of the unit tests that exercise the interfaces and let everyone else code until the tests pass?" Testing as Contract]]></description>
			<content:encoded><![CDATA[<p>Here is an intriguing post that asks the question, "Should the best  developers in a team write the interfaces and all of the unit tests that exercise the interfaces and let everyone else code until the tests pass?"</p>
<p><a href="http://www.pragprog.com/magazines/2010-03/testing-as-contract ">Testing as Contract</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/testing-as-contract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dave Thomas on the Ruby Object Model</title>
		<link>http://tjsingleton.name/2010/06/dave-on-ruby-object-model/</link>
		<comments>http://tjsingleton.name/2010/06/dave-on-ruby-object-model/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 23:30:07 +0000</pubDate>
		<dc:creator>TJ Singleton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tjsingleton.name/?p=287</guid>
		<description><![CDATA[Was reminded today of this great video presentation by Dave Thomas from Scotland on Rails 2009 on the Ruby object model.]]></description>
			<content:encoded><![CDATA[<p>Was reminded today of this great video presentation by Dave Thomas from <a href="http://www.rubyinside.com/scotland-on-rails-presentations-now-online-27-awesome-videos-1799.html">Scotland on Rails 2009</a> on the <a href="http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SOR.mp4">Ruby object model.</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://tjsingleton.name/2010/06/dave-on-ruby-object-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SOR.mp4" length="285514197" type="video/mp4" />
		</item>
	</channel>
</rss>
