05-19-2010 09:27 AM
Max Power is a handsome astronaut and test pilot that programs LabVIEW in his spare time to test his surf board. He sometimes makes clusters into Objects just to exploit the custom wire color feature of Classes. Thus, as he glances through his state machine, each cluster wire zooming through the cases is a neatly distinct hue, and he can readily ID the cluster. I think Mak Power is taking a performance hit, and at least complicating his project structure just to use one of the "nice-to-have" features of OOP and not realizing any other benefit. What do you think?
05-19-2010 09:33 AM
Please excuse this post
Hey, great name!
Thanks. I got it off a hair dryer!
05-19-2010 10:00 AM
Well, if he's an astronaut, and a test pilot, and a surfer, who am I to argue with him? I'm just a middling engineer. ![]()
In the text-based world, clusters are structures, and in .NET structures and classes have only one major difference: structures are value types and classes are reference types. Thus, the line has been blurred a lot. Since I do a fair bit of programming in .NET (C#), to me it doesn't seem odd at all to create classes.
What kind of performance hit do you think he's incurring, and why do you think it's complicating his project structure?
05-19-2010 10:32 AM
Broken Arrow wrote:Max Power is a handsome astronaut and test pilot that programs LabVIEW in his spare time to test his surf board. He sometimes makes clusters into Objects just to exploit the custom wire color feature of Classes. Thus, as he glances through his state machine, each cluster wire zooming through the cases is a neatly distinct hue, and he can readily ID the cluster. I think Mak Power is taking a performance hit, and at least complicating his project structure just to use one of the "nice-to-have" features of OOP and not realizing any other benefit. What do you think?
Converting clusters into classes and not using any of the other features of LVOOP is like putting all of the VI's that use a particular type-def into a seperate library. THt makes sense for being able to reuse code since they are grouped together.
SO even in that simple case I see no harm and a partial benefit.
Now lets take Max Power to his nect project. Durring hsi kick-off meeting he finds himself saying "This is a lot like my last project except the post-processing is different." Max Power can take the code from his last project and add a new child class that inherits from the Class used in the last Project. He adds one Over-ride VI to that class to over-ride the "Post Processsing" (State/methond) and he is done.
So...
I see no problems only benefits.
What am I missing?
Ben
05-19-2010 01:20 PM
05-19-2010 01:41 PM
JackDunaway wrote:
One of my oldest Ideas, Allow Typedefs to have a User-Defined Wire, has only received a tepid response of 10 Kudos thus far.
Make that 11. Also see my idea.
Ben wrote:
I see no problems only benefits.
What am I missing?
Nothing! As usual Ben, you are spot on, and I agree that making the Classes has benefits beyond what Max Power is extolling.
smercurio_fc wrote:
What kind of performance hit do you think he's incurring, and why do you think it's complicating his project structure?
Well, I think he thinks about the opening and closing of all those VI's just to access a Bundle or Unbundle. As far as Project being more complicated, you will have more files to "keep up with" going OOP simply due to the addition of the Class and all the accessors, etc as opposed to simply having Bundlers / Unbundlers.
05-19-2010 01:45 PM
-Homer Simpson
(seriously, look it up)
05-19-2010 03:00 PM
Broken Arrow wrote:
Make that 11. Also see my idea.
Actually.... that's one I ended up never Kudoing, based on the same principle as my fourth comment here, and because there was never any more conversation on how to make the visual distinct yet economical.
05-19-2010 03:28 PM
JackDunaway wrote:
Broken Arrow wrote:
Make that 11. Also see my idea.
Actually.... that's one I ended up never Kudoing...
Don't want your stickin' Kudo ![]()
05-19-2010 09:05 PM - edited 05-19-2010 09:06 PM