<?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: Stepping Through the Looking Glass: Test-Driven Game Development (Part 2)</title>
	<atom:link href="http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/feed" rel="self" type="application/rss+xml" />
	<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2</link>
	<description>Living the indie life</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:36:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chad Austin</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-147</link>
		<dc:creator>Chad Austin</dc:creator>
		<pubDate>Wed, 27 Apr 2005 14:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-147</guid>
		<description>&lt;strong&gt;Test Driven Development: First Impressions&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Test Driven Development: First Impressions</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fosta's Blog</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-146</link>
		<dc:creator>Fosta's Blog</dc:creator>
		<pubDate>Mon, 07 Mar 2005 20:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-146</guid>
		<description>&lt;strong&gt;Test Driven Development&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Test Driven Development</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radium Software Development</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-145</link>
		<dc:creator>Radium Software Development</dc:creator>
		<pubDate>Mon, 07 Mar 2005 16:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-145</guid>
		<description>&lt;strong&gt;Test Driven Development&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Test Driven Development</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-144</link>
		<dc:creator>The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers</dc:creator>
		<pubDate>Mon, 07 Mar 2005 16:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-144</guid>
		<description>&lt;strong&gt;More On Test Driven Development&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>More On Test Driven Development</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: msew</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-141</link>
		<dc:creator>msew</dc:creator>
		<pubDate>Mon, 07 Mar 2005 05:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-141</guid>
		<description>Don&#039;t forget the most important step of TDD:&#160;&#160;  REFACTOR!!!



After you have possibly made a bit of a mess of your code because you are trying to make it pass the test you just made.  And now it passes.  And you are ready to check in the code.  Check it in because it works. :-)  But then go back and look at your code and see if you can refactor and make it clearer.  ( e.g. see if those accessors are actually needed. etc )



The same goes for tests.  For me, my tests usually get the most messy.  Making test objects, making test data, making &quot;correct data&quot; / mock objects of systems to run against, check various conditions, checking boundary cases, etc.  Refactoring those is a necessity.



But once you have them.  Oh so sweet. No longer do you fear making significant changes to the code.  And when other people need to add something or fix something in the code you wrote.  Boom just run the unit tests and see if they still work.  No more &quot;oh I changed the defaults for how some data is loaded and now the mobs in the game don&#039;t move.&quot;



For me, one key insight for using TDD was:  Okie I have to make this object. It has a bunch of requirements.  When I am coding that object I am either using the debugger to test out those requirements or I am writing the object and then loading up the game and testing all of the requirements in the game.  So maybe I spend maybe 2x as much time up front writing tests compared to loading up the game and testing. (that time goes down once writing unit test becomes second nature).  But now when an issue arises I can run the tests and quickly say:  &quot;well the code is working let&#039;s look at the data.&quot; (NOTE: TDD purists will say TDD helps you &quot;explore&quot; the solution space or what not.  Yes it does, but if you are going to code something you have to have some user story or requirements or idea of what you are making.  TDD doesn&#039;t really help with that part.  Once you have that part you can start doing TDD.)





Also with tests you have a nice way to check individual components easily.  Example:  some texture or game object is causing a crash or is not being loaded correctly or the behavior is wrong.  Usually you load up some test level, find that object, load it up and then try to debug what is going wrong (in some cases many steps are involved to place only that object).   With TDD there should be a test somewhere where you can point to the offender instead of the mock object you were using before and have a small working set to debug.  And if there is not, well time to make one!





Also another key insight for me was:  you don&#039;t need to test EVERYTHING.  That way lies pure madness.  When you are writing an object you can probably guess / know which parts are going to be &quot;tricky&quot; / &quot;open to errors&quot;.  So test those.  (i.e. replace debugger time with test writing time to make certain you coded it correctly)  Don&#039;t fret over not testing whether or not the the setName( const std::string&amp; p_newName ) actually set the name when the code for that is something like:





void SomeNamespace::SomeClass::setName( const std::string&amp; p_newName )

{

&#160;&#160;&#160;&#160;m_impl-&gt;name = p_newName;

}





I think _PURE TDD_ would require that a test be written, have it fail, then go write the above and smile when it worked.  And for some of the crazy string classes out there you maybe would want to actually test that!  But to me that is going to be in the 20% in the 80/20 rule of what needs to be tested.  Of course if this manages to fail at some point, a test shall be created with all due haste!





But something like:





std::string getFullName() const;

&#160;&#160;&#160;&#160;// returns the full name of the player.  First and last name are capitalized and the title is prepended to the name iff there is a title.  Additionally the guild affiliation is attached to the end also.

&#160;&#160;&#160;&#160;// NOTE:  we probably don&#039;t want the guild name included in this but that is what design wants at this time.





That probably gets some tests where you have you test all of the conditions.





ahh part 3 is up it seems and this comment will be lost forever! haha</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget the most important step of TDD:&nbsp;&nbsp;  REFACTOR!!!</p>
<p>After you have possibly made a bit of a mess of your code because you are trying to make it pass the test you just made.  And now it passes.  And you are ready to check in the code.  Check it in because it works. <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   But then go back and look at your code and see if you can refactor and make it clearer.  ( e.g. see if those accessors are actually needed. etc )</p>
<p>The same goes for tests.  For me, my tests usually get the most messy.  Making test objects, making test data, making &#8220;correct data&#8221; / mock objects of systems to run against, check various conditions, checking boundary cases, etc.  Refactoring those is a necessity.</p>
<p>But once you have them.  Oh so sweet. No longer do you fear making significant changes to the code.  And when other people need to add something or fix something in the code you wrote.  Boom just run the unit tests and see if they still work.  No more &#8220;oh I changed the defaults for how some data is loaded and now the mobs in the game don&#8217;t move.&#8221;</p>
<p>For me, one key insight for using TDD was:  Okie I have to make this object. It has a bunch of requirements.  When I am coding that object I am either using the debugger to test out those requirements or I am writing the object and then loading up the game and testing all of the requirements in the game.  So maybe I spend maybe 2x as much time up front writing tests compared to loading up the game and testing. (that time goes down once writing unit test becomes second nature).  But now when an issue arises I can run the tests and quickly say:  &#8220;well the code is working let&#8217;s look at the data.&#8221; (NOTE: TDD purists will say TDD helps you &#8220;explore&#8221; the solution space or what not.  Yes it does, but if you are going to code something you have to have some user story or requirements or idea of what you are making.  TDD doesn&#8217;t really help with that part.  Once you have that part you can start doing TDD.)</p>
<p>Also with tests you have a nice way to check individual components easily.  Example:  some texture or game object is causing a crash or is not being loaded correctly or the behavior is wrong.  Usually you load up some test level, find that object, load it up and then try to debug what is going wrong (in some cases many steps are involved to place only that object).   With TDD there should be a test somewhere where you can point to the offender instead of the mock object you were using before and have a small working set to debug.  And if there is not, well time to make one!</p>
<p>Also another key insight for me was:  you don&#8217;t need to test EVERYTHING.  That way lies pure madness.  When you are writing an object you can probably guess / know which parts are going to be &#8220;tricky&#8221; / &#8220;open to errors&#8221;.  So test those.  (i.e. replace debugger time with test writing time to make certain you coded it correctly)  Don&#8217;t fret over not testing whether or not the the setName( const std::string&#038; p_newName ) actually set the name when the code for that is something like:</p>
<p>void SomeNamespace::SomeClass::setName( const std::string&#038; p_newName )</p>
<p>{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;m_impl->name = p_newName;</p>
<p>}</p>
<p>I think _PURE TDD_ would require that a test be written, have it fail, then go write the above and smile when it worked.  And for some of the crazy string classes out there you maybe would want to actually test that!  But to me that is going to be in the 20% in the 80/20 rule of what needs to be tested.  Of course if this manages to fail at some point, a test shall be created with all due haste!</p>
<p>But something like:</p>
<p>std::string getFullName() const;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;// returns the full name of the player.  First and last name are capitalized and the title is prepended to the name iff there is a title.  Additionally the guild affiliation is attached to the end also.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;// NOTE:  we probably don&#8217;t want the guild name included in this but that is what design wants at this time.</p>
<p>That probably gets some tests where you have you test all of the conditions.</p>
<p>ahh part 3 is up it seems and this comment will be lost forever! haha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IndieGameDev</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-143</link>
		<dc:creator>IndieGameDev</dc:creator>
		<pubDate>Sat, 05 Mar 2005 16:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-143</guid>
		<description>&lt;strong&gt;Games from Within&lt;/strong&gt;







&lt;a href=&quot;http://www.gamesfromwithin.com&quot; rel=&quot;nofollow&quot;&gt;Games from Within&lt;/a&gt; is a weblog written by &lt;a href=&quot;http://www.gamesfromwithin.com/aboutme.html&quot; rel=&quot;nofollow&quot;&gt;Noel Llopis&lt;/a&gt;,

who has a pretty impressive game d...</description>
		<content:encoded><![CDATA[<p><strong>Games from Within</strong></p>
<p><a href="http://www.gamesfromwithin.com" rel="nofollow">Games from Within</a> is a weblog written by <a href="http://www.gamesfromwithin.com/aboutme.html" rel="nofollow">Noel Llopis</a>,</p>
<p>who has a pretty impressive game d&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yarpen's Gamedev Ramblings</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-142</link>
		<dc:creator>Yarpen's Gamedev Ramblings</dc:creator>
		<pubDate>Sat, 05 Mar 2005 15:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-142</guid>
		<description>&lt;strong&gt;Test Driven Development&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Test Driven Development</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Plunket</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-140</link>
		<dc:creator>Tom Plunket</dc:creator>
		<pubDate>Tue, 01 Mar 2005 00:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-140</guid>
		<description>TDD adds code, but removes complexity.  Try it in earnest for a few days and I&#039;m sure you&#039;ll see for yourself.



The stunningly wonderful thing about TDD is that you often end up with code that is far simpler than you previously envisioned.



TDD has helped me discover algorithms, has helped me learn how to be a better programmer, and has shown me bugs in middleware.  I&#039;ve been sold on it for a while...



Good luck, though.  It&#039;s a bit tricky to get into for a number of reasons, not the least of which is feeling less productive at first.  This feeling soon goes away, and is replaced by the complementary feeling that you&#039;re on a tightrope without a net if you&#039;re &quot;required&quot; to work without tests...</description>
		<content:encoded><![CDATA[<p>TDD adds code, but removes complexity.  Try it in earnest for a few days and I&#8217;m sure you&#8217;ll see for yourself.</p>
<p>The stunningly wonderful thing about TDD is that you often end up with code that is far simpler than you previously envisioned.</p>
<p>TDD has helped me discover algorithms, has helped me learn how to be a better programmer, and has shown me bugs in middleware.  I&#8217;ve been sold on it for a while&#8230;</p>
<p>Good luck, though.  It&#8217;s a bit tricky to get into for a number of reasons, not the least of which is feeling less productive at first.  This feeling soon goes away, and is replaced by the complementary feeling that you&#8217;re on a tightrope without a net if you&#8217;re &#8220;required&#8221; to work without tests&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy Zelsnack</title>
		<link>http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2/comment-page-1#comment-139</link>
		<dc:creator>Billy Zelsnack</dc:creator>
		<pubDate>Sun, 27 Feb 2005 16:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=325#comment-139</guid>
		<description>My Problem with TDD has always been that it conflicts with some of my other code practices. I&#039;m a big fan of KISS in its usual form and in keeping the raw amount of code to a minimum. I believe that less code (to a point) and less complexity (to a point) is almost always best. TDD adds more code and more complexity and that is where my conflict lives. With TDD you not only have to maintain a normal codebase, but a secondary one which is may be just as large.

However.. After reading this article I&#039;ll be a sport and give it another go (5th times a charm?). Maybe with my previous attempts I have just missed something. I totally &quot;get&quot; why TDD could be so awesome. I just have not been able to achieve enough &quot;awesomeness&quot; to compromise/modify my programming morals.</description>
		<content:encoded><![CDATA[<p>My Problem with TDD has always been that it conflicts with some of my other code practices. I&#8217;m a big fan of KISS in its usual form and in keeping the raw amount of code to a minimum. I believe that less code (to a point) and less complexity (to a point) is almost always best. TDD adds more code and more complexity and that is where my conflict lives. With TDD you not only have to maintain a normal codebase, but a secondary one which is may be just as large.</p>
<p>However.. After reading this article I&#8217;ll be a sport and give it another go (5th times a charm?). Maybe with my previous attempts I have just missed something. I totally &#8220;get&#8221; why TDD could be so awesome. I just have not been able to achieve enough &#8220;awesomeness&#8221; to compromise/modify my programming morals.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

