<?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 for Engineering Game Development</title>
	<atom:link href="http://leewinder.co.uk/blog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://leewinder.co.uk/blog</link>
	<description>Lee Winder, Technical Manager at BlitzTech on Software Engineering, Game Development and Education</description>
	<lastBuildDate>Fri, 16 Apr 2010 18:27:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Why We Use ReviewBoard For Code Reviews by RFID Reader</title>
		<link>http://leewinder.co.uk/blog/?p=157&#038;cpage=1#comment-285</link>
		<dc:creator>RFID Reader</dc:creator>
		<pubDate>Fri, 16 Apr 2010 18:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.spreetree.net/blog/?p=157#comment-285</guid>
		<description>wonderful share, great article, very usefull for me...thanks</description>
		<content:encoded><![CDATA[<p>wonderful share, great article, very usefull for me&#8230;thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Replacing The STL by Lorenzo Gatti</title>
		<link>http://leewinder.co.uk/blog/?p=7&#038;cpage=1#comment-283</link>
		<dc:creator>Lorenzo Gatti</dc:creator>
		<pubDate>Tue, 13 Apr 2010 13:29:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.spreetree.net/blog/?p=7#comment-283</guid>
		<description>&quot;...when what you think is a simple container actually uses another STL class that is wholly inappropriate for game development. By only implementing the classes that are deemed ’suitable’ this problem can easily be removed.&quot;

If you don&#039;t know what you are doing, you shouldn&#039;t blame the tools you are misusing; it makes as much sense as using nails because you don&#039;t want to buy a screwdriver.

Moreover, what makes data structures and algorithms &#039;wholly inappropriate for game development&#039; or &#039;suitable&#039;? How can you tell before having an actual need? The STL provides some general purpose data structures, while this design attitude is likely to constrain you with overspecialized solutions.</description>
		<content:encoded><![CDATA[<p>&#8220;&#8230;when what you think is a simple container actually uses another STL class that is wholly inappropriate for game development. By only implementing the classes that are deemed ’suitable’ this problem can easily be removed.&#8221;</p>
<p>If you don&#8217;t know what you are doing, you shouldn&#8217;t blame the tools you are misusing; it makes as much sense as using nails because you don&#8217;t want to buy a screwdriver.</p>
<p>Moreover, what makes data structures and algorithms &#8216;wholly inappropriate for game development&#8217; or &#8217;suitable&#8217;? How can you tell before having an actual need? The STL provides some general purpose data structures, while this design attitude is likely to constrain you with overspecialized solutions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by Lee Winder</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-272</link>
		<dc:creator>Lee Winder</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:05:31 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-272</guid>
		<description>@James

I don&#039;t believe any of the inconsistencies between platforms are really being resolved in the next release of the C++ standard - I just don&#039;t think it&#039;s at the top of anyones list nor would it be possible.  Even if some of the points were revised to make the behaviour standard across all implementations, it still wouldn&#039;t be perfect.  There would always be areas of &#039;interpretation&#039; and simple human error would introduce differences across vendor implementations.

The thing I would like to see is clarification, simplification and standardisation of allocator models in the STL.

The EASTL document is a fantastic read and I&#039;d recommend anyone to read it, even if they were going with an implementation that was already out there.</description>
		<content:encoded><![CDATA[<p>@James</p>
<p>I don&#8217;t believe any of the inconsistencies between platforms are really being resolved in the next release of the C++ standard &#8211; I just don&#8217;t think it&#8217;s at the top of anyones list nor would it be possible.  Even if some of the points were revised to make the behaviour standard across all implementations, it still wouldn&#8217;t be perfect.  There would always be areas of &#8216;interpretation&#8217; and simple human error would introduce differences across vendor implementations.</p>
<p>The thing I would like to see is clarification, simplification and standardisation of allocator models in the STL.</p>
<p>The EASTL document is a fantastic read and I&#8217;d recommend anyone to read it, even if they were going with an implementation that was already out there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Anatomy of a Smart Pointer by Lee Winder</title>
		<link>http://leewinder.co.uk/blog/?p=24&#038;cpage=1#comment-271</link>
		<dc:creator>Lee Winder</dc:creator>
		<pubDate>Tue, 09 Mar 2010 21:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.spreetree.net/blog/?p=24#comment-271</guid>
		<description>I believe that was the difference with the newer version of the smart pointer and assertion on use in the copy constructor/operator.  It&#039;s drastically improved the way in which people control the behaviour of the pointers for the better.

I would generally agree with you.  For personal projects, where code size and performance isn&#039;t as important as at work, I would dip into Boost or a cross platform STL implementation without a doubt so I can skip to other areas I tend not to have the opportunity to concentrate on at work.reasons.</description>
		<content:encoded><![CDATA[<p>I believe that was the difference with the newer version of the smart pointer and assertion on use in the copy constructor/operator.  It&#8217;s drastically improved the way in which people control the behaviour of the pointers for the better.</p>
<p>I would generally agree with you.  For personal projects, where code size and performance isn&#8217;t as important as at work, I would dip into Boost or a cross platform STL implementation without a doubt so I can skip to other areas I tend not to have the opportunity to concentrate on at work.reasons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by Alexey Orlov</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-265</link>
		<dc:creator>Alexey Orlov</dc:creator>
		<pubDate>Thu, 04 Mar 2010 11:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-265</guid>
		<description>@James There is one caveat of using STL - it have different goals in mind. 
For example we use (exclusively) containers that do NOT call constructors. For most cases you should use STL&#039;s allocators to get what you need (proper align, budgeting, etc) and it&#039;s not that straightforward, plus you can&#039;t control how much memory is allocated etc. 
As a sidenote we&#039;re currently using 6 arrays (not one stl&#039;s vector) ;-). Hashtab instead of map (I know it will be in 0x). So that&#039;s the question not only of portability/performance but also of really custom tasks</description>
		<content:encoded><![CDATA[<p>@James There is one caveat of using STL &#8211; it have different goals in mind.<br />
For example we use (exclusively) containers that do NOT call constructors. For most cases you should use STL&#8217;s allocators to get what you need (proper align, budgeting, etc) and it&#8217;s not that straightforward, plus you can&#8217;t control how much memory is allocated etc.<br />
As a sidenote we&#8217;re currently using 6 arrays (not one stl&#8217;s vector) <img src='http://leewinder.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Hashtab instead of map (I know it will be in 0x). So that&#8217;s the question not only of portability/performance but also of really custom tasks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by James Munro</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-264</link>
		<dc:creator>James Munro</dc:creator>
		<pubDate>Wed, 03 Mar 2010 13:02:51 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-264</guid>
		<description>Actually, I made a mistake there - its just a white-paper available describing EASTL. Still interesting stuff though!</description>
		<content:encoded><![CDATA[<p>Actually, I made a mistake there &#8211; its just a white-paper available describing EASTL. Still interesting stuff though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by James Munro</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-263</link>
		<dc:creator>James Munro</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-263</guid>
		<description>Lee - thanks for the useful reply. I&#039;d not heard of STLport, infact I hadn&#039;t even really considered that cross-platform issues would arise with vanilla STL. I wonder, is the unique behaviour of STL on other platforms something that can be improved in future C++ standards? I&#039;m going to check out EASTL, I was pleased to discover they had open-sourced it.

I would also guess that &#039;Not Invented Here&#039; syndrome applies in many situations :)</description>
		<content:encoded><![CDATA[<p>Lee &#8211; thanks for the useful reply. I&#8217;d not heard of STLport, infact I hadn&#8217;t even really considered that cross-platform issues would arise with vanilla STL. I wonder, is the unique behaviour of STL on other platforms something that can be improved in future C++ standards? I&#8217;m going to check out EASTL, I was pleased to discover they had open-sourced it.</p>
<p>I would also guess that &#8216;Not Invented Here&#8217; syndrome applies in many situations <img src='http://leewinder.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by Lee Winder</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-262</link>
		<dc:creator>Lee Winder</dc:creator>
		<pubDate>Wed, 03 Mar 2010 08:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-262</guid>
		<description>@James

Hi James, don&#039;t worry about it not being about testing, any discussion is worth having no matter where it&#039;s done :)

Unfortunately the question you ask is not an easy one.  Ask 10 game developers and you&#039;ll probably get 13 different answers so all I can do is give you my opinion and see where it fits with what you already know.

The idea of the STL is great for game development, especially in companies with shared code bases or technology.  Having 4 projects being developed using 4 different types of list just isn&#039;t sustainable, and I&#039;ve always stressed that your version of a link list is understood by you and a couple of others but std::list is understood by thousands (or millions) of developers out there.

But you have a risk, especially in cross platform development, of using an external implementation.  If you were to stick with the platform vendors version, you&#039;re on a road to nowhere.  In the linked article, it&#039;s mentioned that in the VS implementation, clear() frees memory.  That&#039;s fine, we can deal with that, until you run on another platform which doesn&#039;t free the memory.  Such fundamental differences make it a nightmare to develop like this as you have to be aware of every platforms quirks when it really should be standard across them all.

Some companies  I know have taken an implementation (STLPort for example) and made it their own, added it to their repositories and tweaked and developed it when needed.  This avoids the cross-platform issues but it still comes with a lot of bloat.  There are some fantastic containers in the STL, but sometimes it&#039;s best to not use them for all the reasons mentioned, but when the opportunity is there, it&#039;s easy to &#039;just use it this once&#039;.  But this is certainly the fastest approach that avoids a lot of the problems you can have with external libraries.

Speed is often used as an excuse to not develop your own containers, and I would often agree - if you don&#039;t have the time to fully optimise (or test) it will probably be slower (or broken) - but if you do, there is nothing stopping it being as fast or faster.  We&#039;ve benchmarked our internal STL implementation quite extensively, and it is slower in some cases but in the majority (and in areas we care about) it&#039;s as fast or faster on all platforms, which is something we could specifically aim for.

If I was doing something on my own at home, or if I was at a smaller company without shared tech or code, I would be very tempted to use an external STL implementation (a cross platform one - not a vendor implemented one) as the overhead of a custom implementation either wouldn&#039;t be worth it or would be too costly.  

Like I said, this is all my own opinion, and (if Twitter is anything to go by) you&#039;d get some very opposite comments on the topic, but it&#039;s what fits your needs at the time.

I&#039;ve written a &lt;a href=&quot;http://leewinder.co.uk/blog/?cat=22&quot; rel=&quot;nofollow&quot;&gt;couple of posts in the past&lt;/a&gt; related to our implementation based on the STL (which I hope to continue writing about soon) so that might give you a bit more information too.</description>
		<content:encoded><![CDATA[<p>@James</p>
<p>Hi James, don&#8217;t worry about it not being about testing, any discussion is worth having no matter where it&#8217;s done <img src='http://leewinder.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Unfortunately the question you ask is not an easy one.  Ask 10 game developers and you&#8217;ll probably get 13 different answers so all I can do is give you my opinion and see where it fits with what you already know.</p>
<p>The idea of the STL is great for game development, especially in companies with shared code bases or technology.  Having 4 projects being developed using 4 different types of list just isn&#8217;t sustainable, and I&#8217;ve always stressed that your version of a link list is understood by you and a couple of others but std::list is understood by thousands (or millions) of developers out there.</p>
<p>But you have a risk, especially in cross platform development, of using an external implementation.  If you were to stick with the platform vendors version, you&#8217;re on a road to nowhere.  In the linked article, it&#8217;s mentioned that in the VS implementation, clear() frees memory.  That&#8217;s fine, we can deal with that, until you run on another platform which doesn&#8217;t free the memory.  Such fundamental differences make it a nightmare to develop like this as you have to be aware of every platforms quirks when it really should be standard across them all.</p>
<p>Some companies  I know have taken an implementation (STLPort for example) and made it their own, added it to their repositories and tweaked and developed it when needed.  This avoids the cross-platform issues but it still comes with a lot of bloat.  There are some fantastic containers in the STL, but sometimes it&#8217;s best to not use them for all the reasons mentioned, but when the opportunity is there, it&#8217;s easy to &#8216;just use it this once&#8217;.  But this is certainly the fastest approach that avoids a lot of the problems you can have with external libraries.</p>
<p>Speed is often used as an excuse to not develop your own containers, and I would often agree &#8211; if you don&#8217;t have the time to fully optimise (or test) it will probably be slower (or broken) &#8211; but if you do, there is nothing stopping it being as fast or faster.  We&#8217;ve benchmarked our internal STL implementation quite extensively, and it is slower in some cases but in the majority (and in areas we care about) it&#8217;s as fast or faster on all platforms, which is something we could specifically aim for.</p>
<p>If I was doing something on my own at home, or if I was at a smaller company without shared tech or code, I would be very tempted to use an external STL implementation (a cross platform one &#8211; not a vendor implemented one) as the overhead of a custom implementation either wouldn&#8217;t be worth it or would be too costly.  </p>
<p>Like I said, this is all my own opinion, and (if Twitter is anything to go by) you&#8217;d get some very opposite comments on the topic, but it&#8217;s what fits your needs at the time.</p>
<p>I&#8217;ve written a <a href="http://leewinder.co.uk/blog/?cat=22" rel="nofollow">couple of posts in the past</a> related to our implementation based on the STL (which I hope to continue writing about soon) so that might give you a bit more information too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by Lee Winder</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-261</link>
		<dc:creator>Lee Winder</dc:creator>
		<pubDate>Wed, 03 Mar 2010 08:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-261</guid>
		<description>@Liam

You&#039;re right in that RTTI is not enabled.  We are generally used to living without RTTI in game development, especially in runtime code, so not having it enabled is the default setting.  We could use it, in that we also usually don&#039;t have exceptions enabled except in test code, but it&#039;s something I&#039;m simply used to not working with.

This is still test driven development, though it certainly isn&#039;t pure TDD as you mention (I don&#039;t write a failing test, make it work, write another one etc.).  Implementation and testing are written at the same time for one of the objects, sometimes test first but usually a feature of the object and then the related tests which feedback into the implementation.  

When another object is being developed tests can be introduced in the same manner, usually by removing them from a compiled out block of code, so the same process is followed, just with tests that happen to already be there.

It&#039;s also interesting in that one of the benefits of TDD is that you refactoring towards a solid, usable interface, which when developing against a fixed standard like the STL, is already done for you.  But every process needs to be flexible to the people using it.

Quite often the related classes (for example vector and fixed vector) are totally separate entities, with no shared based class (either functionally or as a pure interface).  This is by design to avoid the overhead of inheritance and virtual functions so in this case the ability to extract common code is very limited, and even if it was, so much of the objects take into account how they are implemented that even simple functions like empty() and size() are unique to the type of object being developed.  

As you mention, it is using the unit testing process to enforce a common interface and common behaviour and as a benefit places all the work and overhead of enforcing that into a project that is only used during development.</description>
		<content:encoded><![CDATA[<p>@Liam</p>
<p>You&#8217;re right in that RTTI is not enabled.  We are generally used to living without RTTI in game development, especially in runtime code, so not having it enabled is the default setting.  We could use it, in that we also usually don&#8217;t have exceptions enabled except in test code, but it&#8217;s something I&#8217;m simply used to not working with.</p>
<p>This is still test driven development, though it certainly isn&#8217;t pure TDD as you mention (I don&#8217;t write a failing test, make it work, write another one etc.).  Implementation and testing are written at the same time for one of the objects, sometimes test first but usually a feature of the object and then the related tests which feedback into the implementation.  </p>
<p>When another object is being developed tests can be introduced in the same manner, usually by removing them from a compiled out block of code, so the same process is followed, just with tests that happen to already be there.</p>
<p>It&#8217;s also interesting in that one of the benefits of TDD is that you refactoring towards a solid, usable interface, which when developing against a fixed standard like the STL, is already done for you.  But every process needs to be flexible to the people using it.</p>
<p>Quite often the related classes (for example vector and fixed vector) are totally separate entities, with no shared based class (either functionally or as a pure interface).  This is by design to avoid the overhead of inheritance and virtual functions so in this case the ability to extract common code is very limited, and even if it was, so much of the objects take into account how they are implemented that even simple functions like empty() and size() are unique to the type of object being developed.  </p>
<p>As you mention, it is using the unit testing process to enforce a common interface and common behaviour and as a benefit places all the work and overhead of enforcing that into a project that is only used during development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Objects with the Same Behaviour by Liam</title>
		<link>http://leewinder.co.uk/blog/?p=485&#038;cpage=1#comment-259</link>
		<dc:creator>Liam</dc:creator>
		<pubDate>Wed, 03 Mar 2010 00:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://leewinder.co.uk/blog/?p=485#comment-259</guid>
		<description>I take it either RTTI is not enabled for the tests or they generate unrecognisable names for the defines, otherwise you could stuff the types name into the test macro output message. (typeid()name())

To me it sounds like it is not test driven code instead tests after the fact, but you do make the point of saying whilst under development.

&quot;So for example, when developing a ring buffer style iterator, it was useful to know that the const and non-const versions produced the same results in a lot of different situations without having to have comparison tests or duplicating a large amount of test code.&quot;

Unit testing is _normally_ an iterative process with one step (also a continuing one) being the refactoring of the test code, is what you are suggesting an early refactor or is this a result of the being templated code? I would propose that the duplicating code is what could be abstracted out, which in essence is what you are doing by using the defines and inline files, leaving simple unit test which call into this code. 

As you mention that there is a upper bound which makes this implementation hard to read and I have a feeling that including the files in this manner may make the tests harder to read, yet obliviously you think this it is fine within reason.</description>
		<content:encoded><![CDATA[<p>I take it either RTTI is not enabled for the tests or they generate unrecognisable names for the defines, otherwise you could stuff the types name into the test macro output message. (typeid()name())</p>
<p>To me it sounds like it is not test driven code instead tests after the fact, but you do make the point of saying whilst under development.</p>
<p>&#8220;So for example, when developing a ring buffer style iterator, it was useful to know that the const and non-const versions produced the same results in a lot of different situations without having to have comparison tests or duplicating a large amount of test code.&#8221;</p>
<p>Unit testing is _normally_ an iterative process with one step (also a continuing one) being the refactoring of the test code, is what you are suggesting an early refactor or is this a result of the being templated code? I would propose that the duplicating code is what could be abstracted out, which in essence is what you are doing by using the defines and inline files, leaving simple unit test which call into this code. </p>
<p>As you mention that there is a upper bound which makes this implementation hard to read and I have a feeling that including the files in this manner may make the tests harder to read, yet obliviously you think this it is fine within reason.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
