<?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: Use of Asserts in Unit-Tested Code</title>
	<atom:link href="http://tartley.com/?feed=rss2&#038;p=916" rel="self" type="application/rss+xml" />
	<link>http://tartley.com/?p=916</link>
	<description>A website dedicated to oneself has been described as the greatest act of hubris. Welcome aboard.</description>
	<lastBuildDate>Tue, 31 Aug 2010 21:51:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Juho Vepsäläinen</title>
		<link>http://tartley.com/?p=916&#038;cpage=1#comment-24583</link>
		<dc:creator>Juho Vepsäläinen</dc:creator>
		<pubDate>Sun, 29 Nov 2009 15:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://tartley.com/?p=916#comment-24583</guid>
		<description>Hi,

For some reason my original lengthy comment didn&#039;t make it through... I converted the comment into a blog post which you may find at http://nixtu.blogspot.com/2009/11/usage-of-assertions.html .</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>For some reason my original lengthy comment didn&#8217;t make it through&#8230; I converted the comment into a blog post which you may find at <a href="http://nixtu.blogspot.com/2009/11/usage-of-assertions.html" rel="nofollow">http://nixtu.blogspot.com/2009/11/usage-of-assertions.html</a> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MANUELG</title>
		<link>http://tartley.com/?p=916&#038;cpage=1#comment-24568</link>
		<dc:creator>MANUELG</dc:creator>
		<pubDate>Sat, 28 Nov 2009 04:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://tartley.com/?p=916#comment-24568</guid>
		<description>In production code, I use asserts to test conditions that I cannot fathom how they could be violated, but that I cannot prove or unit-test that the condition cannot be violated, in any and all situations. I want the production code to &quot;fail-fast&quot; before beginning at the assert, because I know that if the condition IS violated, there is zero chance of the algorithm performing correctly. In these cases I am privately wishing for the assert to fail, because then I will have learned something very surprising.</description>
		<content:encoded><![CDATA[<p>In production code, I use asserts to test conditions that I cannot fathom how they could be violated, but that I cannot prove or unit-test that the condition cannot be violated, in any and all situations. I want the production code to &#8220;fail-fast&#8221; before beginning at the assert, because I know that if the condition IS violated, there is zero chance of the algorithm performing correctly. In these cases I am privately wishing for the assert to fail, because then I will have learned something very surprising.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tartley</title>
		<link>http://tartley.com/?p=916&#038;cpage=1#comment-24563</link>
		<dc:creator>tartley</dc:creator>
		<pubDate>Fri, 27 Nov 2009 18:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://tartley.com/?p=916#comment-24563</guid>
		<description>Thanks Matt.

Your idea about using asserts to verify code as configuration is a good one - savvy users who are modifying such config may not run the tests again, but they surely will be running the application.</description>
		<content:encoded><![CDATA[<p>Thanks Matt.</p>
<p>Your idea about using asserts to verify code as configuration is a good one &#8211; savvy users who are modifying such config may not run the tests again, but they surely will be running the application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt harrison</title>
		<link>http://tartley.com/?p=916&#038;cpage=1#comment-24561</link>
		<dc:creator>matt harrison</dc:creator>
		<pubDate>Fri, 27 Nov 2009 17:21:58 +0000</pubDate>
		<guid isPermaLink="false">http://tartley.com/?p=916#comment-24561</guid>
		<description>I also browsed a bunch of Nagappan&#039;s papers recently.  It&#039;s interesting stuff (like where they actually measure the cost of TDD).

I don&#039;t use many asserts, but when I read this paper I thought maybe I should start :)  I do tend to create .validate functions/methods for code/objects that I know might not be completely correct or are just complex.  If I know there is an easy way to validate it, I&#039;ll just throw that into a function as well as use it in the unittests.  It also helps to be very specific about where failures come from.  Also if you are using code as configuration, it is useful to be able to validate that as well.</description>
		<content:encoded><![CDATA[<p>I also browsed a bunch of Nagappan&#8217;s papers recently.  It&#8217;s interesting stuff (like where they actually measure the cost of TDD).</p>
<p>I don&#8217;t use many asserts, but when I read this paper I thought maybe I should start :)  I do tend to create .validate functions/methods for code/objects that I know might not be completely correct or are just complex.  If I know there is an easy way to validate it, I&#8217;ll just throw that into a function as well as use it in the unittests.  It also helps to be very specific about where failures come from.  Also if you are using code as configuration, it is useful to be able to validate that as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
