<?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: Complex != Better</title>
	<atom:link href="http://www.testingmentor.com/imtesty/2010/03/31/complex-better/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.testingmentor.com/imtesty/2010/03/31/complex-better/</link>
	<description>Treatises on the practice of software testing</description>
	<lastBuildDate>Tue, 07 Feb 2012 09:15:11 -0500</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Albert Gareev</title>
		<link>http://www.testingmentor.com/imtesty/2010/03/31/complex-better/comment-page-1/#comment-684</link>
		<dc:creator>Albert Gareev</dc:creator>
		<pubDate>Thu, 01 Apr 2010 13:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.testingmentor.com/imtesty/2010/03/31/complex-better/#comment-684</guid>
		<description>Hi Bj,

I guess you assume that “SimpleRandomString” is supposed to be wrapped up in another function that validates “size” argument first, and handles the following special cases:

size = (2147483647 + 1)

…or would you increase complexity of “SimpleRandomString” function?
--------------------------------
I&#039;m sorry for a few tests down here...

I&#039;ve just submitted my comment and noticed that entire lines containing &quot;prohibited&quot; characters were wiped out.

So I&#039;m not sure which way it will work and try a few. 

size = = 0
&quot;size equals zero&quot;

size &lt;= -1
&quot;size is equal to or less than&quot;

size &gt;= (2147483647 + 1)
&quot;size is equal to or greater than&quot;

Thanks,
Albert

&lt;blockquote&gt;&lt;em&gt;[Bj&#039;s Reply] Hi Albert,  I combined both your comments to avoid redundancy.

In answer to your question, the answer is no. The SimpleRandomString method does not need increased complexity to handle your &#039;special case tests.&#039;  

If you call the SimpleRandomString method and pass a 0 or any value less than 0 then what do you get in return? 

You get an empty string! Basically, you are getting exactly what you ask for. 

Now, if you try to pass it a value greater than 2147483647 then your code will likly not compile. And even if it did (say you weren&#039;t checked mode), you can&#039;t pass an argument greater than 2147483647 to a type int parameter in strongly typed languages such as C#. So, if you try to pass an argument greater than 2147483647 it will actually be your code that throws an exception rather than the SimpleRandomString method. 

These &#039;special tests&#039; are in fact all false positives where you think you are getting an error from my code, but in fact the test inputs are based on false assumptions.&lt;/em&gt;&lt;/blockquote&gt;

</description>
		<content:encoded><![CDATA[<p>Hi Bj,</p>
<p>I guess you assume that “SimpleRandomString” is supposed to be wrapped up in another function that validates “size” argument first, and handles the following special cases:</p>
<p>size = (2147483647 + 1)</p>
<p>…or would you increase complexity of “SimpleRandomString” function?<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
I&#8217;m sorry for a few tests down here&#8230;</p>
<p>I&#8217;ve just submitted my comment and noticed that entire lines containing &#8220;prohibited&#8221; characters were wiped out.</p>
<p>So I&#8217;m not sure which way it will work and try a few. </p>
<p>size = = 0<br />
&#8220;size equals zero&#8221;</p>
<p>size &lt;= -1<br />
&#8220;size is equal to or less than&#8221;</p>
<p>size &gt;= (2147483647 + 1)<br />
&#8220;size is equal to or greater than&#8221;</p>
<p>Thanks,<br />
Albert</p>
<blockquote><p><em>[Bj's Reply] Hi Albert,  I combined both your comments to avoid redundancy.</p>
<p>In answer to your question, the answer is no. The SimpleRandomString method does not need increased complexity to handle your &#8216;special case tests.&#8217;  </p>
<p>If you call the SimpleRandomString method and pass a 0 or any value less than 0 then what do you get in return? </p>
<p>You get an empty string! Basically, you are getting exactly what you ask for. </p>
<p>Now, if you try to pass it a value greater than 2147483647 then your code will likly not compile. And even if it did (say you weren&#8217;t checked mode), you can&#8217;t pass an argument greater than 2147483647 to a type int parameter in strongly typed languages such as C#. So, if you try to pass an argument greater than 2147483647 it will actually be your code that throws an exception rather than the SimpleRandomString method. </p>
<p>These &#8216;special tests&#8217; are in fact all false positives where you think you are getting an error from my code, but in fact the test inputs are based on false assumptions.</em></p></blockquote>
]]></content:encoded>
	</item>
</channel>
</rss>

