<?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: How To Write Perfect Code</title>
	<atom:link href="http://www.doolwind.com/blog/how-to-write-perfect-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doolwind.com/blog/how-to-write-perfect-code/</link>
	<description>Pragmatic Thoughts On Game Development</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:53: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: Chandan Kumar Singh</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-665</link>
		<dc:creator>Chandan Kumar Singh</dc:creator>
		<pubDate>Tue, 06 Apr 2010 10:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-665</guid>
		<description>Yeah fully agree wid ASHISH MADAN … no body can say the delivered things are perfect.. infact the s/w is the basic build of code which gets deteriorate day by day…. so how we can say the piece of code is perfect solution of particular problem.

Thanks,
CK</description>
		<content:encoded><![CDATA[<p>Yeah fully agree wid ASHISH MADAN … no body can say the delivered things are perfect.. infact the s/w is the basic build of code which gets deteriorate day by day…. so how we can say the piece of code is perfect solution of particular problem.</p>
<p>Thanks,<br />
CK</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phodu Coder</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-664</link>
		<dc:creator>Phodu Coder</dc:creator>
		<pubDate>Tue, 06 Apr 2010 10:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-664</guid>
		<description>Get a life! Geeks.
As long as you dont get fired, the code is good enough i say.</description>
		<content:encoded><![CDATA[<p>Get a life! Geeks.<br />
As long as you dont get fired, the code is good enough i say.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish Madan</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-663</link>
		<dc:creator>Ashish Madan</dc:creator>
		<pubDate>Tue, 06 Apr 2010 10:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-663</guid>
		<description>There is nothing called Perfect Code. When you say perfect code , what do you actually mean? Only a person involved in coding knows this fact &quot;There is no perfect Code&quot; .

Pls get in toch if you have any doubts
Thanks,
Ashish Madan.</description>
		<content:encoded><![CDATA[<p>There is nothing called Perfect Code. When you say perfect code , what do you actually mean? Only a person involved in coding knows this fact &#8220;There is no perfect Code&#8221; .</p>
<p>Pls get in toch if you have any doubts<br />
Thanks,<br />
Ashish Madan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stanley Garland</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-662</link>
		<dc:creator>Stanley Garland</dc:creator>
		<pubDate>Thu, 25 Mar 2010 02:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-662</guid>
		<description>I would agree that perfect code is what we all strive for but there is no end to what &quot;perfect&quot; is.  As soon as I think it is perfect, then I am fooling myself when my colleague comes up with a new and innovative way to &quot;work-around&quot; and do what took me a page to do in a few lines.  Creativity is the only true limiting factor to the supposed perfect code.  Then, the question arises, is there &quot;good enough&quot; code.  What is good enough today, will be an outdated way to do it in a few years.
www.edityourpaper.webs.com

Stanley Garland</description>
		<content:encoded><![CDATA[<p>I would agree that perfect code is what we all strive for but there is no end to what &#8220;perfect&#8221; is.  As soon as I think it is perfect, then I am fooling myself when my colleague comes up with a new and innovative way to &#8220;work-around&#8221; and do what took me a page to do in a few lines.  Creativity is the only true limiting factor to the supposed perfect code.  Then, the question arises, is there &#8220;good enough&#8221; code.  What is good enough today, will be an outdated way to do it in a few years.<br />
<a href="http://www.edityourpaper.webs.com" rel="nofollow">http://www.edityourpaper.webs.com</a></p>
<p>Stanley Garland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave McCarthy</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-661</link>
		<dc:creator>Dave McCarthy</dc:creator>
		<pubDate>Fri, 10 Apr 2009 05:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-661</guid>
		<description>I would make two points, which balance between the philosophical and mathematical rather than being technical, but then I am much better at philosophy and math than coding so probably for the best!

1: There are a great many problems for which there is no complete set of solutions and the goal must be to find the greatest possible subset of solutions and/or find maximal and minimal values (speaking somewhat metaphorically, though this can be literally true). Often code is presented as solving for all cases when in fact the programmer has adjusted the problem space from his viewpoint, and thus codes in a incorrectly, and arbitrarily, reduced solution space. The most common form of this is precluded by the thought process which goes something like &quot;Well, in 99.9% of cases, we can ignore variable x&quot;. Which is fine until variable x hits some resonant or asymptotic value and your solution is incorrect and, much more harmfully, presumed to be correct. As has been said above, it is vital to know where your code is lacking.

2: My first point is an additional reason why your first requirement, thorough domain knowledge is absolutely essential. As you may be able to tell from the above, I am a physics student and it very quickly becomes obvious that in my field there are those who can code, those who grasp abstract concepts well and those whose math skills are outstanding. Any 1 of those 3 can do well in physics, so entwined is programming with our field, but to approach Mozart, one must have all 3 in abundance. Needless to say, this is something almost never seen.</description>
		<content:encoded><![CDATA[<p>I would make two points, which balance between the philosophical and mathematical rather than being technical, but then I am much better at philosophy and math than coding so probably for the best!</p>
<p>1: There are a great many problems for which there is no complete set of solutions and the goal must be to find the greatest possible subset of solutions and/or find maximal and minimal values (speaking somewhat metaphorically, though this can be literally true). Often code is presented as solving for all cases when in fact the programmer has adjusted the problem space from his viewpoint, and thus codes in a incorrectly, and arbitrarily, reduced solution space. The most common form of this is precluded by the thought process which goes something like &#8220;Well, in 99.9% of cases, we can ignore variable x&#8221;. Which is fine until variable x hits some resonant or asymptotic value and your solution is incorrect and, much more harmfully, presumed to be correct. As has been said above, it is vital to know where your code is lacking.</p>
<p>2: My first point is an additional reason why your first requirement, thorough domain knowledge is absolutely essential. As you may be able to tell from the above, I am a physics student and it very quickly becomes obvious that in my field there are those who can code, those who grasp abstract concepts well and those whose math skills are outstanding. Any 1 of those 3 can do well in physics, so entwined is programming with our field, but to approach Mozart, one must have all 3 in abundance. Needless to say, this is something almost never seen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Gillespie</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-660</link>
		<dc:creator>David Gillespie</dc:creator>
		<pubDate>Fri, 13 Mar 2009 14:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-660</guid>
		<description>From the point of view not of a developer, but as someone who has asked developers to write the best code they can in the time possible, it strikes me as the kind of math problem where the distance between where you are and where you want to be can be forever halved, meanign you&#039;re ever closer but never really quite there.

Like you say, software is maleable and I think there is value and strength in taking the time to say &quot;I know this isn&#039;t right, but it is &lt;i&gt;least wrong&lt;/i&gt;, Perhaps the difference is semantics, I think it&#039;s important none the less.</description>
		<content:encoded><![CDATA[<p>From the point of view not of a developer, but as someone who has asked developers to write the best code they can in the time possible, it strikes me as the kind of math problem where the distance between where you are and where you want to be can be forever halved, meanign you&#8217;re ever closer but never really quite there.</p>
<p>Like you say, software is maleable and I think there is value and strength in taking the time to say &#8220;I know this isn&#8217;t right, but it is <i>least wrong</i>, Perhaps the difference is semantics, I think it&#8217;s important none the less.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-659</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Sat, 07 Mar 2009 01:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-659</guid>
		<description>I&#039;ll avoid the &#039;Is perfect code possible&#039; discussion for now.  I&#039;d like to say that perfect code is always desired but frequently not wanted or needed.

Perfect code would be more necessary for components that will be reused or maintained over time, or even components with such complexity that the initial development could benefit from careful design and implementation.

In a commercial project there is frequently the thought that some component &#039;may&#039; be reused later, but the financial success of the current project will determine the future for subsequent projects.  In the end, &#039;good value&#039; code is more important than perfection.  Perfection may get its chance to occur as a maturing process over time and open source can help commercial and noncommercial projects achieve this.

I&#039;d also say that the &#039;perfect code&#039; may have a very limited context.  What is the &#039;right&#039; way to solve a problem may not be the right way later, eg. optimal quick sort on single CPU vs multi core.  And the problem itself may shift eg. goals and requirements for LOD system.

One final thought is that it is good practice to separate interface from implementation, allowing either to be tweaked or matured over time to obtain better value.  At different points in time you may achieve a perfect interface or perfect implementation (for a given platform), bonus if you can get both together!</description>
		<content:encoded><![CDATA[<p>I&#8217;ll avoid the &#8216;Is perfect code possible&#8217; discussion for now.  I&#8217;d like to say that perfect code is always desired but frequently not wanted or needed.</p>
<p>Perfect code would be more necessary for components that will be reused or maintained over time, or even components with such complexity that the initial development could benefit from careful design and implementation.</p>
<p>In a commercial project there is frequently the thought that some component &#8216;may&#8217; be reused later, but the financial success of the current project will determine the future for subsequent projects.  In the end, &#8216;good value&#8217; code is more important than perfection.  Perfection may get its chance to occur as a maturing process over time and open source can help commercial and noncommercial projects achieve this.</p>
<p>I&#8217;d also say that the &#8216;perfect code&#8217; may have a very limited context.  What is the &#8216;right&#8217; way to solve a problem may not be the right way later, eg. optimal quick sort on single CPU vs multi core.  And the problem itself may shift eg. goals and requirements for LOD system.</p>
<p>One final thought is that it is good practice to separate interface from implementation, allowing either to be tweaked or matured over time to obtain better value.  At different points in time you may achieve a perfect interface or perfect implementation (for a given platform), bonus if you can get both together!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-658</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 05 Mar 2009 23:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-658</guid>
		<description>A friend of mine in my first job was fond of raising Zeno&#039;s Paradox of motion in relation to coding.  That is to say, as long as you continue to code toward perfection, there is still code that needs to be written to catch up to perfection.  This is especially true in terms of scope creep, changing technologies and other external influences that cannot be mitigated through coding alone.

Still, I think the tenets you&#039;ve raised are good goals for perfect code, though point 3 is subjective.  The way you optimise a timing problem for a game is not necessarily the same way you would solve a timing problem for a safety switch.  A game can have a timer resolution of a few tens of milliseconds while a safety switch must have a tighter resolution.  Then again, it&#039;s all based off the original problem anyway.

I&#039;m curious to hear whether you think that test driven development (ie.  Writing a test as the problem and then the code to solve that test with the ultimate goal of putting it all together as the overall solution) brings us closer to the ideal of perfect code, or whether it draws us away from it.</description>
		<content:encoded><![CDATA[<p>A friend of mine in my first job was fond of raising Zeno&#8217;s Paradox of motion in relation to coding.  That is to say, as long as you continue to code toward perfection, there is still code that needs to be written to catch up to perfection.  This is especially true in terms of scope creep, changing technologies and other external influences that cannot be mitigated through coding alone.</p>
<p>Still, I think the tenets you&#8217;ve raised are good goals for perfect code, though point 3 is subjective.  The way you optimise a timing problem for a game is not necessarily the same way you would solve a timing problem for a safety switch.  A game can have a timer resolution of a few tens of milliseconds while a safety switch must have a tighter resolution.  Then again, it&#8217;s all based off the original problem anyway.</p>
<p>I&#8217;m curious to hear whether you think that test driven development (ie.  Writing a test as the problem and then the code to solve that test with the ultimate goal of putting it all together as the overall solution) brings us closer to the ideal of perfect code, or whether it draws us away from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Smyth</title>
		<link>http://www.doolwind.com/blog/how-to-write-perfect-code/comment-page-1/#comment-657</link>
		<dc:creator>Joshua Smyth</dc:creator>
		<pubDate>Thu, 05 Mar 2009 22:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=98#comment-657</guid>
		<description>I think you&#039;ve illustrated how to write good code, not perfect code.

Using your criteria,

1.  Solves a problem
2.  Without bugs
3.  In an optimal way

It is quite possible to have two pieces of code, one of which is more optimal than the other, (less lines of code, faster, easier to understand, cross-platform, generic etc..) and therefore more perfect.

I think that the above criteria specify nessesary, but not suffient conditions for perfect code.

But sometimes good code is good enough :)</description>
		<content:encoded><![CDATA[<p>I think you&#8217;ve illustrated how to write good code, not perfect code.</p>
<p>Using your criteria,</p>
<p>1.  Solves a problem<br />
2.  Without bugs<br />
3.  In an optimal way</p>
<p>It is quite possible to have two pieces of code, one of which is more optimal than the other, (less lines of code, faster, easier to understand, cross-platform, generic etc..) and therefore more perfect.</p>
<p>I think that the above criteria specify nessesary, but not suffient conditions for perfect code.</p>
<p>But sometimes good code is good enough <img src='http://www.doolwind.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

