<?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: Programmer’s Dozen &#8211; Programming Best Practices</title>
	<atom:link href="http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Tue, 24 Jan 2012 10:54: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: Alex</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/comment-page-1#comment-408</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 06 Apr 2009 11:28:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826#comment-408</guid>
		<description>Ian,

you&#039;re very wrong with this statement: &quot;code can only tell you WHAT, not WHY&quot;.

An aptly named variable, method or class can very well express why it does what it does. Take this piece of code for instance:

public void prepareOrderForShipmentOrder (order) {
   order.setStatus(OrderStatus.READY_FOR_TRANSPORT);

   notificationManager.sendOrderReadyForShipment(order);
}

Shows exactly what&#039;s going on in terms of the business need. The only comment you could add here would be a redundant repitition of the business process, which is already expressed more clearly in code. If the code said something like order.setStatus(2) and notificationManager.sendNotification11(order), then a comment could clear this up. But in that case the code should be made more clear, not the comment.</description>
		<content:encoded><![CDATA[<p>Ian,</p>
<p>you&#8217;re very wrong with this statement: &#8220;code can only tell you WHAT, not WHY&#8221;.</p>
<p>An aptly named variable, method or class can very well express why it does what it does. Take this piece of code for instance:</p>
<p>public void prepareOrderForShipmentOrder (order) {<br />
   order.setStatus(OrderStatus.READY_FOR_TRANSPORT);</p>
<p>   notificationManager.sendOrderReadyForShipment(order);<br />
}</p>
<p>Shows exactly what&#8217;s going on in terms of the business need. The only comment you could add here would be a redundant repitition of the business process, which is already expressed more clearly in code. If the code said something like order.setStatus(2) and notificationManager.sendNotification11(order), then a comment could clear this up. But in that case the code should be made more clear, not the comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/comment-page-1#comment-407</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Thu, 02 Apr 2009 18:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826#comment-407</guid>
		<description>I keep seeing this &quot;code over comments&quot; come up again and again, with various justifications for what amounts to laziness, and, in general, it&#039;s just plain wrong.

Commenting your code is absolutely NOT optional; I simply will not allow uncommented code to be checked-in; is&#039;t sloppy, lazy and shows a general lack of consideration for other coders that will have to work with the code later.

At an ABSOLUTE BARE MINIMUM:
* Every class should have a header describing what it does.
* Every method should have a header describing what it does.
* Every member variable should be described at declaration.

The only time &quot;code over comments&quot; applies is within the actual functional body of a method where the code _should_ be clear enough to explain what is going on. However, code can only tell you WHAT, not WHY. Any time you have a piece of code that is not immediately intuituive it must be commented to explain why you are doing things a certain way.</description>
		<content:encoded><![CDATA[<p>I keep seeing this &#8220;code over comments&#8221; come up again and again, with various justifications for what amounts to laziness, and, in general, it&#8217;s just plain wrong.</p>
<p>Commenting your code is absolutely NOT optional; I simply will not allow uncommented code to be checked-in; is&#8217;t sloppy, lazy and shows a general lack of consideration for other coders that will have to work with the code later.</p>
<p>At an ABSOLUTE BARE MINIMUM:<br />
* Every class should have a header describing what it does.<br />
* Every method should have a header describing what it does.<br />
* Every member variable should be described at declaration.</p>
<p>The only time &#8220;code over comments&#8221; applies is within the actual functional body of a method where the code _should_ be clear enough to explain what is going on. However, code can only tell you WHAT, not WHY. Any time you have a piece of code that is not immediately intuituive it must be commented to explain why you are doing things a certain way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/comment-page-1#comment-406</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 01 Apr 2009 03:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826#comment-406</guid>
		<description>&quot;Prefer code to comments&quot;, i agree with this. Code is one kind of comments, and also the best comment!</description>
		<content:encoded><![CDATA[<p>&#8220;Prefer code to comments&#8221;, i agree with this. Code is one kind of comments, and also the best comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Lynch</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/comment-page-1#comment-405</link>
		<dc:creator>Adrian Lynch</dc:creator>
		<pubDate>Sun, 29 Mar 2009 22:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826#comment-405</guid>
		<description>Although maybe not 100% relevant to ColdFusion, I agree with almost all of his points. I still use a Utils.cfc though, some methods are beyond classification :OD</description>
		<content:encoded><![CDATA[<p>Although maybe not 100% relevant to ColdFusion, I agree with almost all of his points. I still use a Utils.cfc though, some methods are beyond classification :OD</p>
]]></content:encoded>
	</item>
</channel>
</rss>

