<?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"
	>
<channel>
	<title>Comments on: Fighting the monster</title>
	<atom:link href="http://gojko.net/2007/11/20/fighting-the-monster/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net/2007/11/20/fighting-the-monster/</link>
	<description>The Quest for Software++</description>
	<pubDate>Sat, 30 Aug 2008 11:32:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: jk</title>
		<link>http://gojko.net/2007/11/20/fighting-the-monster/#comment-22153</link>
		<dc:creator>jk</dc:creator>
		<pubDate>Thu, 06 Dec 2007 09:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/2007/11/20/fighting-the-monster/#comment-22153</guid>
		<description>umm... Don't parse XML; parse the subset of SQL that you use.

Back to the main topic.  I don't have unit tests, but I've started to keep a library of code examples, and some of those examples are queries that expose bad data.</description>
		<content:encoded><![CDATA[<p>umm&#8230; Don&#8217;t parse XML; parse the subset of SQL that you use.</p>
<p>Back to the main topic.  I don&#8217;t have unit tests, but I&#8217;ve started to keep a library of code examples, and some of those examples are queries that expose bad data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gojko</title>
		<link>http://gojko.net/2007/11/20/fighting-the-monster/#comment-21253</link>
		<dc:creator>gojko</dc:creator>
		<pubDate>Wed, 21 Nov 2007 14:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/2007/11/20/fighting-the-monster/#comment-21253</guid>
		<description>Hi Chris,

utPLSQL is a great tool as far as I am concerned, but it was not good enough to convince DB developers to change the way they worked. I think that the problem is exactly in all the boilerplate code - to do these three simple assertions you would have to declare the package spec, package body, function etc... because concatenatetrings is a stored proc with output parameter, not a function, this adds three other boilerplate lines to call the proc separately from the assertion, and another line to declare the variable to store that output parameter.  DbFit does all that boiledplate code automatically and allows DB developers to focus on assertions.</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>utPLSQL is a great tool as far as I am concerned, but it was not good enough to convince DB developers to change the way they worked. I think that the problem is exactly in all the boilerplate code - to do these three simple assertions you would have to declare the package spec, package body, function etc&#8230; because concatenatetrings is a stored proc with output parameter, not a function, this adds three other boilerplate lines to call the proc separately from the assertion, and another line to declare the variable to store that output parameter.  DbFit does all that boiledplate code automatically and allows DB developers to focus on assertions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Rimmer</title>
		<link>http://gojko.net/2007/11/20/fighting-the-monster/#comment-21247</link>
		<dc:creator>Chris Rimmer</dc:creator>
		<pubDate>Wed, 21 Nov 2007 12:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/2007/11/20/fighting-the-monster/#comment-21247</guid>
		<description>I am surprised that you think the existing PL/SQL unit testing frameworks are so bad.  I use one of them extensively (utPLSQL), but then I used to be the maintainer of this project, so I may be biased.  The code is not quite as clean as JUnit for example, but I don't think it is uglier than average PL/SQL.

You say it would take 20 lines to check 3 concatenations work correctly.  If I ignore the boilerplate code, in utPLSQL this looks like this, which is not a million miles from the equivalent in JUnit:

utAssert.eq('Concatenation 1', ConcatenateStrings('Hello', 'World'), 'Hello World');
utAssert.eq('Concatenation 2', ConcatenateStrings('Arthur', 'Dent'), 'Arthur Dent');
utAssert.eq('Concatenation 3', ConcatenateStrings('Ford', 'Prefect'), 'Ford Prefect');

...and if you were doing more assertions, you'd extract that repeated line into a procedure.</description>
		<content:encoded><![CDATA[<p>I am surprised that you think the existing PL/SQL unit testing frameworks are so bad.  I use one of them extensively (utPLSQL), but then I used to be the maintainer of this project, so I may be biased.  The code is not quite as clean as JUnit for example, but I don&#8217;t think it is uglier than average PL/SQL.</p>
<p>You say it would take 20 lines to check 3 concatenations work correctly.  If I ignore the boilerplate code, in utPLSQL this looks like this, which is not a million miles from the equivalent in JUnit:</p>
<p>utAssert.eq(&#8217;Concatenation 1&#8242;, ConcatenateStrings(&#8217;Hello&#8217;, &#8216;World&#8217;), &#8216;Hello World&#8217;);<br />
utAssert.eq(&#8217;Concatenation 2&#8242;, ConcatenateStrings(&#8217;Arthur&#8217;, &#8216;Dent&#8217;), &#8216;Arthur Dent&#8217;);<br />
utAssert.eq(&#8217;Concatenation 3&#8242;, ConcatenateStrings(&#8217;Ford&#8217;, &#8216;Prefect&#8217;), &#8216;Ford Prefect&#8217;);</p>
<p>&#8230;and if you were doing more assertions, you&#8217;d extract that repeated line into a procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gojko</title>
		<link>http://gojko.net/2007/11/20/fighting-the-monster/#comment-21183</link>
		<dc:creator>gojko</dc:creator>
		<pubDate>Tue, 20 Nov 2007 14:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/2007/11/20/fighting-the-monster/#comment-21183</guid>
		<description>Hi Jonas,

I would generally advise against using meta-languages for this, especially internal meta-languages. It's short-term gain, but long-term this kind of thing never worked for me. You need to train new people to use the meta-language, and the meta stuff is always incomplete. While there are good meta-languages and generators for database views and tables, when advanced features like queues, or even basic PL/SQL stored procs get into play, this meta-language stuff just falls apart.</description>
		<content:encoded><![CDATA[<p>Hi Jonas,</p>
<p>I would generally advise against using meta-languages for this, especially internal meta-languages. It&#8217;s short-term gain, but long-term this kind of thing never worked for me. You need to train new people to use the meta-language, and the meta stuff is always incomplete. While there are good meta-languages and generators for database views and tables, when advanced features like queues, or even basic PL/SQL stored procs get into play, this meta-language stuff just falls apart.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas</title>
		<link>http://gojko.net/2007/11/20/fighting-the-monster/#comment-21180</link>
		<dc:creator>Jonas</dc:creator>
		<pubDate>Tue, 20 Nov 2007 13:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/2007/11/20/fighting-the-monster/#comment-21180</guid>
		<description>For the database version control issue I've developed an in-house SQL-generator that generates create/update scripts (for Oracle and SQLServer) from an XML table definition file (including key generation, index, NULLs and uniqueness). These scripts are fully re-executable and only changes what's needed (does not, however, drop removed columns) by querying the schema meta-data AT RUNTIME.
So we have a nice text file for Subversion while the generated script's making sure that every customer has the correct table layout. We'll never go back to manually written SQL for this!!!</description>
		<content:encoded><![CDATA[<p>For the database version control issue I&#8217;ve developed an in-house SQL-generator that generates create/update scripts (for Oracle and SQLServer) from an XML table definition file (including key generation, index, NULLs and uniqueness). These scripts are fully re-executable and only changes what&#8217;s needed (does not, however, drop removed columns) by querying the schema meta-data AT RUNTIME.<br />
So we have a nice text file for Subversion while the generated script&#8217;s making sure that every customer has the correct table layout. We&#8217;ll never go back to manually written SQL for this!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
