<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: On Beauty in Code</title>
	<atom:link href="http://avdi.org/devblog/2008/04/27/on-beauty-in-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/</link>
	<description>"...the three great virtues of a programmer: laziness, impatience, and hubris." -- Larry Wall</description>
	<lastBuildDate>Wed, 03 Mar 2010 21:56:22 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Friendly patterns and algorithms &#124; The beauty of software development</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-652</link>
		<dc:creator>Friendly patterns and algorithms &#124; The beauty of software development</dc:creator>
		<pubDate>Wed, 27 May 2009 19:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-652</guid>
		<description>[...] noteworth texts from the small to the large include a decent blog post, On Beauty in Code; a presentation on how to go about writing beautiful code (in PHP of all things!); and of course [...]</description>
		<content:encoded><![CDATA[<p>[...] noteworth texts from the small to the large include a decent blog post, On Beauty in Code; a presentation on how to go about writing beautiful code (in <span class="caps">PHP </span>of all things!); and of course [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kabari</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-66</link>
		<dc:creator>Kabari</dc:creator>
		<pubDate>Mon, 19 May 2008 00:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-66</guid>
		<description>@PIERS and @RONNY the article isn&#039;t about the functionality, it&#039;s about effectively placing and using methods. Ramaze routing is regex based, not key based like Rails etc, that is why some of things you both are mentioning aren&#039;t there.</description>
		<content:encoded><![CDATA[<p>@PIERS and @RONNY the article isn&#8217;t about the functionality, it&#8217;s about effectively placing and using methods. Ramaze routing is regex based, not key based like Rails etc, that is why some of things you both are mentioning aren&#8217;t there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kabari</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-145</link>
		<dc:creator>Kabari</dc:creator>
		<pubDate>Sun, 18 May 2008 22:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-145</guid>
		<description>@PIERS and @RONNY the article isn&#039;t about the functionality, it&#039;s about effectively placing and using methods. Ramaze routing is regex based, not key based like Rails etc, that is why some of things you both are mentioning aren&#039;t there.</description>
		<content:encoded><![CDATA[<p>@PIERS and @RONNY the article isn&#39;t about the functionality, it&#39;s about effectively placing and using methods. Ramaze routing is regex based, not key based like Rails etc, that is why some of things you both are mentioning aren&#39;t there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silvermonkey</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-61</link>
		<dc:creator>Silvermonkey</dc:creator>
		<pubDate>Tue, 29 Apr 2008 09:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-61</guid>
		<description>10 PRINT &quot;DISCO DUMP!&quot;
20 GOTO 10

Now that ladies is beauty!</description>
		<content:encoded><![CDATA[<p>10 <span class="caps">PRINT </span>&#8220;DISCO <span class="caps">DUMP</span>!&#8221;<br />
20 <span class="caps">GOTO</span> 10</p>
<p>Now that ladies is beauty!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronny Pfannschmidt</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-59</link>
		<dc:creator>Ronny Pfannschmidt</dc:creator>
		<pubDate>Tue, 29 Apr 2008 08:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-59</guid>
		<description>imho this implementation lacks a very important feature

generating a url from a rule + some values,
preferable based on the current &quot;mount point&quot; of the application</description>
		<content:encoded><![CDATA[<p>imho this implementation lacks a very important feature</p>
<p>generating a url from a rule + some values,<br />
preferable based on the current &#8220;mount point&#8221; of the application</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silvermonkey</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-124</link>
		<dc:creator>Silvermonkey</dc:creator>
		<pubDate>Tue, 29 Apr 2008 07:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-124</guid>
		<description>10 PRINT &quot;DISCO DUMP!&quot;&lt;br&gt;20 GOTO 10&lt;br&gt;&lt;br&gt;Now that ladies is beauty!</description>
		<content:encoded><![CDATA[<p>10 <span class="caps">PRINT </span>&#8220;DISCO <span class="caps">DUMP</span>!&#8221;<br />20 <span class="caps">GOTO</span> 10</p>
<p>Now that ladies is beauty!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronny Pfannschmidt</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-123</link>
		<dc:creator>Ronny Pfannschmidt</dc:creator>
		<pubDate>Tue, 29 Apr 2008 06:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-123</guid>
		<description>imho this implementation lacks a very important feature&lt;br&gt;&lt;br&gt;generating a url from a rule + some values,&lt;br&gt;preferable based on the current &quot;mount point&quot; of the application</description>
		<content:encoded><![CDATA[<p>imho this implementation lacks a very important feature</p>
<p>generating a url from a rule + some values,<br />preferable based on the current &#8220;mount point&#8221; of the application</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piers Cawley</title>
		<link>http://avdi.org/devblog/2008/04/27/on-beauty-in-code/comment-page-1/#comment-58</link>
		<dc:creator>Piers Cawley</dc:creator>
		<pubDate>Tue, 29 Apr 2008 05:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/2008/04/27/on-beauty-in-code/#comment-58</guid>
		<description>I&#039;m not sure that I&#039;m such a fan of the code to be honest. The fact that the if/ifelse cascade can&#039;t be replaced with a &lt;code&gt;case&lt;/code&gt; statement is a bit of a worry. Combine this with the use of &lt;code&gt;is_a?&lt;/code&gt; and &lt;code&gt;respond_to?&lt;/code&gt; and the fact that every consequence has its own nested if and it starts to smell of structural code.

I realise that it&#039;s going to increase the line count, but I&#039;d prefer to introduce a few subclasses of Route (FilteredRoute, ProcRoute and StringRoute, say) and parcel the conditional logic out appropriately. Stick the key/value stuff in a &lt;code&gt;make_route&lt;/code&gt; method, called from &lt;code&gt;[]=&lt;/code&gt; and the path munging into &lt;code&gt;subclass#resolve&lt;/code&gt; methods and you start to have a collection of objects interacting with each other rather than a bunch of code messing with datastructures.

It may not be a refactoring worth doing when there&#039;s only three route types, but I would definitely be inclined to do it if the need arose for another kind of route.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure that I&#8217;m such a fan of the code to be honest. The fact that the if/ifelse cascade can&#8217;t be replaced with a <code>case</code> statement is a bit of a worry. Combine this with the use of <code>is_a?</code> and <code>respond_to?</code> and the fact that every consequence has its own nested if and it starts to smell of structural code.</p>
<p>I realise that it&#8217;s going to increase the line count, but I&#8217;d prefer to introduce a few subclasses of Route (FilteredRoute, ProcRoute and StringRoute, say) and parcel the conditional logic out appropriately. Stick the key/value stuff in a <code>make_route</code> method, called from <code>[]=</code> and the path munging into <code>subclass#resolve</code> methods and you start to have a collection of objects interacting with each other rather than a bunch of code messing with datastructures.</p>
<p>It may not be a refactoring worth doing when there&#8217;s only three route types, but I would definitely be inclined to do it if the need arose for another kind of route.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

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