<?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: if problems</title>
	<atom:link href="http://andyanglea.com/blog/2009/08/if-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://andyanglea.com/blog/2009/08/if-problems/</link>
	<description></description>
	<lastBuildDate>Fri, 12 Aug 2011 08:58:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Scott</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-297</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Wed, 23 Sep 2009 14:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-297</guid>
		<description>Mrs. Anglea, I work in web design, and I&#039;m really not sure either...  :-P</description>
		<content:encoded><![CDATA[<p>Mrs. Anglea, I work in web design, and I&#8217;m really not sure either&#8230;  <img src='http://andyanglea.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-284</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Sat, 29 Aug 2009 21:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-284</guid>
		<description>@Mom, That&#039;s ok, i warned you. :P</description>
		<content:encoded><![CDATA[<p>@Mom, That&#8217;s ok, i warned you. <img src='http://andyanglea.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mom</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-278</link>
		<dc:creator>Mom</dc:creator>
		<pubDate>Sat, 29 Aug 2009 13:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-278</guid>
		<description>Oh, my!  I should have taken your advice and moved on along!  I have no earthly idea why counting parentheses would be fascinating to you! :)</description>
		<content:encoded><![CDATA[<p>Oh, my!  I should have taken your advice and moved on along!  I have no earthly idea why counting parentheses would be fascinating to you! <img src='http://andyanglea.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-277</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Thu, 27 Aug 2009 16:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-277</guid>
		<description>Now that I think about it, the &quot;exceptional case&quot; would compile just fine... but it would produce a logic error.

I guess that&#039;s beyond the scope of this algorithm then, so we can&#039;t really say that this case &quot;breaks&quot; the algorithm.

I&#039;m sure more extensive use case analysis would produce other things to think about.</description>
		<content:encoded><![CDATA[<p>Now that I think about it, the &#8220;exceptional case&#8221; would compile just fine&#8230; but it would produce a logic error.</p>
<p>I guess that&#8217;s beyond the scope of this algorithm then, so we can&#8217;t really say that this case &#8220;breaks&#8221; the algorithm.</p>
<p>I&#8217;m sure more extensive use case analysis would produce other things to think about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-276</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Thu, 27 Aug 2009 15:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-276</guid>
		<description>Here&#039;s a quick mock-up Ubiq command. This only does the left-to-right check. The right-to-left check should be pretty easy to implement by getting the array length and then looping down from arrayLength-1 to zero.

Also, as I predicted, it didn&#039;t detect an error on the exceptional case.

http://gist.github.com/176391</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a quick mock-up Ubiq command. This only does the left-to-right check. The right-to-left check should be pretty easy to implement by getting the array length and then looping down from arrayLength-1 to zero.</p>
<p>Also, as I predicted, it didn&#8217;t detect an error on the exceptional case.</p>
<p><a href="http://gist.github.com/176391" rel="nofollow">http://gist.github.com/176391</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-275</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Thu, 27 Aug 2009 15:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-275</guid>
		<description>@peter are you sure about that? doesn&#039;t that open the possibility, for example, that $condition1 != $a OR the len of $condition2, etc. rather than that $condition1 != $a OR that the len of $condition2 == $b.

Eg. with 
$condition1 = &#039;foo&#039; 
$condition2 = &#039;bar&#039;
$a = 1
$b = 2
&#039;foo&#039; != 1 OR 3 rather than &#039;foo&#039; != 1 OR 3 == 2</description>
		<content:encoded><![CDATA[<p>@peter are you sure about that? doesn&#8217;t that open the possibility, for example, that $condition1 != $a OR the len of $condition2, etc. rather than that $condition1 != $a OR that the len of $condition2 == $b.</p>
<p>Eg. with<br />
$condition1 = &#8216;foo&#8217;<br />
$condition2 = &#8216;bar&#8217;<br />
$a = 1<br />
$b = 2<br />
&#8216;foo&#8217; != 1 OR 3 rather than &#8216;foo&#8217; != 1 OR 3 == 2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-274</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 27 Aug 2009 15:10:03 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-274</guid>
		<description>I realize this is purely theoretical, but you also have 6 too many parenthesis. You could accomplish the same logic by not wrapping every condition in a parenthesis. Like thus:

if ($condition1 != $a &#124;&#124; (len($condition2) == $b &amp;&amp; !isset($_POST[&#039;submit&#039;])))</description>
		<content:encoded><![CDATA[<p>I realize this is purely theoretical, but you also have 6 too many parenthesis. You could accomplish the same logic by not wrapping every condition in a parenthesis. Like thus:</p>
<p>if ($condition1 != $a || (len($condition2) == $b &amp;&amp; !isset($_POST['submit'])))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-273</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Thu, 27 Aug 2009 15:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-273</guid>
		<description>@peter yes, but notice i was using an online editor that didn&#039;t have a syntax checker...
@duncan hmm, that&#039;s true about the case that breaks that algorithm, but i&#039;d be interested in seeing that ubiquity plugin.  I&#039;ll see if i can tweak something to use the pre tag...</description>
		<content:encoded><![CDATA[<p>@peter yes, but notice i was using an online editor that didn&#8217;t have a syntax checker&#8230;<br />
@duncan hmm, that&#8217;s true about the case that breaks that algorithm, but i&#8217;d be interested in seeing that ubiquity plugin.  I&#8217;ll see if i can tweak something to use the pre tag&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-272</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Thu, 27 Aug 2009 14:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-272</guid>
		<description>I just threw my test cases on github... this is enough for now, but this is still interesting to explore.
http://gist.github.com/176329</description>
		<content:encoded><![CDATA[<p>I just threw my test cases on github&#8230; this is enough for now, but this is still interesting to explore.<br />
<a href="http://gist.github.com/176329" rel="nofollow">http://gist.github.com/176329</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://andyanglea.com/blog/2009/08/if-problems/#comment-270</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Thu, 27 Aug 2009 14:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://andyanglea.com/blog/?p=111#comment-270</guid>
		<description>I just did some preliminary checking, and found one case that breaks this algorithm. If you&#039;re missing an equal number of open and closed parentheses, then it doesn&#039;t detect an error.


Missing one ) and one ( case:
   12                 *    *3   4           3      2    3      4                3210 !UNDETECTABLE ERROR
   01                 *    *2   3           4      3    2      3                4321 !UNDETECTABLE ERROR
if (($condition1 != $a  &#124;&#124;  (len($condition2) == $b) &amp;&amp; (!isset($_POST[&#039;submit&#039;])))) {

</description>
		<content:encoded><![CDATA[<p>I just did some preliminary checking, and found one case that breaks this algorithm. If you&#8217;re missing an equal number of open and closed parentheses, then it doesn&#8217;t detect an error.</p>
<p>Missing one ) and one ( case:<br />
   12                 *    *3   4           3      2    3      4                3210 !UNDETECTABLE ERROR<br />
   01                 *    *2   3           4      3    2      3                4321 !UNDETECTABLE ERROR<br />
if (($condition1 != $a  ||  (len($condition2) == $b) &amp;&amp; (!isset($_POST['submit'])))) {</p>
]]></content:encoded>
	</item>
</channel>
</rss>

