<?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"
	>
<channel>
	<title>Comments on: Comment-Driven Development</title>
	<atom:link href="http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Fri, 05 Dec 2008 00:04:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: dsfdsf</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-758233</link>
		<dc:creator>dsfdsf</dc:creator>
		<pubDate>Thu, 10 Jul 2008 04:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-758233</guid>
		<description>&lt;a href="http://www.plazhusu.cn/yuanpanzhusuji.html" title="圆盘注塑机" rel="nofollow"&gt;圆盘注塑机&lt;/a&gt;and insertable “to-do lists” and reviewer notes/comments embedded in the code are really items that need the support of the Code IDE and the poor developer shouldnt be forced to keep track of all this</description>
		<content:encoded><![CDATA[<p><a href="http://www.plazhusu.cn/yuanpanzhusuji.html" title="圆盘注塑机" rel="nofollow">圆盘注塑机</a>and insertable “to-do lists” and reviewer notes/comments embedded in the code are really items that need the support of the Code IDE and the poor developer shouldnt be forced to keep track of all this</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mittineague</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-432643</link>
		<dc:creator>Mittineague</dc:creator>
		<pubDate>Fri, 02 Nov 2007 02:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-432643</guid>
		<description>I usually do block diagrams containing pseudocode. Sometimes my logic lines expand from "Do this here" to "does this in the following steps", and sometimes they disappear altogether. What's left when done stays.</description>
		<content:encoded><![CDATA[<p>I usually do block diagrams containing pseudocode. Sometimes my logic lines expand from &#8220;Do this here&#8221; to &#8220;does this in the following steps&#8221;, and sometimes they disappear altogether. What&#8217;s left when done stays.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: steve_friend_of_brothercake</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-417959</link>
		<dc:creator>steve_friend_of_brothercake</dc:creator>
		<pubDate>Fri, 19 Oct 2007 13:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-417959</guid>
		<description>I fully agree with the commenting paradigm outlined and laugh in the face of (insert hearty mmmwwaahhah!) the feeble protests offered above!

the comments in the document - thats where they are supposed to be! Comment size is the least of my worries, 20k vs 10k vs my 500GB drive?..vs..2hrs @ $120/hr figuring out exactly why we used a linked list or not?

"#

That basically means that if you have a block of code that have a comment, extract the code to a method and name it according to what it does. If it’s already a method, rename it to better explain it’s purpose.
 
#"

that only works if your naming convention is totally logical AND the procedure/method only does one thing (and one thing only ) throughout the life of the code...

The real issue is that code editing systems are only just beginning to find the issues and needs for commenting and editing code!

After all these years, we have only recently gotten color syntax highlighting and brace matching. .NET allows you to collapse/expand blocks and new addons allow you to mark a block of text and then specify the block of code the comment refers to.
A checksum is generated for the code block, and as subsequent revisions take place, the icon beside the  comment block changes color and shape to indicate its diverging relevance to the code it comments!

also, like Microsoft word, we can now see different revisions from other people (or yourself) as markup tags within the document.

...popup and insertable "to-do lists" and reviewer notes/comments embedded in the code are really items that need the support of the Code IDE and the poor developer shouldnt be forced to keep track of all this :)</description>
		<content:encoded><![CDATA[<p>I fully agree with the commenting paradigm outlined and laugh in the face of (insert hearty mmmwwaahhah!) the feeble protests offered above!</p>
<p>the comments in the document - thats where they are supposed to be! Comment size is the least of my worries, 20k vs 10k vs my 500GB drive?..vs..2hrs @ $120/hr figuring out exactly why we used a linked list or not?</p>
<p>&#8220;#</p>
<p>That basically means that if you have a block of code that have a comment, extract the code to a method and name it according to what it does. If it’s already a method, rename it to better explain it’s purpose.</p>
<p>#&#8221;</p>
<p>that only works if your naming convention is totally logical AND the procedure/method only does one thing (and one thing only ) throughout the life of the code&#8230;</p>
<p>The real issue is that code editing systems are only just beginning to find the issues and needs for commenting and editing code!</p>
<p>After all these years, we have only recently gotten color syntax highlighting and brace matching. .NET allows you to collapse/expand blocks and new addons allow you to mark a block of text and then specify the block of code the comment refers to.<br />
A checksum is generated for the code block, and as subsequent revisions take place, the icon beside the  comment block changes color and shape to indicate its diverging relevance to the code it comments!</p>
<p>also, like Microsoft word, we can now see different revisions from other people (or yourself) as markup tags within the document.</p>
<p>&#8230;popup and insertable &#8220;to-do lists&#8221; and reviewer notes/comments embedded in the code are really items that need the support of the Code IDE and the poor developer shouldnt be forced to keep track of all this :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: PatrickGA</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-413605</link>
		<dc:creator>PatrickGA</dc:creator>
		<pubDate>Sun, 14 Oct 2007 16:00:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-413605</guid>
		<description>As a relatively new developer, I have a bit of a problem with your methodology.

I agree wholeheartedly that uncommented code can be a nightmare.  There are actions that are just too complex to read in code.  Watching a piece of code toss around ambiguously named variables often leaves me tearing my hair out trying to follow them.

However, overcommented code is also frustrating to read as a new developer because instead of "what?", "why?" or "how?", I start having to ask myself &lt;em&gt;"where?"&lt;/em&gt;  In my opinion, that's a question that shouldn't come up when I'm reading code.  When I'm trying to understand the hows and whys of a program, I'm not interested in looking for Waldo in the land of ASCII.

Comments also expand the size of a document to somewhat ridiculous proportions if you're counting one line of comment per line of code.  We're talking &lt;em&gt;at least&lt;/em&gt; double the length of the actual code document.  There's nothing more intimidating to a learning developer than to open up someone's program to see how it works and having to use a magnifying glass to find the scroll bar on the right side of the screen!

I think the important thing is to find a balance between using explicit naming conventions and commenting your code.  Let your code speak for itself where it can, and give it a hand with good, clean comments where it can't.  Try to bear in mind that the people reading your code are probably also proficient in the language you're using to at least some extent.</description>
		<content:encoded><![CDATA[<p>As a relatively new developer, I have a bit of a problem with your methodology.</p>
<p>I agree wholeheartedly that uncommented code can be a nightmare.  There are actions that are just too complex to read in code.  Watching a piece of code toss around ambiguously named variables often leaves me tearing my hair out trying to follow them.</p>
<p>However, overcommented code is also frustrating to read as a new developer because instead of &#8220;what?&#8221;, &#8220;why?&#8221; or &#8220;how?&#8221;, I start having to ask myself <em>&#8220;where?&#8221;</em>  In my opinion, that&#8217;s a question that shouldn&#8217;t come up when I&#8217;m reading code.  When I&#8217;m trying to understand the hows and whys of a program, I&#8217;m not interested in looking for Waldo in the land of ASCII.</p>
<p>Comments also expand the size of a document to somewhat ridiculous proportions if you&#8217;re counting one line of comment per line of code.  We&#8217;re talking <em>at least</em> double the length of the actual code document.  There&#8217;s nothing more intimidating to a learning developer than to open up someone&#8217;s program to see how it works and having to use a magnifying glass to find the scroll bar on the right side of the screen!</p>
<p>I think the important thing is to find a balance between using explicit naming conventions and commenting your code.  Let your code speak for itself where it can, and give it a hand with good, clean comments where it can&#8217;t.  Try to bear in mind that the people reading your code are probably also proficient in the language you&#8217;re using to at least some extent.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: rokpok</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-411390</link>
		<dc:creator>rokpok</dc:creator>
		<pubDate>Fri, 12 Oct 2007 09:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-411390</guid>
		<description>I also follow this approach when I write complex code, but I delete the comment, when I finnish writing code.</description>
		<content:encoded><![CDATA[<p>I also follow this approach when I write complex code, but I delete the comment, when I finnish writing code.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: brothercake</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410526</link>
		<dc:creator>brothercake</dc:creator>
		<pubDate>Thu, 11 Oct 2007 05:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410526</guid>
		<description>I don't see how commented code is harder to maintain - if you change the code, change the comment - how hard is that?

The Refactoring approach is fair enough - certainly it helps to use method and property names that are as self-explanatory as possible, but that doesn't address the key purpose of commenting, which is to explain *why* you're doing something, not just what. Somehow, this just doesn't cut it for me:

&lt;code&gt;function useStaticPositioningForInternetExplorer-BecauseItHasZIndexBugThatCreatesErroneousNewContexts-InPositionedElementsWithPositionedParents()&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see how commented code is harder to maintain - if you change the code, change the comment - how hard is that?</p>
<p>The Refactoring approach is fair enough - certainly it helps to use method and property names that are as self-explanatory as possible, but that doesn&#8217;t address the key purpose of commenting, which is to explain *why* you&#8217;re doing something, not just what. Somehow, this just doesn&#8217;t cut it for me:</p>
<code>function useStaticPositioningForInternetExplorer-BecauseItHasZIndexBugThatCreatesErroneousNewContexts-InPositionedElementsWithPositionedParents()</code>]]></content:encoded>
	</item>
	<item>
		<title>By: ParkinT</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410427</link>
		<dc:creator>ParkinT</dc:creator>
		<pubDate>Wed, 10 Oct 2007 20:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410427</guid>
		<description>I have always approached a development problem by writing comments first (pseudo-code).  Many times, after looking over the outline I have created, I will then make a decision about which language to use.  I don't code in just one language, but try to find the best tool for the job.</description>
		<content:encoded><![CDATA[<p>I have always approached a development problem by writing comments first (pseudo-code).  Many times, after looking over the outline I have created, I will then make a decision about which language to use.  I don&#8217;t code in just one language, but try to find the best tool for the job.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Livingston</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410384</link>
		<dc:creator>Dr Livingston</dc:creator>
		<pubDate>Wed, 10 Oct 2007 16:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410384</guid>
		<description>&#62; Conversely, sometimes it’s easy to write the code but much harder to
&#62; explain it;

Some would say, myself included that the code it's self should explain what it does, which is far better than any commenting system you could have.

Conversely, this is but one reason as to WHY you should have unit tests, which are their own documentation, that being one of many benefits. I could argue all day as to why your idea is bad but I'm not going to.

In any case if you were to unit test you wouldn't be dependent on comments to the extent that your now implying.</description>
		<content:encoded><![CDATA[<p>&gt; Conversely, sometimes it’s easy to write the code but much harder to<br />
&gt; explain it;</p>
<p>Some would say, myself included that the code it&#8217;s self should explain what it does, which is far better than any commenting system you could have.</p>
<p>Conversely, this is but one reason as to WHY you should have unit tests, which are their own documentation, that being one of many benefits. I could argue all day as to why your idea is bad but I&#8217;m not going to.</p>
<p>In any case if you were to unit test you wouldn&#8217;t be dependent on comments to the extent that your now implying.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: FallenJehova</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410357</link>
		<dc:creator>FallenJehova</dc:creator>
		<pubDate>Wed, 10 Oct 2007 14:15:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410357</guid>
		<description>This isn't a very DRY approach.

As Tim said, commented code is very hard to maintain. 

If someone changes code, and it breaks, you know that someone changed the code. But you have no way of knowing when someones changes the comments or not, and if he doesn't, how does the next developer that has to change the code will find himself with a text saying that the code should do something and a code that does something else. 

Now, who's right?

Solving this issue is trivial. 

Quoting Martin Fowler's Refactoring:
"If you need a comment to explain what a block of code does, try Extract Method. If the method is already extracted but you still need a comment to explain what it does, use Rename Method. If you need to state some rules about the required state of the system, use Introduce Assertion."

That basically means that if you have a block of code that have a comment, extract the code to a method and name it according to what it does. If it's already a method, rename it to better explain it's purpose.</description>
		<content:encoded><![CDATA[<p>This isn&#8217;t a very DRY approach.</p>
<p>As Tim said, commented code is very hard to maintain. </p>
<p>If someone changes code, and it breaks, you know that someone changed the code. But you have no way of knowing when someones changes the comments or not, and if he doesn&#8217;t, how does the next developer that has to change the code will find himself with a text saying that the code should do something and a code that does something else. </p>
<p>Now, who&#8217;s right?</p>
<p>Solving this issue is trivial. </p>
<p>Quoting Martin Fowler&#8217;s Refactoring:<br />
&#8220;If you need a comment to explain what a block of code does, try Extract Method. If the method is already extracted but you still need a comment to explain what it does, use Rename Method. If you need to state some rules about the required state of the system, use Introduce Assertion.&#8221;</p>
<p>That basically means that if you have a block of code that have a comment, extract the code to a method and name it according to what it does. If it&#8217;s already a method, rename it to better explain it&#8217;s purpose.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: malikyte</title>
		<link>http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410351</link>
		<dc:creator>malikyte</dc:creator>
		<pubDate>Wed, 10 Oct 2007 13:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2007/10/10/comment-driven-development/#comment-410351</guid>
		<description>When I was in college, this is what my college professors would call a plan-of-action, and sometimes, depending on the language used, pseudocode.  ;)  But yes, it can very well work for simpler and/or smaller chunks of code.</description>
		<content:encoded><![CDATA[<p>When I was in college, this is what my college professors would call a plan-of-action, and sometimes, depending on the language used, pseudocode.  ;)  But yes, it can very well work for simpler and/or smaller chunks of code.</p>]]></content:encoded>
	</item>
</channel>
</rss>
