<?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: Most confused discussion in the known universe</title>
	<atom:link href="http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/</link>
	<description>Dagfinn Reiersøl on PHP, agile development, Ruby and other addictive substances</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:17:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: In Defense Of Commenting &#124; BrandonSavage.net</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-460</link>
		<dc:creator>In Defense Of Commenting &#124; BrandonSavage.net</dc:creator>
		<pubDate>Tue, 05 May 2009 11:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-460</guid>
		<description>[...] week, &#8220;On Code Commenting and Technical Debt&#8221; raised a lot of response throughout the community. I think that discussion is great, and I&#8217;m all for a debate that enhances the community. But [...]</description>
		<content:encoded><![CDATA[<p>[...] week, &#8220;On Code Commenting and Technical Debt&#8221; raised a lot of response throughout the community. I think that discussion is great, and I&#8217;m all for a debate that enhances the community. But [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Community News: Comments on Commenting &#124; Cole Design Studios</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-454</link>
		<dc:creator>Community News: Comments on Commenting &#124; Cole Design Studios</dc:creator>
		<pubDate>Mon, 04 May 2009 17:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-454</guid>
		<description>[...] Allen&#8217;s opinions on Benjamin Eberlei&#8217;s [...]</description>
		<content:encoded><![CDATA[<p>[...] Allen&#8217;s opinions on Benjamin Eberlei&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fqqdk</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-445</link>
		<dc:creator>fqqdk</dc:creator>
		<pubDate>Mon, 04 May 2009 08:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-445</guid>
		<description>I was a tad bit nearer to insulting Marco (not a tiny bit intentionally), so allow me to explain myself:
I have read Marco&#039;s post about testing, so yes, it has occured to me that he does indeed unittests his code ;)
Actually testability can be measured, and a constructor that does those things I&#039;ve enlisted, is more difficult to test than a constructor that does not do these things.
Constructor does real work: http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/ is a very good reading, skim through it :)
Your other points are infalsifiably truthful, though :)</description>
		<content:encoded><![CDATA[<p>I was a tad bit nearer to insulting Marco (not a tiny bit intentionally), so allow me to explain myself:<br />
I have read Marco&#8217;s post about testing, so yes, it has occured to me that he does indeed unittests his code <img src='http://blog.agilephp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Actually testability can be measured, and a constructor that does those things I&#8217;ve enlisted, is more difficult to test than a constructor that does not do these things.<br />
Constructor does real work: <a href="http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/" rel="nofollow">http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/</a> is a very good reading, skim through it <img src='http://blog.agilephp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Your other points are infalsifiably truthful, though <img src='http://blog.agilephp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagfinn</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-428</link>
		<dc:creator>dagfinn</dc:creator>
		<pubDate>Sun, 03 May 2009 17:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-428</guid>
		<description>@Greg: No one except you has generalized about who writes unit tests and who doesn&#039;t. This is a discussion about a specific code example, not an attempt to insult the people who developed it. It&#039;s just a piece of code; I don&#039;t care who wrote it, and have nothing against Marco Tabini and associates. It might as well have been my own. My code is not always 100% perfect (what a surprise!). In short, there is absolutely no reason to take this personally (on behalf of someone else).

The tone of your comment makes me wonder what&#039;s behind it. And if you think the discussion is a waste of time, why participate?</description>
		<content:encoded><![CDATA[<p>@Greg: No one except you has generalized about who writes unit tests and who doesn&#8217;t. This is a discussion about a specific code example, not an attempt to insult the people who developed it. It&#8217;s just a piece of code; I don&#8217;t care who wrote it, and have nothing against Marco Tabini and associates. It might as well have been my own. My code is not always 100% perfect (what a surprise!). In short, there is absolutely no reason to take this personally (on behalf of someone else).</p>
<p>The tone of your comment makes me wonder what&#8217;s behind it. And if you think the discussion is a waste of time, why participate?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Beaver</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-422</link>
		<dc:creator>Greg Beaver</dc:creator>
		<pubDate>Sun, 03 May 2009 15:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-422</guid>
		<description>Has it occurred to you that perhaps Marco Tabini and Associates does in fact unit test?  Especially since he has blogged about this explicitly? :)

There is nothing about the design of his simple, 5-line constructor that is difficult to unit test.  The whole &quot;debate&quot; over the idea of commenting as good or bad is laughable.

Intelligent developers write good code and good comments, and all the dogma is irrelevant to making this possible.  Experience and careful study of the mistakes of the past (which includes design patterns and all the other solutions to learning from mistakes) are all that is needed, end of story.</description>
		<content:encoded><![CDATA[<p>Has it occurred to you that perhaps Marco Tabini and Associates does in fact unit test?  Especially since he has blogged about this explicitly? <img src='http://blog.agilephp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There is nothing about the design of his simple, 5-line constructor that is difficult to unit test.  The whole &#8220;debate&#8221; over the idea of commenting as good or bad is laughable.</p>
<p>Intelligent developers write good code and good comments, and all the dogma is irrelevant to making this possible.  Experience and careful study of the mistakes of the past (which includes design patterns and all the other solutions to learning from mistakes) are all that is needed, end of story.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagfinn</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-402</link>
		<dc:creator>dagfinn</dc:creator>
		<pubDate>Sun, 03 May 2009 06:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-402</guid>
		<description>You&#039;re absolutely right, I agree with all of what you&#039;re saying. You touch on several things I&#039;ve been thinking about. Above all, the discussion of comments is going on without a foundation. Unless you understand code smells and refactoring properly, the idea of using fewer comments is probably more or less incomprehensible.

In a comment to Benjamin Eberlei&#039;s post I suggested something similar to what you&#039;re saying: Instead of his refactoring, you could extract a class to handle the file system aspect. Another way of looking at it is that the original code does not suffer from the Long Method smell. Primitive Obsession is more like it. Therefore Extract Class should be more relevant than Extract Method.</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely right, I agree with all of what you&#8217;re saying. You touch on several things I&#8217;ve been thinking about. Above all, the discussion of comments is going on without a foundation. Unless you understand code smells and refactoring properly, the idea of using fewer comments is probably more or less incomprehensible.</p>
<p>In a comment to Benjamin Eberlei&#8217;s post I suggested something similar to what you&#8217;re saying: Instead of his refactoring, you could extract a class to handle the file system aspect. Another way of looking at it is that the original code does not suffer from the Long Method smell. Primitive Obsession is more like it. Therefore Extract Class should be more relevant than Extract Method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fqqdk</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-391</link>
		<dc:creator>fqqdk</dc:creator>
		<pubDate>Sat, 02 May 2009 22:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-391</guid>
		<description>upsz, I screwed up the parentheses in the middle. it should read: ...XSL transformation (possibly in the parent class), the file resource lookup, and the interpretation of the pathinfo...</description>
		<content:encoded><![CDATA[<p>upsz, I screwed up the parentheses in the middle. it should read: &#8230;XSL transformation (possibly in the parent class), the file resource lookup, and the interpretation of the pathinfo&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fqqdk</title>
		<link>http://blog.agilephp.com/2009/05/02/most-confused-discussion-in-the-known-universe/comment-page-1/#comment-390</link>
		<dc:creator>fqqdk</dc:creator>
		<pubDate>Sat, 02 May 2009 22:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.agilephp.com/?p=1573#comment-390</guid>
		<description>Still... You can&#039;t refactor without unittests in place. Everyone always forgets about the unittests when talking about refactoring. And that takes me to my point, which also has nothing to do with the original argument about code needing or not needing any kind of comments.
If that original snippet was designed with testing in mind, it never were one function in the first place, let alone a constructor. It wouldn&#039;t be a bunch of method on one class either, because a lot of separate responsibilities are intertwined in it: XSL transformation (possibly in the parent class, the file resource lookup, and the interpretation of the pathinfo). So I guess it&#039;s really some sort of a &quot;strawman snippet&quot;. :) And I guess you&#039;re right.
And then again, anyone can argue that it&#039;s really not worth it, to blow up that snippet to THREE classes (and possibly at least two interfaces, to loosen the coupling between said classes). But eventually you&#039;ll get to a state, where that code is not only readable, but easily testable. Because that code, in its original form is not easily testable. It does work in a constructor, talks to global variables (via a singleton), and to the filesystem. (I recommend http://misko.hevery.com/ to everyone, lots of great posts about testable design.)</description>
		<content:encoded><![CDATA[<p>Still&#8230; You can&#8217;t refactor without unittests in place. Everyone always forgets about the unittests when talking about refactoring. And that takes me to my point, which also has nothing to do with the original argument about code needing or not needing any kind of comments.<br />
If that original snippet was designed with testing in mind, it never were one function in the first place, let alone a constructor. It wouldn&#8217;t be a bunch of method on one class either, because a lot of separate responsibilities are intertwined in it: XSL transformation (possibly in the parent class, the file resource lookup, and the interpretation of the pathinfo). So I guess it&#8217;s really some sort of a &#8220;strawman snippet&#8221;. <img src='http://blog.agilephp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And I guess you&#8217;re right.<br />
And then again, anyone can argue that it&#8217;s really not worth it, to blow up that snippet to THREE classes (and possibly at least two interfaces, to loosen the coupling between said classes). But eventually you&#8217;ll get to a state, where that code is not only readable, but easily testable. Because that code, in its original form is not easily testable. It does work in a constructor, talks to global variables (via a singleton), and to the filesystem. (I recommend <a href="http://misko.hevery.com/" rel="nofollow">http://misko.hevery.com/</a> to everyone, lots of great posts about testable design.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
