BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Request: Code based examples of bad LV code

So, being reminded of the fun and educational threads of Rube Goldberg code and Local abuse i started thinking: How do we in a good way explain how bad this is to new people/text based programmers? 

Can we some up with some good text based examples that shows or explains similar bad designs in other languages? I know it's hard, since in many cases you can't write that bad code and get it to work/compile. E.g. since Locals are good in text based programming, maybe the equivalent is to use Globals and create a new one (that copies another one)  for each time you want to use it?

 

LV is sometimes too forgiving.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1 of 3
(173 Views)

My favorite find

 

While(1);

***no break ***

Return 0;

Much;

unreachable;

cleanup;

 

Yes, an infinite loop with post loop actions written in C++  I guess they teach PhD's (physics) that unity has a potential to fail.:0

 


"Should be" isn't "Is" -Jay
Message 2 of 3
(145 Views)

The book "Code Complete" shows good and bad ways to do things and calls the bad examples "Coding Horrors". Not sure how many are relevant to LabVIEW though.

Message 3 of 3
(126 Views)