<?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: Write your LabVIEW code so that it breaks</title>
	<atom:link href="http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/</link>
	<description>an unfiltered stream of data flow consciousness</description>
	<pubDate>Fri,  5 Sep 2008 20:16:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Jim Kring</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-397</link>
		<dc:creator>Jim Kring</dc:creator>
		<pubDate>Tue, 19 Jun 2007 20:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-397</guid>
		<description>Tomi: You are correct in that the communication bus (GPIB, Serial, Bluetooth) example would be much better served by OOP polymorphism.  I even thought about this while writing the article, but I figured that it would be a good example that many people could understand.  Also, maybe it would be a good candidate for a follow-up article on the topic of OOP polymorphism vs. Case Structure switching ;)

Darren: I guess it depends on the desired outcome of what should happen when the enum changes.  Do you want your code to generate a run-time error when an unknown enum is passed in? Then use a default case and raise an error from within the default case.  Or, maybe you do not want to generate an error.  Or, perhaps you want to actually handle the unknown enum value and you want your code to break when the enum changes.  It really depends on the requirements and how you want to manage things.  You're right that there are a lot of different situations where any one solution is preferable.</description>
		<content:encoded><![CDATA[<p>Tomi: You are correct in that the communication bus (GPIB, Serial, Bluetooth) example would be much better served by OOP polymorphism.  I even thought about this while writing the article, but I figured that it would be a good example that many people could understand.  Also, maybe it would be a good candidate for a follow-up article on the topic of OOP polymorphism vs. Case Structure switching <img src='http://thinkinging.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Darren: I guess it depends on the desired outcome of what should happen when the enum changes.  Do you want your code to generate a run-time error when an unknown enum is passed in? Then use a default case and raise an error from within the default case.  Or, maybe you do not want to generate an error.  Or, perhaps you want to actually handle the unknown enum value and you want your code to break when the enum changes.  It really depends on the requirements and how you want to manage things.  You&#8217;re right that there are a lot of different situations where any one solution is preferable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-396</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Tue, 19 Jun 2007 18:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-396</guid>
		<description>There is at least one situation where removing the default from enum case structures is a bad idea...and that is when your code is using an enum maintained by someone else.  I recently had a showstopper bug in one of my products (that I inherited from someone else) because another developer added elements to an enum that my code used...the previous owner of this code used a Case Structure with no default case, so this code that I own was broken as a result of someone else's change to the enum.  So when there's a chance somebody else might change an enum that your (shipping) code uses, in my opinion it is best to have a Default case that gracefully handles situations where an unknown enum element is encountered.</description>
		<content:encoded><![CDATA[<p>There is at least one situation where removing the default from enum case structures is a bad idea&#8230;and that is when your code is using an enum maintained by someone else.  I recently had a showstopper bug in one of my products (that I inherited from someone else) because another developer added elements to an enum that my code used&#8230;the previous owner of this code used a Case Structure with no default case, so this code that I own was broken as a result of someone else&#8217;s change to the enum.  So when there&#8217;s a chance somebody else might change an enum that your (shipping) code uses, in my opinion it is best to have a Default case that gracefully handles situations where an unknown enum element is encountered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomi Maila</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-395</link>
		<dc:creator>Tomi Maila</dc:creator>
		<pubDate>Tue, 19 Jun 2007 17:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-395</guid>
		<description>Actually I think one should avoid software architectures where support for particular specialization of a general interface is spread around different parts of code.  I prefer using OOP design to solve these kinds of development issues. So the trick was nice but the example you used enourages using bad software architectures.</description>
		<content:encoded><![CDATA[<p>Actually I think one should avoid software architectures where support for particular specialization of a general interface is spread around different parts of code.  I prefer using OOP design to solve these kinds of development issues. So the trick was nice but the example you used enourages using bad software architectures.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Kring</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-393</link>
		<dc:creator>Jim Kring</dc:creator>
		<pubDate>Tue, 19 Jun 2007 16:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-393</guid>
		<description>Yen: I've created a discussion topic, &lt;a href="http://forums.openg.org/index.php?showtopic=594" rel="nofollow"&gt;here&lt;/a&gt;, on the OpenG forums for discussing the &lt;strong&gt;OpenG Structure&lt;/strong&gt; palette idea.  Let's move this discussion, there -- I'm looking forward to seeing where it goes :)</description>
		<content:encoded><![CDATA[<p>Yen: I&#8217;ve created a discussion topic, <a href="http://forums.openg.org/index.php?showtopic=594" rel="nofollow">here</a>, on the OpenG forums for discussing the <strong>OpenG Structure</strong> palette idea.  Let&#8217;s move this discussion, there &#8212; I&#8217;m looking forward to seeing where it goes <img src='http://thinkinging.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yen</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-392</link>
		<dc:creator>Yen</dc:creator>
		<pubDate>Tue, 19 Jun 2007 16:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-392</guid>
		<description>"Perhaps we need an OpenG Structures palette".

Yes.
Although some of structures I added to my own structures palette are no longer needed because they already made it into the standard palette (disable structure, ************ [can't talk about that one]), some are still useful today. I wouldn't mind contributing to that.</description>
		<content:encoded><![CDATA[<p>&#8220;Perhaps we need an OpenG Structures palette&#8221;.</p>
<p>Yes.<br />
Although some of structures I added to my own structures palette are no longer needed because they already made it into the standard palette (disable structure, ************ [can't talk about that one]), some are still useful today. I wouldn&#8217;t mind contributing to that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Kring</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-391</link>
		<dc:creator>Jim Kring</dc:creator>
		<pubDate>Tue, 19 Jun 2007 16:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-391</guid>
		<description>Yen: You should still write a nugget -- there is a lot more that can be said, and you can reference this article, if you like :)  That's a good tip about the merge VI -- I was thinking the same thing.  Perhaps we need an OpenG &lt;strong&gt;Structures&lt;/strong&gt; palette.</description>
		<content:encoded><![CDATA[<p>Yen: You should still write a nugget &#8212; there is a lot more that can be said, and you can reference this article, if you like <img src='http://thinkinging.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That&#8217;s a good tip about the merge VI &#8212; I was thinking the same thing.  Perhaps we need an OpenG <strong>Structures</strong> palette.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yen</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-390</link>
		<dc:creator>Yen</dc:creator>
		<pubDate>Tue, 19 Jun 2007 14:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-390</guid>
		<description>That's a shame, I wanted to make a nugget out of that idea. :-(

P.S. Case structures without default frames - Create an empty VI, place a case structure into it, wire a numeric into it, remove the default case and the numeric, save the VI and use it as a merge VI. Job done (although you then have to manually set the structure's size after you drop it).</description>
		<content:encoded><![CDATA[<p>That&#8217;s a shame, I wanted to make a nugget out of that idea. <img src='http://thinkinging.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>P.S. Case structures without default frames - Create an empty VI, place a case structure into it, wire a numeric into it, remove the default case and the numeric, save the VI and use it as a merge VI. Job done (although you then have to manually set the structure&#8217;s size after you drop it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Farmer</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-389</link>
		<dc:creator>Ray Farmer</dc:creator>
		<pubDate>Tue, 19 Jun 2007 14:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-389</guid>
		<description>That's a good hint.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a good hint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Kring</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-388</link>
		<dc:creator>Jim Kring</dc:creator>
		<pubDate>Tue, 19 Jun 2007 13:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-388</guid>
		<description>Götz: Yes, I wish there were an option to place Case Structures without default frames.  That would be nice :)  Thanks.</description>
		<content:encoded><![CDATA[<p>Götz: Yes, I wish there were an option to place Case Structures without default frames.  That would be nice <img src='http://thinkinging.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Götz Becker</title>
		<link>http://thinkinging.com/2007/06/19/write-your-labview-code-so-that-it-breaks/#comment-387</link>
		<dc:creator>Götz Becker</dc:creator>
		<pubDate>Tue, 19 Jun 2007 10:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://thinkinging.com/2007/06/24/write-your-labview-code-so-that-it-breaks/#comment-387</guid>
		<description>Good hint. I usually disable the "Default" flag at every Case structure I place. Which is a bit of a pain since every time I place a new Case in my code LV enables "Default".  An option to change this behavior would be nice.</description>
		<content:encoded><![CDATA[<p>Good hint. I usually disable the &#8220;Default&#8221; flag at every Case structure I place. Which is a bit of a pain since every time I place a new Case in my code LV enables &#8220;Default&#8221;.  An option to change this behavior would be nice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
