<?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: TDD, small steps and no need for comments</title>
	<atom:link href="http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Alexandre Gazola</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42496</link>
		<dc:creator>Alexandre Gazola</dc:creator>
		<pubDate>Mon, 26 Jul 2010 23:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42496</guid>
		<description>In my experience, code comments might be useful to rapidly think through a solution, especially a more &quot;algorithmic&quot; one. Nevertheless, I&#039;m completely in favor of not using code comments in the final code, except for possibly documenting the public interface (though in this case the test suites could be a far better way of doing this) or to explain complex pieces of code. I read somewhere that &quot;code comments are deodorant for poorly written code&quot;.

Cheers!</description>
		<content:encoded><![CDATA[<p>In my experience, code comments might be useful to rapidly think through a solution, especially a more &#8220;algorithmic&#8221; one. Nevertheless, I&#8217;m completely in favor of not using code comments in the final code, except for possibly documenting the public interface (though in this case the test suites could be a far better way of doing this) or to explain complex pieces of code. I read somewhere that &#8220;code comments are deodorant for poorly written code&#8221;.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: INTPnerd</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42384</link>
		<dc:creator>INTPnerd</dc:creator>
		<pubDate>Sun, 25 Jul 2010 20:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42384</guid>
		<description>Somehow I posted that comment before it was finished. Carrying on...

I believe it was in the book Clean Code by &quot;Uncle Bob&quot; where he explained that any time you have to leave a comment in your code, this is not something to be proud of, but it means you failed to express yourself sufficiently in the code itself. He was not saying that you should never have comments, but that you should try to make them unnecessary. When you can&#039;t do this, comments are a necessary evil, not something to take pride in.

I do agree with you that the reason for a design decision something that needs to be commented more often than the meaning of your code.</description>
		<content:encoded><![CDATA[<p>Somehow I posted that comment before it was finished. Carrying on&#8230;</p>
<p>I believe it was in the book Clean Code by &#8220;Uncle Bob&#8221; where he explained that any time you have to leave a comment in your code, this is not something to be proud of, but it means you failed to express yourself sufficiently in the code itself. He was not saying that you should never have comments, but that you should try to make them unnecessary. When you can&#8217;t do this, comments are a necessary evil, not something to take pride in.</p>
<p>I do agree with you that the reason for a design decision something that needs to be commented more often than the meaning of your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: INTPnerd</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42383</link>
		<dc:creator>INTPnerd</dc:creator>
		<pubDate>Sun, 25 Jul 2010 20:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42383</guid>
		<description>Like most things, I like a combinational approach. I like to use TDD and also sometimes write the implementation in comments. Notice the blog post said
&quot;this is a very simplistic example, but I do use this technique on a regular basis when I need to build a function that is notably more complex.&quot;

I don&#039;t normally use comments in this way, but if I am writing a complex algorithm, and I am struggling with it, I use this. However I would create a real method with the implementation missing with the comments inside the method. I would also attempt to make the actual code just as readable as the comments and then delete the comments. I have seen real code written for a commercial website where the comments were less readable than the code it was documenting.

I believe it was in the book Clean Code by &quot;Uncle Bob&quot; where he explained that any time you have to wite a commen</description>
		<content:encoded><![CDATA[<p>Like most things, I like a combinational approach. I like to use TDD and also sometimes write the implementation in comments. Notice the blog post said<br />
&#8220;this is a very simplistic example, but I do use this technique on a regular basis when I need to build a function that is notably more complex.&#8221;</p>
<p>I don&#8217;t normally use comments in this way, but if I am writing a complex algorithm, and I am struggling with it, I use this. However I would create a real method with the implementation missing with the comments inside the method. I would also attempt to make the actual code just as readable as the comments and then delete the comments. I have seen real code written for a commercial website where the comments were less readable than the code it was documenting.</p>
<p>I believe it was in the book Clean Code by &#8220;Uncle Bob&#8221; where he explained that any time you have to wite a commen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Random Links #231 &#124; YASDW - yet another software developer weblog</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42234</link>
		<dc:creator>Random Links #231 &#124; YASDW - yet another software developer weblog</dc:creator>
		<pubDate>Fri, 23 Jul 2010 19:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42234</guid>
		<description>[...] TDD, small steps and no need for comments Comment driven development ???? [...]</description>
		<content:encoded><![CDATA[<p>[...] TDD, small steps and no need for comments Comment driven development ???? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42233</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Fri, 23 Jul 2010 19:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42233</guid>
		<description>@Claudio - I haven&#039;t read the article you linked to yet but I just wanted to agree with your thoughts on the middle path. Comments are certainly useful for describing why non obvious design choices have been made.

One example which happened on a project on the same client as me was related to the way objects were being queried from the database via Hibernate. The code was written in quite a hacky way to get around a performance problem and some guys decided to refactor it to the clean solution which was totally non-performant! Comments around that type of code would be really useful.</description>
		<content:encoded><![CDATA[<p>@Claudio &#8211; I haven&#8217;t read the article you linked to yet but I just wanted to agree with your thoughts on the middle path. Comments are certainly useful for describing why non obvious design choices have been made.</p>
<p>One example which happened on a project on the same client as me was related to the way objects were being queried from the database via Hibernate. The code was written in quite a hacky way to get around a performance problem and some guys decided to refactor it to the clean solution which was totally non-performant! Comments around that type of code would be really useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudio Oliva de Lyra</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42214</link>
		<dc:creator>Claudio Oliva de Lyra</dc:creator>
		<pubDate>Fri, 23 Jul 2010 10:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42214</guid>
		<description>Hi Mark,

Another great article. I think we are tuned on this subject. Let me add some of my personal thoughts.

The topic reminded me of an old software maxim: &quot;don&#039;t debug comments, comments lie&quot;. And why it is so? Because comments, like documentation, inevitably decays along time. This is the expected behavior of &#039;live&#039; systems. 

History tells that the strategy of &#039;bringing documentation INTO the codebase&#039;, via javadoc-like tools or via pure comment lines, unfortunately failed to solve the problem.

The assertive that &quot;logic doesn’t change when translated from human language into a programming language&quot; sounds a bit naive. A lot of questions can be raised, like &#039;when translated in which programming language?&#039; or &#039;in which style of programming?&#039; or &#039;in which level of detail?&#039; or still &#039;for how large and complex type of program?&#039;

Going to the other extreme: a great article on XP tenets influenced me for a period of time. I have always been an advocate of TDD and intention-revealing coding, but then I was seduced by the siren song: no comments whatsoever. I have tried this path and I can say from my experience that it does not work either, not for large-scale distributed applications. Down the road, at some point, you will miss those concision hints that should have been sprinkled in the right places.

Today I believe that comments are necessary for the benefit of future generations, echoing the reasons and decisions of the past. 

Actually, the &#039;middle path&#039; is frequently the best. 

Link to the article mentioned above: (I was surprised I could still find a reference) http://www.drdobbs.com/184414826;jsessionid=5XTLA3BFL4XOTQE1GHOSKHWATMY32JVN</description>
		<content:encoded><![CDATA[<p>Hi Mark,</p>
<p>Another great article. I think we are tuned on this subject. Let me add some of my personal thoughts.</p>
<p>The topic reminded me of an old software maxim: &#8220;don&#8217;t debug comments, comments lie&#8221;. And why it is so? Because comments, like documentation, inevitably decays along time. This is the expected behavior of &#8216;live&#8217; systems. </p>
<p>History tells that the strategy of &#8216;bringing documentation INTO the codebase&#8217;, via javadoc-like tools or via pure comment lines, unfortunately failed to solve the problem.</p>
<p>The assertive that &#8220;logic doesn’t change when translated from human language into a programming language&#8221; sounds a bit naive. A lot of questions can be raised, like &#8216;when translated in which programming language?&#8217; or &#8216;in which style of programming?&#8217; or &#8216;in which level of detail?&#8217; or still &#8216;for how large and complex type of program?&#8217;</p>
<p>Going to the other extreme: a great article on XP tenets influenced me for a period of time. I have always been an advocate of TDD and intention-revealing coding, but then I was seduced by the siren song: no comments whatsoever. I have tried this path and I can say from my experience that it does not work either, not for large-scale distributed applications. Down the road, at some point, you will miss those concision hints that should have been sprinkled in the right places.</p>
<p>Today I believe that comments are necessary for the benefit of future generations, echoing the reasons and decisions of the past. </p>
<p>Actually, the &#8216;middle path&#8217; is frequently the best. </p>
<p>Link to the article mentioned above: (I was surprised I could still find a reference) <a href="http://www.drdobbs.com/184414826;jsessionid=5XTLA3BFL4XOTQE1GHOSKHWATMY32JVN" rel="nofollow">http://www.drdobbs.com/184414826;jsessionid=5XTLA3BFL4XOTQE1GHOSKHWATMY32JVN</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention TDD, small steps and no need for comments at Mark Needham -- Topsy.com</title>
		<link>http://www.markhneedham.com/blog/2010/07/23/tdd-small-steps-and-no-need-for-comments/comment-page-1/#comment-42198</link>
		<dc:creator>Tweets that mention TDD, small steps and no need for comments at Mark Needham -- Topsy.com</dc:creator>
		<pubDate>Fri, 23 Jul 2010 06:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=2732#comment-42198</guid>
		<description>[...] This post was mentioned on Twitter by Andrei Savu and Tim Skauge, Celso Martins. Celso Martins said: TDD, small steps and no need for comments http://bit.ly/bn5nR8 by @markhneedham [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Andrei Savu and Tim Skauge, Celso Martins. Celso Martins said: TDD, small steps and no need for comments <a href="http://bit.ly/bn5nR8" rel="nofollow">http://bit.ly/bn5nR8</a> by @markhneedham [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

