<?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 &#8220;clever&#8221; code is often really quite stupid</title>
	<atom:link href="http://www.davidarno.org/2009/01/13/why-clever-code-is-often-really-quite-stupid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidarno.org/2009/01/13/why-clever-code-is-often-really-quite-stupid/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 22:10:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Pythonicità e/o cleverosità &#171; Ok, panico</title>
		<link>http://www.davidarno.org/2009/01/13/why-clever-code-is-often-really-quite-stupid/comment-page-1/#comment-7461</link>
		<dc:creator>Pythonicità e/o cleverosità &#171; Ok, panico</dc:creator>
		<pubDate>Sun, 25 Sep 2011 08:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/?p=583#comment-7461</guid>
		<description>[...] toobz si trova parecchia roba sull&#8217;argomento, non è solo una mia fisima, ecco per esempio: Why “clever” code is often really quite stupid. Guido van Rossum racconta queste cose molto meglio di me, ça va sans [...]</description>
		<content:encoded><![CDATA[<div style="padding: 1em; border: 1px solid #606060; margin-top: 1em;"><p><p>[...] toobz si trova parecchia roba sull&#8217;argomento, non è solo una mia fisima, ecco per esempio: Why “clever” code is often really quite stupid. Guido van Rossum racconta queste cose molto meglio di me, ça va sans [...]</p>
</div>]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Rosano</title>
		<link>http://www.davidarno.org/2009/01/13/why-clever-code-is-often-really-quite-stupid/comment-page-1/#comment-1649</link>
		<dc:creator>Alex Rosano</dc:creator>
		<pubDate>Sat, 17 Jan 2009 22:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/?p=583#comment-1649</guid>
		<description>I totally agree. Clever code resolves difficult problems in simple ways ...  while remaining intuitive</description>
		<content:encoded><![CDATA[<p>I totally agree. Clever code resolves difficult problems in simple ways &#8230;  while remaining intuitive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.davidarno.org/2009/01/13/why-clever-code-is-often-really-quite-stupid/comment-page-1/#comment-1643</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 14 Jan 2009 23:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/?p=583#comment-1643</guid>
		<description>I&#039;m inclined to disagree on your definition of clever code. Your example of the TDWTF entry doesn&#039;t work - it&#039;s not particularly clever, just an obsolete loop method that was, once upon a time, apparently more efficient than GOTO (and if you&#039;ve ever used a do-while loop it&#039;s not particularly &quot;incomprehensible&quot; either).

As for readability - every single language implements comments for that exact purpose (there may be a few exceptions). If you have a clever implementation that isn&#039;t immediately understandable, all you need to do is explain it to future readers through good commenting.

Most problems just lend themselves to some thought. Implementing flags as single bits that can be OR&#039;d, AND&#039;d and XOR&#039;d to form a set of flags stored as an integer is quite clever. The immediately obvious solution to that problem would be an array of bools, yet bitwise flags are common.

Member functions that return pointers to their owner to allow for chaining are clever. And yet, the if you saw a function that returned its owner your first thought might be &quot;WTF&quot;.

Clever coding is about not doing the obvious. It&#039;s about ingenuity, about long hard thought and brilliant insights.</description>
		<content:encoded><![CDATA[<p>I&#8217;m inclined to disagree on your definition of clever code. Your example of the TDWTF entry doesn&#8217;t work &#8211; it&#8217;s not particularly clever, just an obsolete loop method that was, once upon a time, apparently more efficient than GOTO (and if you&#8217;ve ever used a do-while loop it&#8217;s not particularly &#8220;incomprehensible&#8221; either).</p>
<p>As for readability &#8211; every single language implements comments for that exact purpose (there may be a few exceptions). If you have a clever implementation that isn&#8217;t immediately understandable, all you need to do is explain it to future readers through good commenting.</p>
<p>Most problems just lend themselves to some thought. Implementing flags as single bits that can be OR&#8217;d, AND&#8217;d and XOR&#8217;d to form a set of flags stored as an integer is quite clever. The immediately obvious solution to that problem would be an array of bools, yet bitwise flags are common.</p>
<p>Member functions that return pointers to their owner to allow for chaining are clever. And yet, the if you saw a function that returned its owner your first thought might be &#8220;WTF&#8221;.</p>
<p>Clever coding is about not doing the obvious. It&#8217;s about ingenuity, about long hard thought and brilliant insights.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

