LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scary LabVIEW images

Solved!
Go to solution

On the subject of scary images, LabVIEW was recently honored by an article on thedailywtf.

 

Chris M

Message 11 of 30
(1,941 Views)

@CMal wrote:

On the subject of scary images, LabVIEW was recently honored by an article on thedailywtf.

 

Chris M


Unfortunately people are taking an example of extremely bad code and using that to bash LabVIEW. When I have some time I will need to reply to some of the ridiculous posts over there.

 

Thanks for the heads up.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 30
(1,934 Views)

@CMal wrote:

On the subject of scary images, LabVIEW was recently honored by an article on thedailywtf.


See also Yair's post from ~10 days ago.

0 Kudos
Message 13 of 30
(1,930 Views)

@Mark Yedinak wrote:

@CMal wrote:

On the subject of scary images, LabVIEW was recently honored by an article on thedailywtf.

 

Chris M


Unfortunately people are taking an example of extremely bad code and using that to bash LabVIEW. When I have some time I will need to reply to some of the ridiculous posts over there.

 

Thanks for the heads up.


Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 14 of 30
(1,916 Views)

@SynergyMike wrote:

Ok, now you have my curiousity piqued...  in LV7 code that I took over, I found numerous instances where, in order to test for the existance of a directory or file, the error cluster was used.  In order to preserve dataflow, I added a clear error to each instance of a case structure that had selected the error - is there a preferred alternative?  (The VI probably has 5 or 6 clear errors total).

 

Michael Tracy

Synergy Microwave

 


Legacy code get grandfathered  out of modern expectations but there are functions on the Files Advanced palette to list check etc.

 

To judge my own rules I tend look at a software developers relationship to their code as analogous to a doctors relationship to their patient. To evaluate the current state, the doctor will probe and look  for specific conditions and/or reactions. A patient recoiling when the abodmen is probed could indicate a specific ailment while attempting to open the file the user specify returning an error 7 File not found, or parsing a binary file and check from error 4 EOF are specific checks for conditions that we expect will happen. The attempt to do the operation followed by the observation are a valid methodology. Of course pulling out that ultrasound scanner instead of poking is a better approach as is using the functions on the advanced palette that check it the file exist.

 

I prefer the more elegant approach when I am aware it exist and it is available.

 

Extending the anaology...

 

But using the "Clear Error" is not a specific probe. It would be like a doctor treating an in-grown toenail by cutting the nerve and telling the patient to go about their life as normal. The code construct of "Clear Error" followed using the data downstream just feels like cut the nreve and go on situation.

 

Full Disclosure time!

 

 

In my Control Ref Nugget I used a similar construct but rather than using the Clear Error function, I used a Case Structure selector to handle the error returned when the class was wrong. For the sake of that Nugget, it was acceptable since it would have introduced more complexity to an already complex subject. But I digress.

 

So Using Clear Error is not malpractice. Over use on the other hand if not abusive should give any careful developer reason to investigate (In my case shiver and fear for the sake of my patient not knowing what kind of gangreenous growths I will find inside the extremities). 

 

But that is just my 2 cents and I admit that I have an analretentive side and the control freak in me wants it to be "error free" and as Christian mentioned above, "Is it really 'Error Free' ?".

 

Re: 31 instances!

 

That is beyond scarry. Are you being punished for something?Smiley Tongue

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 15 of 30
(1,885 Views)

Sorry. 11, 31 or 291 uses of the clear errors VI are not a problem in themselves. You need to see how they're used in the context of the code to see if that usage was reasonable (although I admit I would probably be concerned if I saw 291).

 


@Mark Yedinak wrote:
When I have some time I will need to reply to some of the ridiculous posts over there.

Please don't. Like I said in the other thread, it seems to finally be dead and some of those posters didn't prove to be particularly adept at actually listening to what other people have to say. Jim's comic (one of my favorite XKCD's) sums it up nicely.

 

 

P.S. Of course, the images from here can also count as scary LV code.


___________________
Try to take over the world!
Message 16 of 30
(1,859 Views)

@tst wrote:

Sorry. 11, 31 or 291 uses of the clear errors VI are not a problem in themselves. You need to see how they're used in the context of the code to see if that usage was reasonable


 

Ageed. After you examine the context.

This thread is all about scary images. When you do a search and find 291 Clear errors and you DON'T know what is the context, its scary.

 

 

Is there a story that goes with the number 291?

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 17 of 30
(1,856 Views)

@Ben wrote:

Is there a story that goes with the number 291?



No.


___________________
Try to take over the world!
0 Kudos
Message 18 of 30
(1,854 Views)

@tst wrote:

Sorry. 11, 31 or 291 uses of the clear errors VI are not a problem in themselves. You need to see how they're used in the context of the code to see if that usage was reasonable (although I admit I would probably be concerned if I saw 291).

 


You are right. Without going into how they are used let's just say that at one point the code with 31 clear error vis had over a hundred calls to the abort function. It doesn't anymore because I wrote a vi with nothing but the abort function in it and did a search and replace so now there is only one. My thought is that now I have a vi where I can do the software equivalent of deploying an airbag before the car hits the tree.

=====================
LabVIEW 2012


0 Kudos
Message 19 of 30
(1,839 Views)

Did it also watch the clock so that it did not work past quitting time?

 

Lynn

0 Kudos
Message 20 of 30
(1,837 Views)