<?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: 3 Misuses of Code Comments</title>
	<atom:link href="http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<lastBuildDate>Fri, 05 Mar 2010 19:33:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Matt Hargus</title>
		<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/comment-page-1/#comment-6969</link>
		<dc:creator>Matt Hargus</dc:creator>
		<pubDate>Tue, 14 Jul 2009 21:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=3118#comment-6969</guid>
		<description>I&#039;ll throw in my two cents and agree with Mark.  Nothing drives me nuttier than reading through code that has twice as many lines of comments as code.  Well chosen variable and method names can get you a long way in making the logic more understandable. I prefer to comment before the method/function and let the code speak for itself.  Good posting, Anthony.</description>
		<content:encoded><![CDATA[<p>I&#8217;ll throw in my two cents and agree with Mark.  Nothing drives me nuttier than reading through code that has twice as many lines of comments as code.  Well chosen variable and method names can get you a long way in making the logic more understandable. I prefer to comment before the method/function and let the code speak for itself.  Good posting, Anthony.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wilden</title>
		<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/comment-page-1/#comment-6875</link>
		<dc:creator>Mark Wilden</dc:creator>
		<pubDate>Wed, 01 Jul 2009 21:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=3118#comment-6875</guid>
		<description>I&#039;ve found that comments are a smell, indicating that the code might need refactoring.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found that comments are a smell, indicating that the code might need refactoring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Caliendo</title>
		<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/comment-page-1/#comment-6873</link>
		<dc:creator>Anthony Caliendo</dc:creator>
		<pubDate>Wed, 01 Jul 2009 20:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=3118#comment-6873</guid>
		<description>@Mark Wilden: I agree 100%.  When possible, self-documenting code should be used over comments.  If the code itself is easier to understand, then you don&#039;t need to worry about the comments.

I think my last example was a little weak and didn&#039;t show my point exactly, but I was trying to focus more on what to do with only the comments and not improve the code quality at all.  I think I&#039;ll update my post to highlight that.</description>
		<content:encoded><![CDATA[<p>@Mark Wilden: I agree 100%.  When possible, self-documenting code should be used over comments.  If the code itself is easier to understand, then you don&#8217;t need to worry about the comments.</p>
<p>I think my last example was a little weak and didn&#8217;t show my point exactly, but I was trying to focus more on what to do with only the comments and not improve the code quality at all.  I think I&#8217;ll update my post to highlight that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wilden</title>
		<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/comment-page-1/#comment-6872</link>
		<dc:creator>Mark Wilden</dc:creator>
		<pubDate>Wed, 01 Jul 2009 20:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=3118#comment-6872</guid>
		<description>I agree with most of this article. My philosophy is that code that&#039;s hard to understand should be commented. But code that&#039;s hard to understand should be avoided.

My main complaint about comments is that they&#039;re not compilable. The comment can be completely wrong, but no test will catch it. So I prefer to express intention in identifier names, where at least there is a compilable correlation between uses.

For example, in the last example, the comment can be avoided simply by putting the affected code in a method called something like map_their_error_codes_to_ours(). By factoring out functionality, the code is easier to understand, even without any comments.</description>
		<content:encoded><![CDATA[<p>I agree with most of this article. My philosophy is that code that&#8217;s hard to understand should be commented. But code that&#8217;s hard to understand should be avoided.</p>
<p>My main complaint about comments is that they&#8217;re not compilable. The comment can be completely wrong, but no test will catch it. So I prefer to express intention in identifier names, where at least there is a compilable correlation between uses.</p>
<p>For example, in the last example, the comment can be avoided simply by putting the affected code in a method called something like map_their_error_codes_to_ours(). By factoring out functionality, the code is easier to understand, even without any comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tammer Saleh</title>
		<link>http://www.pathf.com/blogs/2009/07/3-misuses-of-code-comments/comment-page-1/#comment-6870</link>
		<dc:creator>Tammer Saleh</dc:creator>
		<pubDate>Wed, 01 Jul 2009 19:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=3118#comment-6870</guid>
		<description>I can&#039;t remember where I read it, but the best advice I&#039;ve seen for when and what to comment is to only write comments that include the word &quot;because&quot;.  Comments are really only useful for explaining strange application behavior.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t remember where I read it, but the best advice I&#8217;ve seen for when and what to comment is to only write comments that include the word &#8220;because&#8221;.  Comments are really only useful for explaining strange application behavior.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.260 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-21 07:42:02 -->
