<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Why You Shouldn&#8217;t Be Clever</title>
	<atom:link href="http://www.johnmyleswhite.com/notebook/2008/08/20/why-you-shouldnt-be-clever/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnmyleswhite.com/notebook/2008/08/20/why-you-shouldnt-be-clever/</link>
	<description>&#34;He who refuses to do arithmetic is doomed to talk nonsense.&#34;</description>
	<lastBuildDate>Thu, 09 Feb 2012 17:17:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: John Myles White</title>
		<link>http://www.johnmyleswhite.com/notebook/2008/08/20/why-you-shouldnt-be-clever/comment-page-1/#comment-17466</link>
		<dc:creator>John Myles White</dc:creator>
		<pubDate>Wed, 03 Sep 2008 02:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmyleswhite.com/?p=3092#comment-17466</guid>
		<description>I&#039;m glad you liked this post, Jason. I agree that clever code using clever algorithms is great, so long as it&#039;s still readable. An amazing example is the regular expression parser featured in the first chapter of O&#039;Reilly&#039;s Beautiful Code. I also think that more sophisticated languages like Prolog, Haskell or even Ruby allow people to write clever, but understandable, code more easily.

And, yes, I&#039;m sure that the overhead of using a regex in the algorithm is a major source of the poor performance, though even an implementation just using direct comparisons of substrings would take longer. If you&#039;ve got Ruby on one of your machines, just try the example calculation with both algorithms above. I can never bring myself to let the first bit of code continue for more than thirty seconds, while the second bit finishes in less than a second.</description>
		<content:encoded><![CDATA[<p>I&#8217;m glad you liked this post, Jason. I agree that clever code using clever algorithms is great, so long as it&#8217;s still readable. An amazing example is the regular expression parser featured in the first chapter of O&#8217;Reilly&#8217;s Beautiful Code. I also think that more sophisticated languages like Prolog, Haskell or even Ruby allow people to write clever, but understandable, code more easily.</p>
<p>And, yes, I&#8217;m sure that the overhead of using a regex in the algorithm is a major source of the poor performance, though even an implementation just using direct comparisons of substrings would take longer. If you&#8217;ve got Ruby on one of your machines, just try the example calculation with both algorithms above. I can never bring myself to let the first bit of code continue for more than thirty seconds, while the second bit finishes in less than a second.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.johnmyleswhite.com/notebook/2008/08/20/why-you-shouldnt-be-clever/comment-page-1/#comment-17465</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 03 Sep 2008 01:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmyleswhite.com/?p=3092#comment-17465</guid>
		<description>I really like this article, and it is a good example of someone trying to save line space at the price of efficiency.

However, clever code that uses clever algorithms and techniques is really wonderful when you see it. I found this quite common when working with small problems in prolog and haskell.

Also, I image the overhead of using a regex in that algorithm was partially responsible for the poor performance.</description>
		<content:encoded><![CDATA[<p>I really like this article, and it is a good example of someone trying to save line space at the price of efficiency.</p>
<p>However, clever code that uses clever algorithms and techniques is really wonderful when you see it. I found this quite common when working with small problems in prolog and haskell.</p>
<p>Also, I image the overhead of using a regex in that algorithm was partially responsible for the poor performance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.205 seconds -->

