<?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: Where does that Python DB handle go?</title>
	<atom:link href="http://www.protocolostomy.com/2007/07/21/python-database-handle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com/2007/07/21/python-database-handle/</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:20:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: m0j0</title>
		<link>http://www.protocolostomy.com/2007/07/21/python-database-handle/comment-page-1/#comment-134</link>
		<dc:creator>m0j0</dc:creator>
		<pubDate>Sun, 22 Jul 2007 20:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://bkj.protocolostomy.com/?p=227#comment-134</guid>
		<description>rrenaud - you&#039;re absolutely right. This is another aspect of the application that I had not considered (in addition to Brend&#039;s input, which is in the UPDATE above). Thanks a lot for pointing this out.</description>
		<content:encoded><![CDATA[<p>rrenaud &#8211; you&#8217;re absolutely right. This is another aspect of the application that I had not considered (in addition to Brend&#8217;s input, which is in the UPDATE above). Thanks a lot for pointing this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rrenaud</title>
		<link>http://www.protocolostomy.com/2007/07/21/python-database-handle/comment-page-1/#comment-135</link>
		<dc:creator>rrenaud</dc:creator>
		<pubDate>Sun, 22 Jul 2007 18:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://bkj.protocolostomy.com/?p=227#comment-135</guid>
		<description>I think (3) is the wrong decision from a software engineering/test driven design point of view.  How can you write a unittest for your Host class?  Presumably, inside Host.init() it knows how to connect to the in production database.  You don&#039;t want a unittest run to have any real world side effects.  If you pass in the handle to your Host class, you could presumably replace the database connection with a mock object (or maybe an SQL-lite handle for a database created on the fly for the unittest) so that you can test your class side effect free.

Google for test driven design and mock objects if you want the gory details.</description>
		<content:encoded><![CDATA[<p>I think (3) is the wrong decision from a software engineering/test driven design point of view.  How can you write a unittest for your Host class?  Presumably, inside Host.init() it knows how to connect to the in production database.  You don&#8217;t want a unittest run to have any real world side effects.  If you pass in the handle to your Host class, you could presumably replace the database connection with a mock object (or maybe an SQL-lite handle for a database created on the fly for the unittest) so that you can test your class side effect free.</p>
<p>Google for test driven design and mock objects if you want the gory details.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

