<?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: Observation: Code cleverness == Bad</title> <atom:link href="http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/feed/" rel="self" type="application/rss+xml" /><link>http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/</link> <description>Essays from a guy with too much pontification on his hands</description> <lastBuildDate>Thu, 29 Mar 2012 16:24:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Sidu</title><link>http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/comment-page-1/#comment-71558</link> <dc:creator>Sidu</dc:creator> <pubDate>Wed, 27 Feb 2008 08:45:30 +0000</pubDate> <guid
isPermaLink="false">http://fleshy.org.nz/yum/archives/705#comment-71558</guid> <description>Not to mention the fact that it&#039;s hard to test that big blob of generated code. Meta-programmatically generating untestable code is the path to the dark side.</description> <content:encoded><![CDATA[<p>Not to mention the fact that it&#8217;s hard to test that big blob of generated code. Meta-programmatically generating untestable code is the path to the dark side.</p> ]]></content:encoded> </item> <item><title>By: Jeremy Friesen</title><link>http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/comment-page-1/#comment-14483</link> <dc:creator>Jeremy Friesen</dc:creator> <pubDate>Wed, 02 May 2007 20:56:17 +0000</pubDate> <guid
isPermaLink="false">http://fleshy.org.nz/yum/archives/705#comment-14483</guid> <description>Agreed, too much work in a single method is a dangerous thing.</description> <content:encoded><![CDATA[<p>Agreed, too much work in a single method is a dangerous thing.</p> ]]></content:encoded> </item> <item><title>By: brink</title><link>http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/comment-page-1/#comment-14482</link> <dc:creator>brink</dc:creator> <pubDate>Wed, 02 May 2007 20:44:02 +0000</pubDate> <guid
isPermaLink="false">http://fleshy.org.nz/yum/archives/705#comment-14482</guid> <description>Thanks, yeah I got that particular issue solved, however it also has a bug at the end on the delete_if, which fails if there are no actual results of the preceding block.
My point is that the code is too clever. It&#039;s not immediately obvious that there are bugs in it, because it&#039;s obfuscated by the concatenation of methods.
Don&#039;t get me wrong, it sort of appeals to me to have an essential one-liner, but more and more I&#039;m of the opinion that verbosity is better in the long run.</description> <content:encoded><![CDATA[<p>Thanks, yeah I got that particular issue solved, however it also has a bug at the end on the delete_if, which fails if there are no actual results of the preceding block.</p><p>My point is that the code is too clever. It&#8217;s not immediately obvious that there are bugs in it, because it&#8217;s obfuscated by the concatenation of methods.</p><p>Don&#8217;t get me wrong, it sort of appeals to me to have an essential one-liner, but more and more I&#8217;m of the opinion that verbosity is better in the long run.</p> ]]></content:encoded> </item> <item><title>By: Jeremy Friesen</title><link>http://fleshy.org.nz/2007/05/02/observation-code-cleverness-bad/comment-page-1/#comment-14481</link> <dc:creator>Jeremy Friesen</dc:creator> <pubDate>Wed, 02 May 2007 20:28:37 +0000</pubDate> <guid
isPermaLink="false">http://fleshy.org.nz/yum/archives/705#comment-14481</guid> <description>I believe I see your problem, its with the inject statement; the last line of inject must return the mem variable.
No Worky
[1,2,nil,3].inject([]) do &#124;m,v&#124;
m </description> <content:encoded><![CDATA[<p>I believe I see your problem, its with the inject statement; the last line of inject must return the mem variable.</p><p>No Worky<br
/> [1,2,nil,3].inject([]) do |m,v|<br
/> m</p> ]]></content:encoded> </item> </channel> </rss>
