<?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: Asserting Oneself</title>
	<atom:link href="http://gamesfromwithin.com/asserting-oneself/feed" rel="self" type="application/rss+xml" />
	<link>http://gamesfromwithin.com/asserting-oneself</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: /* Rambling comments... */</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-267</link>
		<dc:creator>/* Rambling comments... */</dc:creator>
		<pubDate>Mon, 24 Oct 2005 10:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-267</guid>
		<description>&lt;strong&gt;Asserts are evil, except when you have no other choice&lt;/strong&gt;







Noel Llopis over on &quot;Games from Within&quot; has written a nice rebuttal to my Asserts are evil post and the follow up. I think it&#039;s probably about time to wrap this up ;) So, here&#039;s what I&#039;ve learned... [Updated: 24th...</description>
		<content:encoded><![CDATA[<p><strong>Asserts are evil, except when you have no other choice</strong></p>
<p>Noel Llopis over on &#8220;Games from Within&#8221; has written a nice rebuttal to my Asserts are evil post and the follow up. I think it&#8217;s probably about time to wrap this up <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  So, here&#8217;s what I&#8217;ve learned&#8230; [Updated: 24th&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-260</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Mon, 24 Oct 2005 10:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-260</guid>
		<description>Terence



No, I think you&#039;re missing MY point. ;)



The &#039;internal&#039; regarding development argument is one of the arguments used by several reference works that people have used to defend their use of assert. However, it doesn&#039;t actually make any difference; it&#039;s equally applicable to your data example. Lets say you have a function, A(), that accepts a user&#039;s password. You have error checking here to ensure that the data is consistent with what you expect because you can&#039;t control the source and may have to report errors to the user. We&#039;re both in agreement on this.



Now, A() calls B(). Right now nothing except A() calls B() and the data that is passed to B() is checked in A() so you would say that you could simply assert it is valid. My view is that although nothing calls B() with untrusted data YET it may do one day and it&#039;s not always easy to know when that day occurs. Sure, code reviews will likely spot it but not everyone has those... As soon as B() can be called with potentially unchecked data then your use of assert is less useful. Sure you might happen to trigger the assert during your development and testing but you might not. If you don&#039;t and you build a release build and your asserts happen to be compiled out then users of B() can pass in invalid data. If you leave the assert in then users of B() have to accept that you have two different ways of dealing with and reporting errors. A() reports one way because you expected it to perhaps receive invalid data and B() reports another way because you thought it could never get invalid data. You were wrong, your interface is more complicated and/or broken.



So my approach is to suggest that we avoid an assert and instead look at other ways to ensure that the data passed to B() is &quot;always valid&quot;. It may be that we simply repeat the tests that we have in A(). Sometimes this is appropriate. Sometimes it is not. Personally I don&#039;t think that&#039;s actually what I&#039;d do in this case. I expect I&#039;d change the design of B() so that it accepts a different data type. This is where my original complaints about asserts simply being sticking plasters over bad design comes in... Pass B() a &quot;validated password&quot; object rather than a string and it&#039;s now the responsibility of the validated password object to ensure that it&#039;s always valid. The checks that happened in A() may change, they may move into constructor of the validated password object or whatever. Does this take longer to write? Possibly. However, the more you work in this way the less you even consider designing the code in the potentially broken way. The point being the data that is passed to B() is always valid. As a reader of the code you don&#039;t need to worry about where the data came from, you have tests that prove your &quot;validated password&quot; object can only ever contain a valid password and you forget about it everywhere else. You don&#039;t need to look at an assert at the top of every function that uses a password that must be &quot;valid&quot;. You don&#039;t need to duplicate that assert all over your code. You don&#039;t need to worry about it anymore. IMHO the code has become far easier to understand and much more robust.



As for optimisation. Yeah. I agree that you don&#039;t need to deliberately unoptimise. But I don&#039;t agree that compiling out error checking is a good idea.



I&#039;m not sure we&#039;re actually getting anywhere here. I think we both just have different viewpoints and that neither of us is going to change the other&#039;s mind. :)</description>
		<content:encoded><![CDATA[<p>Terence</p>
<p>No, I think you&#8217;re missing MY point. <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The &#8216;internal&#8217; regarding development argument is one of the arguments used by several reference works that people have used to defend their use of assert. However, it doesn&#8217;t actually make any difference; it&#8217;s equally applicable to your data example. Lets say you have a function, A(), that accepts a user&#8217;s password. You have error checking here to ensure that the data is consistent with what you expect because you can&#8217;t control the source and may have to report errors to the user. We&#8217;re both in agreement on this.</p>
<p>Now, A() calls B(). Right now nothing except A() calls B() and the data that is passed to B() is checked in A() so you would say that you could simply assert it is valid. My view is that although nothing calls B() with untrusted data YET it may do one day and it&#8217;s not always easy to know when that day occurs. Sure, code reviews will likely spot it but not everyone has those&#8230; As soon as B() can be called with potentially unchecked data then your use of assert is less useful. Sure you might happen to trigger the assert during your development and testing but you might not. If you don&#8217;t and you build a release build and your asserts happen to be compiled out then users of B() can pass in invalid data. If you leave the assert in then users of B() have to accept that you have two different ways of dealing with and reporting errors. A() reports one way because you expected it to perhaps receive invalid data and B() reports another way because you thought it could never get invalid data. You were wrong, your interface is more complicated and/or broken.</p>
<p>So my approach is to suggest that we avoid an assert and instead look at other ways to ensure that the data passed to B() is &#8220;always valid&#8221;. It may be that we simply repeat the tests that we have in A(). Sometimes this is appropriate. Sometimes it is not. Personally I don&#8217;t think that&#8217;s actually what I&#8217;d do in this case. I expect I&#8217;d change the design of B() so that it accepts a different data type. This is where my original complaints about asserts simply being sticking plasters over bad design comes in&#8230; Pass B() a &#8220;validated password&#8221; object rather than a string and it&#8217;s now the responsibility of the validated password object to ensure that it&#8217;s always valid. The checks that happened in A() may change, they may move into constructor of the validated password object or whatever. Does this take longer to write? Possibly. However, the more you work in this way the less you even consider designing the code in the potentially broken way. The point being the data that is passed to B() is always valid. As a reader of the code you don&#8217;t need to worry about where the data came from, you have tests that prove your &#8220;validated password&#8221; object can only ever contain a valid password and you forget about it everywhere else. You don&#8217;t need to look at an assert at the top of every function that uses a password that must be &#8220;valid&#8221;. You don&#8217;t need to duplicate that assert all over your code. You don&#8217;t need to worry about it anymore. IMHO the code has become far easier to understand and much more robust.</p>
<p>As for optimisation. Yeah. I agree that you don&#8217;t need to deliberately unoptimise. But I don&#8217;t agree that compiling out error checking is a good idea.</p>
<p>I&#8217;m not sure we&#8217;re actually getting anywhere here. I think we both just have different viewpoints and that neither of us is going to change the other&#8217;s mind. <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terence Ou</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-259</link>
		<dc:creator>Terence Ou</dc:creator>
		<pubDate>Mon, 24 Oct 2005 02:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-259</guid>
		<description>Len,



I apologize for not having made things clear. Infact, your reply was totally off which was really my fault. I didn&#039;t mean to say internal regarding internal or external developers. What I meant was for examples like data. Pointers passed into another function/method is data (internal if we don&#039;t consider COM or distributed computing, etc), just like information from file or database is data, and how they should be handled differently. If the function or method is receiving an invalid pointer, its the violation caused by the programmer who is using the interface because he/she is not fulfilling the contract. But who can have control over a person entering the wrong password or username or can you control the success of a database transaction? You can&#039;t and so you can&#039;t assert but instead use validation and error handling code. And it should happen there and then where it happens and not have to handle it again by passing in something invalid like a null pointer just because a transaction failed and so some new couldn&#039;t be done and another method is still allowed to be called using the invalid pointer(Of course exception handling might be abit different but we leave that out for now).



As for optimization, just to keep the both of us insync with what optimization is all about. Optimization is not all about profiling first before you decide what is wrong and optimitize. Profiling first is a practice for optimizing code but you don&#039;t have to go through a profile just to get your code optimized where possible, it can happen in your own coding habits. Does the optimization from i++ to ++i require a profiling before you do that? It doesn&#039;t because as long as you don&#039;t need the initial temporary returned by i++ you can just keep it optimized as a habit. The optimization might be small or insignificant, but hey if its got no implications and can be apart of your habits, why not. Its delibrately thinking up all sorts of &quot;smart&quot; optimization techniques without first coding out working code that is the problem that leads to pre-optimization. But for some things, you just know and you just make it a totally harmless habit that totally doesn&#039;t violate &quot;Profile First Before Optimization&quot;.</description>
		<content:encoded><![CDATA[<p>Len,</p>
<p>I apologize for not having made things clear. Infact, your reply was totally off which was really my fault. I didn&#8217;t mean to say internal regarding internal or external developers. What I meant was for examples like data. Pointers passed into another function/method is data (internal if we don&#8217;t consider COM or distributed computing, etc), just like information from file or database is data, and how they should be handled differently. If the function or method is receiving an invalid pointer, its the violation caused by the programmer who is using the interface because he/she is not fulfilling the contract. But who can have control over a person entering the wrong password or username or can you control the success of a database transaction? You can&#8217;t and so you can&#8217;t assert but instead use validation and error handling code. And it should happen there and then where it happens and not have to handle it again by passing in something invalid like a null pointer just because a transaction failed and so some new couldn&#8217;t be done and another method is still allowed to be called using the invalid pointer(Of course exception handling might be abit different but we leave that out for now).</p>
<p>As for optimization, just to keep the both of us insync with what optimization is all about. Optimization is not all about profiling first before you decide what is wrong and optimitize. Profiling first is a practice for optimizing code but you don&#8217;t have to go through a profile just to get your code optimized where possible, it can happen in your own coding habits. Does the optimization from i++ to ++i require a profiling before you do that? It doesn&#8217;t because as long as you don&#8217;t need the initial temporary returned by i++ you can just keep it optimized as a habit. The optimization might be small or insignificant, but hey if its got no implications and can be apart of your habits, why not. Its delibrately thinking up all sorts of &#8220;smart&#8221; optimization techniques without first coding out working code that is the problem that leads to pre-optimization. But for some things, you just know and you just make it a totally harmless habit that totally doesn&#8217;t violate &#8220;Profile First Before Optimization&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-258</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Fri, 21 Oct 2005 17:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-258</guid>
		<description>Terence, sorry, just realised that I spelt your name wrong in the previous comment!</description>
		<content:encoded><![CDATA[<p>Terence, sorry, just realised that I spelt your name wrong in the previous comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-257</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Fri, 21 Oct 2005 17:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-257</guid>
		<description>Terrance



I guess my issue is the distinction between external and internal and how you define the difference and how that difference is affected by changes to the overal structure of the code.



I may be wrong but you appear to be saying that you should have different error handling policies for internal code and external code. I disagree with this as it means that the error handling policy would need to be changed as the internal/external code boundary moves.



Lets take a set of libraries that are maintained by a single group of developers as an example. 3 libraries: A, B and C. Initially only A has an API that faces the users of the library (other developers) and B and C are both used by A. As such some proponents of assert would suggest that any error checking done where B or C are called into from A should be done using assertions as breaking the contract is a programmer error and as the same team maintains A, B and C they should be alerted via an assert so that they can fix the bug. Likewise any calls internal to A (or B or C) that are not part of the public API could use asserts rather than other error handling as, again, it&#039;s a programmer error. I disagree with this approach because it introduces two levels of error checking, one for the public API and one for the &#039;internal&#039; API. This makes the error checking fragile in the face of changes to the structure of the code. So, my suggestion has been that you should avoid two error handling policies and simply adopt the external error handling policy across the whole codebase.



Suppose libraries B and/or C grow larger and more important than they were before and therefore their development and maintenance is moved to a separate team. The interface between A and B/C has now gone from &#039;internal&#039; to &#039;public&#039;. This means that, theoretically, the error handling policy needs to be revisited and code potentially needs to be changed just because the codebase has moved from the care of one team to another... To me this seems wrong. Likewise, if a previously internal method of A is needed to be exposed from the public API then its error handling policy needs to be reviewed.



Since this distinction between &#039;internal&#039; and public APIs cannot be enforced in the languages that I use I tend to try and stay away from it and, instead, have a single error reporting strategy that I use consistently across all of the code.



I notice that you mention that you &#039;really optimize&#039; the application by using asserts. I&#039;d suggest that you only optimise the areas that need it and that you discover what needs it by profiling. As I&#039;ve said before, some internal programmer errors (I&#039;m thinking of threading and timing issues here mainly) may not show up as often in debug builds as in release builds and if your internal error checking goes away in release builds you may inadvertently trash data because of it...



So, in summary, my position is that by deciding to handle errors only at the obvious point of entry into your codebase (ie the public API) and assuming that errors internal to your codebase can be managed by asserts you&#039;re setting yourself up for either code changes or inconsistent error handling when code shifts from being internal to being public.



I agree completely on your idea that you should handle errors at the point of failure but I disagree that internal errors are any different from external errors. If there&#039;s a contract I want it to be enforced all the time.</description>
		<content:encoded><![CDATA[<p>Terrance</p>
<p>I guess my issue is the distinction between external and internal and how you define the difference and how that difference is affected by changes to the overal structure of the code.</p>
<p>I may be wrong but you appear to be saying that you should have different error handling policies for internal code and external code. I disagree with this as it means that the error handling policy would need to be changed as the internal/external code boundary moves.</p>
<p>Lets take a set of libraries that are maintained by a single group of developers as an example. 3 libraries: A, B and C. Initially only A has an API that faces the users of the library (other developers) and B and C are both used by A. As such some proponents of assert would suggest that any error checking done where B or C are called into from A should be done using assertions as breaking the contract is a programmer error and as the same team maintains A, B and C they should be alerted via an assert so that they can fix the bug. Likewise any calls internal to A (or B or C) that are not part of the public API could use asserts rather than other error handling as, again, it&#8217;s a programmer error. I disagree with this approach because it introduces two levels of error checking, one for the public API and one for the &#8216;internal&#8217; API. This makes the error checking fragile in the face of changes to the structure of the code. So, my suggestion has been that you should avoid two error handling policies and simply adopt the external error handling policy across the whole codebase.</p>
<p>Suppose libraries B and/or C grow larger and more important than they were before and therefore their development and maintenance is moved to a separate team. The interface between A and B/C has now gone from &#8216;internal&#8217; to &#8216;public&#8217;. This means that, theoretically, the error handling policy needs to be revisited and code potentially needs to be changed just because the codebase has moved from the care of one team to another&#8230; To me this seems wrong. Likewise, if a previously internal method of A is needed to be exposed from the public API then its error handling policy needs to be reviewed.</p>
<p>Since this distinction between &#8216;internal&#8217; and public APIs cannot be enforced in the languages that I use I tend to try and stay away from it and, instead, have a single error reporting strategy that I use consistently across all of the code.</p>
<p>I notice that you mention that you &#8216;really optimize&#8217; the application by using asserts. I&#8217;d suggest that you only optimise the areas that need it and that you discover what needs it by profiling. As I&#8217;ve said before, some internal programmer errors (I&#8217;m thinking of threading and timing issues here mainly) may not show up as often in debug builds as in release builds and if your internal error checking goes away in release builds you may inadvertently trash data because of it&#8230;</p>
<p>So, in summary, my position is that by deciding to handle errors only at the obvious point of entry into your codebase (ie the public API) and assuming that errors internal to your codebase can be managed by asserts you&#8217;re setting yourself up for either code changes or inconsistent error handling when code shifts from being internal to being public.</p>
<p>I agree completely on your idea that you should handle errors at the point of failure but I disagree that internal errors are any different from external errors. If there&#8217;s a contract I want it to be enforced all the time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terence Ou</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-256</link>
		<dc:creator>Terence Ou</dc:creator>
		<pubDate>Thu, 20 Oct 2005 08:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-256</guid>
		<description>Len



I&#039;m really glad that we could actually have a friendly discussion regarding the use of asserts.



Based on your previous post after reading Miro Samek&#039;s article, errors such as those encountered from database transactions, etc don&#039;t fall under the same category as that of the first class errors. Infact, they are no different from that of, user data entry validation, file reading, etc. The point was if whatever was invalid or might cause a problem came from an external source such as that of files, information for textboxes (data entry through forms, etc ) then they should be handled by manual means (error handling code). External source equals dangerous, internal = safe which is why we assert because internal pretty much means programmer code which should be fixed immediately by the programmer (thus the contract).



By doing so, we really optimize our applications because error handling is placed where it should be (information from dangerous sources) at the forefront while not requiring unnecessary error handling code behind which basically just serves as overhead in release builds.



Just to summarise a little. Error handling code is a must. Only thing is it should be placed where it should be at the very specific locations where the errors occur and not further down because if its already been handled, it shouldn&#039;t have to be handled further down. If it would be, it has to be a programmer&#039;s error. Thats why we use the asserts as contracts basically against programmer and not against external sources.



What&#039;s your take on that?</description>
		<content:encoded><![CDATA[<p>Len</p>
<p>I&#8217;m really glad that we could actually have a friendly discussion regarding the use of asserts.</p>
<p>Based on your previous post after reading Miro Samek&#8217;s article, errors such as those encountered from database transactions, etc don&#8217;t fall under the same category as that of the first class errors. Infact, they are no different from that of, user data entry validation, file reading, etc. The point was if whatever was invalid or might cause a problem came from an external source such as that of files, information for textboxes (data entry through forms, etc ) then they should be handled by manual means (error handling code). External source equals dangerous, internal = safe which is why we assert because internal pretty much means programmer code which should be fixed immediately by the programmer (thus the contract).</p>
<p>By doing so, we really optimize our applications because error handling is placed where it should be (information from dangerous sources) at the forefront while not requiring unnecessary error handling code behind which basically just serves as overhead in release builds.</p>
<p>Just to summarise a little. Error handling code is a must. Only thing is it should be placed where it should be at the very specific locations where the errors occur and not further down because if its already been handled, it shouldn&#8217;t have to be handled further down. If it would be, it has to be a programmer&#8217;s error. Thats why we use the asserts as contracts basically against programmer and not against external sources.</p>
<p>What&#8217;s your take on that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-255</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Thu, 13 Oct 2005 09:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-255</guid>
		<description>Terence



Interesting article; thanks for the recommendation. It&#039;s nice to see an embedded development perspective on it all.



I&#039;m surprised that you seem to think that I disagree with it. After all, the article clearly states that the author thinks that asserts should remain in the release build - which was item number 1 on my list of reasons that the standard assert macro was evil. He believes that these asserts are first class error checking code that deals with errors that do not need to be handled; which I agree with. Since he&#039;s working on embedded devices he can simply have these asserts reboot the machine, I&#039;m not that lucky, I need to ensure that locks are released and database transactions are rolled back and whatever so rather than terminate the application at the point of failure it works better for me to unroll the stack and allow the RAII idiom to do my clean up for me before catching the problem at a process/thread/other boundary and shutting down.



His views on programming by contract and defensive programming are very similar to mine. I want and get contract violations to fail reliably all the time and cause a large amount of pain. This gets the problem fixed rather than simply making the code &quot;robust&quot; to poor usage.



He doesn&#039;t mention actual C++ exceptions at all really, but then I wouldn&#039;t expect him to as the article is a C/C++ article and even if he&#039;s using C++, exceptions are not always available on embedded devices. The key point, for me, is that he compares his style of programmig using design by contract and assert to the style where all error values are passed back to the caller. Replacing his &#039;assert and reboot&#039; style with a throw and dont catch style doesn&#039;t change a great deal.



Still, if all of the stuff that I wrote about my views on this haven&#039;t convinced you by now then they&#039;re probably not going to. But just to ram the point home ;) I&#039;m actually advocating MORE checking for things that can&#039;t happen rather than less and I&#039;m suggesting that these checks are first class code and should be viewed as such...



Anyway, enough already...</description>
		<content:encoded><![CDATA[<p>Terence</p>
<p>Interesting article; thanks for the recommendation. It&#8217;s nice to see an embedded development perspective on it all.</p>
<p>I&#8217;m surprised that you seem to think that I disagree with it. After all, the article clearly states that the author thinks that asserts should remain in the release build &#8211; which was item number 1 on my list of reasons that the standard assert macro was evil. He believes that these asserts are first class error checking code that deals with errors that do not need to be handled; which I agree with. Since he&#8217;s working on embedded devices he can simply have these asserts reboot the machine, I&#8217;m not that lucky, I need to ensure that locks are released and database transactions are rolled back and whatever so rather than terminate the application at the point of failure it works better for me to unroll the stack and allow the RAII idiom to do my clean up for me before catching the problem at a process/thread/other boundary and shutting down.</p>
<p>His views on programming by contract and defensive programming are very similar to mine. I want and get contract violations to fail reliably all the time and cause a large amount of pain. This gets the problem fixed rather than simply making the code &#8220;robust&#8221; to poor usage.</p>
<p>He doesn&#8217;t mention actual C++ exceptions at all really, but then I wouldn&#8217;t expect him to as the article is a C/C++ article and even if he&#8217;s using C++, exceptions are not always available on embedded devices. The key point, for me, is that he compares his style of programmig using design by contract and assert to the style where all error values are passed back to the caller. Replacing his &#8216;assert and reboot&#8217; style with a throw and dont catch style doesn&#8217;t change a great deal.</p>
<p>Still, if all of the stuff that I wrote about my views on this haven&#8217;t convinced you by now then they&#8217;re probably not going to. But just to ram the point home <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I&#8217;m actually advocating MORE checking for things that can&#8217;t happen rather than less and I&#8217;m suggesting that these checks are first class code and should be viewed as such&#8230;</p>
<p>Anyway, enough already&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-254</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Wed, 12 Oct 2005 22:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-254</guid>
		<description>Terence, and others who might be interested,



The article by Miro Samek can be found here &lt;a href=&quot;http://www.quantum-leaps.com/writings/samek0308.pdf&quot; rel=&quot;nofollow&quot;&gt;http://www.quantum-leaps.com/writings/samek0308.pdf&lt;/a&gt;



I&#039;m off to read it now ;)</description>
		<content:encoded><![CDATA[<p>Terence, and others who might be interested,</p>
<p>The article by Miro Samek can be found here <a href="http://www.quantum-leaps.com/writings/samek0308.pdf" rel="nofollow">http://www.quantum-leaps.com/writings/samek0308.pdf</a></p>
<p>I&#8217;m off to read it now <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Len Holgate</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-253</link>
		<dc:creator>Len Holgate</dc:creator>
		<pubDate>Wed, 12 Oct 2005 22:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-253</guid>
		<description>Terence



What issue was it in?



I&#039;ve read a lot of stuff about when to use assert and I still disagree with most of it. I think it&#039;s possibly just that the nature of the work that I do, and the way that I do it, doesn&#039;t really allow for the &#039;human interaction&#039; involved with most uses of assert.</description>
		<content:encoded><![CDATA[<p>Terence</p>
<p>What issue was it in?</p>
<p>I&#8217;ve read a lot of stuff about when to use assert and I still disagree with most of it. I think it&#8217;s possibly just that the nature of the work that I do, and the way that I do it, doesn&#8217;t really allow for the &#8216;human interaction&#8217; involved with most uses of assert.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terence Ou</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-252</link>
		<dc:creator>Terence Ou</dc:creator>
		<pubDate>Tue, 11 Oct 2005 01:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-252</guid>
		<description>Len, I think you might want to checkout the idiom &quot;Programming By Contract&quot; and

also Miro Samek&#039;s article on using assertions in C/C++ Users&#039; Journal. It&#039;ll

tell you why you would prefer asserts to error checking everywhere and when to

use the error checking and when to assert. Infact, Noel&#039;s explainations come

close to what Miro Samek has written about.</description>
		<content:encoded><![CDATA[<p>Len, I think you might want to checkout the idiom &#8220;Programming By Contract&#8221; and</p>
<p>also Miro Samek&#8217;s article on using assertions in C/C++ Users&#8217; Journal. It&#8217;ll</p>
<p>tell you why you would prefer asserts to error checking everywhere and when to</p>
<p>use the error checking and when to assert. Infact, Noel&#8217;s explainations come</p>
<p>close to what Miro Samek has written about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radium Software Development</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-266</link>
		<dc:creator>Radium Software Development</dc:creator>
		<pubDate>Sun, 09 Oct 2005 23:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-266</guid>
		<description>&lt;strong&gt;Using Assert&lt;/strong&gt;







&#33258;&#20998;&#12364; assert &#12434;&#20351;&#12358;&#12371;&#12392;&#12434;&#35226;&#12360;&#12383;&#12398;&#12399;&#65292;&#12383;&#12375;&#12363; Steve Maguire &#12398; &quot;Writing Solid Code&quot; &#12384;&#12387;&#12383;&#12392;&#24605;&#12358;&amp;#12290...</description>
		<content:encoded><![CDATA[<p><strong>Using Assert</strong></p>
<p>&#33258;&#20998;&#12364; assert &#12434;&#20351;&#12358;&#12371;&#12392;&#12434;&#35226;&#12360;&#12383;&#12398;&#12399;&#65292;&#12383;&#12375;&#12363; Steve Maguire &#12398; &#8220;Writing Solid Code&#8221; &#12384;&#12387;&#12383;&#12392;&#24605;&#12358;&#12290&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel Llopis</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-251</link>
		<dc:creator>Noel Llopis</dc:creator>
		<pubDate>Sun, 09 Oct 2005 23:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-251</guid>
		<description>gman, about overriding assert, you will probably always want to break in the debugger if you&#039;re debugging. So just because you provide your own custom implementation, it doesn&#039;t mean you lose any of the functionality of the default assert (that&#039;s what _asm int 3 will do on an Intel processor).



Also, when you provide your own implementation, you can have it break in your code, and not in the assert implementation, which is a lot nicer for debugging (otherwise you&#039;re always having to backtrack a couple levels in the call stack).



Check out the article in Game Programming Gems 1. It&#039;s really worthwhile if you&#039;re doing C++ development.</description>
		<content:encoded><![CDATA[<p>gman, about overriding assert, you will probably always want to break in the debugger if you&#8217;re debugging. So just because you provide your own custom implementation, it doesn&#8217;t mean you lose any of the functionality of the default assert (that&#8217;s what _asm int 3 will do on an Intel processor).</p>
<p>Also, when you provide your own implementation, you can have it break in your code, and not in the assert implementation, which is a lot nicer for debugging (otherwise you&#8217;re always having to backtrack a couple levels in the call stack).</p>
<p>Check out the article in Game Programming Gems 1. It&#8217;s really worthwhile if you&#8217;re doing C++ development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: /* Rambling comments... */</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-265</link>
		<dc:creator>/* Rambling comments... */</dc:creator>
		<pubDate>Sun, 09 Oct 2005 21:03:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-265</guid>
		<description>&lt;strong&gt;I don&#039;t think I&#039;ve ever been disagreed with in Japanese before&lt;/strong&gt;







The discussion on Assert goes on, this time in Japanese... Google&#039;s language tools lead me to believer that they&#039;re disagreeing with me. They seem to be pretty shocked that I&#039;d take this stance and appear happier when Noel puts me...</description>
		<content:encoded><![CDATA[<p><strong>I don&#8217;t think I&#8217;ve ever been disagreed with in Japanese before</strong></p>
<p>The discussion on Assert goes on, this time in Japanese&#8230; Google&#8217;s language tools lead me to believer that they&#8217;re disagreeing with me. They seem to be pretty shocked that I&#8217;d take this stance and appear happier when Noel puts me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elegant Chaos</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-264</link>
		<dc:creator>Elegant Chaos</dc:creator>
		<pubDate>Sun, 09 Oct 2005 01:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-264</guid>
		<description>&lt;strong&gt;Asserting Oneself&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Asserting Oneself</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jogobom</title>
		<link>http://gamesfromwithin.com/asserting-oneself/comment-page-1#comment-263</link>
		<dc:creator>jogobom</dc:creator>
		<pubDate>Sun, 09 Oct 2005 01:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamesfromwithin.dreamhosters.com/?p=337#comment-263</guid>
		<description>&lt;strong&gt;Be Assertive&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Be Assertive</strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>

