<?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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Self Documenting Code is Not Enough</title>
	<atom:link href="http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<lastBuildDate>Tue, 24 Jan 2012 20:49:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51852</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Fri, 14 Dec 2007 16:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51852</guid>
		<description>&lt;p&gt;Mulick, I like your line &quot;The code can only tell you what it is doing. Not what should have been done.&quot; very true. Your example illustrates your point very well.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Mulick, I like your line &#8220;The code can only tell you what it is doing. Not what should have been done.&#8221; very true. Your example illustrates your point very well.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mulick Arpaly</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51851</link>
		<dc:creator>Mulick Arpaly</dc:creator>
		<pubDate>Fri, 14 Dec 2007 09:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51851</guid>
		<description>&lt;p&gt;Right on!&lt;/p&gt;

&lt;p&gt;I believe there&#039;s no such thing as &#039;self documenting code&#039;, for several reasons.&lt;/p&gt;

&lt;p&gt;I will name one: The code can only tell you what it is doing. Not what should have been done.
That means that if the code has a bug, there&#039;s no way you are going to find it by reading it!&lt;/p&gt;

&lt;p&gt;Let&#039;s take a trivial example:&lt;/p&gt;

&lt;p&gt;for (i = lstItems.count; i &gt;=0; i--)
{
..
}&lt;/p&gt;

&lt;p&gt;Well, is this code right? Wrong?
Who knows...
There&#039;s no programmer, in his right mind, that will dare to touch this code if it was already in production.
S/he may suspect this code is &#039;broken&#039; but s/he cannot know for sure, so it will stay that way until it crushes (or forever).&lt;/p&gt;

&lt;p&gt;Now say there was this line of documentation before the code:&lt;/p&gt;

&lt;p&gt;// Loop over the Items list backwards.&lt;/p&gt;

&lt;p&gt;So, is the code buggy? Sure it is!&lt;/p&gt;

&lt;p&gt;And this is for a very trivial example. Once you get into more complicated scenarios, comments become all the more important.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Right on!</p>

<p>I believe there&#8217;s no such thing as &#8216;self documenting code&#8217;, for several reasons.</p>

<p>I will name one: The code can only tell you what it is doing. Not what should have been done.
That means that if the code has a bug, there&#8217;s no way you are going to find it by reading it!</p>

<p>Let&#8217;s take a trivial example:</p>

<p>for (i = lstItems.count; i &gt;=0; i&#8211;)
{
..
}</p>

<p>Well, is this code right? Wrong?
Who knows&#8230;
There&#8217;s no programmer, in his right mind, that will dare to touch this code if it was already in production.
S/he may suspect this code is &#8216;broken&#8217; but s/he cannot know for sure, so it will stay that way until it crushes (or forever).</p>

<p>Now say there was this line of documentation before the code:</p>

<p>// Loop over the Items list backwards.</p>

<p>So, is the code buggy? Sure it is!</p>

<p>And this is for a very trivial example. Once you get into more complicated scenarios, comments become all the more important.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51466</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Sat, 01 Sep 2007 00:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51466</guid>
		<description>&lt;p&gt;Good points Karl. I would kill myself if I was required to add the 100 page business requirements document to my code. However, I would at least point to it or describe briefly why I&#039;m coding this logic this way versus that way.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Good points Karl. I would kill myself if I was required to add the 100 page business requirements document to my code. However, I would at least point to it or describe briefly why I&#8217;m coding this logic this way versus that way.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51462</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Fri, 31 Aug 2007 06:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51462</guid>
		<description>&lt;p&gt;Hi,
i think it&#039;s a question of the scope; You need documenation outside of the code to get the whole picture and to be able to deliver your business rules/requirements to others.
In more detail the commented code tells you how the aspects of the Business requirements are implemented. Two different focus of ducumentation.&lt;/p&gt;

&lt;p&gt;Karl Reitschuster&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,
i think it&#8217;s a question of the scope; You need documenation outside of the code to get the whole picture and to be able to deliver your business rules/requirements to others.
In more detail the commented code tells you how the aspects of the Business requirements are implemented. Two different focus of ducumentation.</p>

<p>Karl Reitschuster</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51425</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Sat, 25 Aug 2007 04:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51425</guid>
		<description>&lt;p&gt;Could not agree more Chris. Enjoy your weekend.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Could not agree more Chris. Enjoy your weekend.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Muir</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51424</link>
		<dc:creator>Chris Muir</dc:creator>
		<pubDate>Sat, 25 Aug 2007 00:23:18 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51424</guid>
		<description>&lt;p&gt;Oh boy, I can only agree with 110%.&lt;/p&gt;

&lt;p&gt;Okay, there are definitely some very small program units that don&#039;t need any explanation, but....&lt;/p&gt;

&lt;p&gt;Often I discover some hellish program unit (read: large), that looks beautiful, but no comments.  Questions like where did the original coder intend the routine to be called from, what business requirements was it trying to hit, what are the preconditions and postconditions on the unit running, are there any hacks in the code to get around bugs or unusual situations, if a workaround for a database issue -- what version of the database did the bug occur in ..... and so on.&lt;/p&gt;

&lt;p&gt;&quot;Just&quot; readable code without any comments just doesn&#039;t convey this sort of information.&lt;/p&gt;

&lt;p&gt;The fact of the matter is most developers don&#039;t like writing documentation, they&#039;re too lazy, and this is another reason developers as a group get a bad wrap.&lt;/p&gt;

&lt;p&gt;I think a lot of developers who took the whole readable code band wagon on board, took it outside of the context that you need to comment when commenting is necessary.  They are both useful techniques.&lt;/p&gt;

&lt;p&gt;Phew!  So much pent up rage for a Saturday morning ;)&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;CM.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oh boy, I can only agree with 110%.</p>

<p>Okay, there are definitely some very small program units that don&#8217;t need any explanation, but&#8230;.</p>

<p>Often I discover some hellish program unit (read: large), that looks beautiful, but no comments.  Questions like where did the original coder intend the routine to be called from, what business requirements was it trying to hit, what are the preconditions and postconditions on the unit running, are there any hacks in the code to get around bugs or unusual situations, if a workaround for a database issue &#8212; what version of the database did the bug occur in &#8230;.. and so on.</p>

<p>&#8220;Just&#8221; readable code without any comments just doesn&#8217;t convey this sort of information.</p>

<p>The fact of the matter is most developers don&#8217;t like writing documentation, they&#8217;re too lazy, and this is another reason developers as a group get a bad wrap.</p>

<p>I think a lot of developers who took the whole readable code band wagon on board, took it outside of the context that you need to comment when commenting is necessary.  They are both useful techniques.</p>

<p>Phew!  So much pent up rage for a Saturday morning <img src='http://awads.net/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>Cheers,</p>

<p>CM.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51423</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Fri, 24 Aug 2007 23:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51423</guid>
		<description>&lt;p&gt;Thanks Tim for confirming the importance of comments, even if you have javadoc. Have a great weekend.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks Tim for confirming the importance of comments, even if you have javadoc. Have a great weekend.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Dexter</title>
		<link>http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/comment-page-1/#comment-51422</link>
		<dc:creator>Tim Dexter</dc:creator>
		<pubDate>Fri, 24 Aug 2007 16:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/08/24/self-documenting-code-is-not-enough/#comment-51422</guid>
		<description>&lt;p&gt;Hey Eddie
As someone that regularly takes code from developers and write technical docs on top of them I completely agree on the importance of comments. Our product is v java biased so we get javadoc but thats not guarantee of good comments :o)
Tim&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Eddie
As someone that regularly takes code from developers and write technical docs on top of them I completely agree on the importance of comments. Our product is v java biased so we get javadoc but thats not guarantee of good comments <img src='http://awads.net/wp/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )
Tim</p>]]></content:encoded>
	</item>
</channel>
</rss>

