<?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: Refactoring Day 25 : Introduce Design By Contract checks</title>
	<atom:link href="http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Thu, 13 Sep 2012 07:11:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Ed</title>
		<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/#comment-433</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Fri, 04 Sep 2009 12:05:30 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks.aspx#comment-433</guid>
		<description>I&#039;m pretty sure we have been calling this &quot;defensive programming&quot; for as long as I have been developing</description>
		<content:encoded><![CDATA[<p>I&#8217;m pretty sure we have been calling this &#8220;defensive programming&#8221; for as long as I have been developing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Weller</title>
		<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/#comment-432</link>
		<dc:creator>Thomas Weller</dc:creator>
		<pubDate>Tue, 01 Sep 2009 16:44:53 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks.aspx#comment-432</guid>
		<description>While I agree that DbC checks are not really &#039;Refactoring&#039;, but a modification of code behaviour, introducing it will greatly enhance the stability and maintainability of a codebase. So if you understand &#039;Refactoring&#039; as &#039;making the code better and more consistent&#039;, then introducing DbC is clearly something to consider (although I think we shouldn&#039;t call it &#039;Refactoring&#039;...).

Btw, did you know that there&#039;s a really useful out-of-the-box library for writing DbC-Attributes like e.g. &#039;[NotNull(something)]. Really nice, and spares tons of repetitive hand-rolled verification code: See here: http://validationaspects.codeplex.com

Regards
Thomas</description>
		<content:encoded><![CDATA[<p>While I agree that DbC checks are not really &#8216;Refactoring&#8217;, but a modification of code behaviour, introducing it will greatly enhance the stability and maintainability of a codebase. So if you understand &#8216;Refactoring&#8217; as &#8216;making the code better and more consistent&#8217;, then introducing DbC is clearly something to consider (although I think we shouldn&#8217;t call it &#8216;Refactoring&#8217;&#8230;).</p>
<p>Btw, did you know that there&#8217;s a really useful out-of-the-box library for writing DbC-Attributes like e.g. &#8216;[NotNull(something)]. Really nice, and spares tons of repetitive hand-rolled verification code: See here: <a href="http://validationaspects.codeplex.com" rel="nofollow">http://validationaspects.codeplex.com</a></p>
<p>Regards<br />
Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Meyer</title>
		<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/#comment-431</link>
		<dc:creator>John Meyer</dc:creator>
		<pubDate>Wed, 26 Aug 2009 17:54:52 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks.aspx#comment-431</guid>
		<description>The orderTotal exception should not be one from the ArgumentException family, since orderTotal is not an argument to the method.  InvalidOperationException, or a custom exception, would be more appropriate in this case.  See code analysis (FXCop) warning 1040.</description>
		<content:encoded><![CDATA[<p>The orderTotal exception should not be one from the ArgumentException family, since orderTotal is not an argument to the method.  InvalidOperationException, or a custom exception, would be more appropriate in this case.  See code analysis (FXCop) warning 1040.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: schambers</title>
		<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/#comment-430</link>
		<dc:creator>schambers</dc:creator>
		<pubDate>Tue, 25 Aug 2009 13:48:02 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks.aspx#comment-430</guid>
		<description>True, this is more of a modification then a refactoring because we are changing the exception that is being thrown. However, this change won&#039;t affect any consumers until you choose to catch the different exception being thrown.

This one isn&#039;t really an exact fit for refactorings but I wanted to show it was a worthwhile thing to do when trying to apply some of the refactorings.</description>
		<content:encoded><![CDATA[<p>True, this is more of a modification then a refactoring because we are changing the exception that is being thrown. However, this change won&#8217;t affect any consumers until you choose to catch the different exception being thrown.</p>
<p>This one isn&#8217;t really an exact fit for refactorings but I wanted to show it was a worthwhile thing to do when trying to apply some of the refactorings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alberto</title>
		<link>http://lostechies.com/seanchambers/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks/#comment-429</link>
		<dc:creator>alberto</dc:creator>
		<pubDate>Tue, 25 Aug 2009 13:24:51 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/25/refactoring-day-25-introduce-design-by-contract-checks.aspx#comment-429</guid>
		<description>That&#039;s not a refactoring by any mean. You are changing the behaviour of your class. A call that used to throw a NullReferenceException now will throw an ArgumentNullException.</description>
		<content:encoded><![CDATA[<p>That&#8217;s not a refactoring by any mean. You are changing the behaviour of your class. A call that used to throw a NullReferenceException now will throw an ArgumentNullException.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
