BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Flat sequence structures aren't necessary.  But what is worse about this one is that it is not one sequence with 5 frames, but actually 5 sequences with 1 frame each.

 

Here.

 

 

(Not sure the purpose of the inner while loop other than to really spam someone with text messages until you hit the stop button.)

Message 941 of 2,565
(11,101 Views)

Some people simply refuse to use an Invert function to flip a Boolean, and find all sorts of ways around it:

 

 

 

or

 

 

 

 

or

 

 

 

From http://forums.ni.com/t5/LabVIEW/Boolean-array-bit-by-bit-inversion/m-p/1635238

Message 942 of 2,565
(11,030 Views)

I  Laughed both times I looked at it.  Perhaps he could use a not (if not [(not equal true) or (if equal to self)] but maybe not!


"Should be" isn't "Is" -Jay
0 Kudos
Message 943 of 2,565
(11,004 Views)

why does it need to be checked for = because the answer the same straight from the Array Index.

Regards
Ray Farmer
0 Kudos
Message 944 of 2,565
(10,989 Views)

Some people do a literal translations of their thoughts when programming ...

 

" ... If this boolean is TRUE, I need to do ..." 😄

0 Kudos
Message 945 of 2,565
(10,986 Views)

 

(Of course in this particular case, he could also do an "equal FALSE" and get the invert right there for free 🐵

0 Kudos
Message 946 of 2,565
(10,991 Views)

Actually he could replace the AND with a NAND and do away with the for loop alltogether.   Waste not - want not.  Smiley Very Happy

0 Kudos
Message 947 of 2,565
(10,972 Views)

Ever wonder what would happen if you would place your diagram in a thrash compactor? Probably not!

 

Still, if you are curious, here's the result (spotted here) 😄

 

 

Well, even after compacting, it is still thrash. At least the code is well documented. 😮

0 Kudos
Message 948 of 2,565
(10,949 Views)

One of those again! (seen here) Look at the navigation window!

 

How much code do you need to make a bar graph with 24 bars???

 

 

 

 

Here's alternative code that does about the same thing.... 😄

 

Message 949 of 2,565
(10,896 Views)

...but if this person was being paid by the hour...???

Smiley Wink

 

(Not suggesting I'd do that, just that some people might.)

 

To produce code like that they're obviously not on performance related pay.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 950 of 2,565
(10,852 Views)