10-07-2008 11:15 AM
It is scary is to think of how many work hours went into things like that.
First to wire it up, and then to debug it. 😮
10-07-2008 12:21 PM
After looking at these last two examples and experiencing my stomach turn when I saw them, I think that NI should cobble together these with a bunch of similarly attrocious examples into a short movie that they force students in LV basics I entitled "Death on the Wire-way" (like the movie they make people in drivers ED sit through).
Now where did I leave my Prilosec?
Ben
10-07-2008 01:16 PM
altenbach wrote:It is scary is to think of how many work hours went into things like that.
First to wire it up, and then to debug it. 😮
Whaddaya mean, "debug"?
10-07-2008 01:35 PM - edited 10-07-2008 01:36 PM
tst wrote:
Whaddaya mean, "debug"?
"Delouse"?
10-07-2008 04:44 PM
10-07-2008 05:33 PM
@JoeLabView wrote:
Holy Caramba! The code looked like a microscopic horror... It's beyond nightmare.. Beyond the Locals nightmare..
Yikes.. Are you actually stuck fixing that?
R
The thing is, it seems to work. Albeit the initialisation may not necessarily happen first :-S
I keep finding things to do to avoid touching it - when I finally do get round to it, I'm going to try and do as little as possible to anger the demons. All that needs to be added is flipping a digital output on the fieldpoint now and then. Hey, I could add a whole new while loop for it!
10-08-2008 07:22 AM
Ed,
Ouch! Looks like you need to ask for a wall of monitors just to get a good look at it.
10-09-2008 07:49 AM
10-09-2008 07:54 AM
This thread is not to discuss how to solve or eliminate Locals. It would be a lengthy discussion. It is to show examples of Local Variable abuse. It is not to say that they are indeed bad. But become bad when abused. Maybe the title is misleading.
Typically, there is a link to the thread that discusses the code where the example originated from. Follow the link and you can read the suggestions that are offered.
R
10-09-2008 07:55 AM - edited 10-09-2008 08:03 AM
RJay wrote:
I inherited code that has many Local Variables. You should explain how to get rid of them.
More often than not, it's better to just rewrite it all from scratch, using an architecture that won't fall over. However, if time constraints are more important, then I'd just quetly add another butress and not claim to have added it 😛
Edit: ^ Sorry Ray 😞