BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

capture.png

Now That's the hard way to reformat the display of a Time-Date String  (seen in the wild)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2071 of 2,565
(10,854 Views)

Another "hard vs. easy" comparison. ALso, that glaring orange hurts my eyes! (Seen here)

 

USeCluster2.png

Message 2072 of 2,565
(10,825 Views)

(Seen here)

 

To get 15 different elements of the first row of a 2D array, some people think that we need to index out the first row 17x in parallel (!!!) to get 17 instances of the same identical row, followed by further indexing.

 

Onceisenough.png

 

 

Of course all we really need is a single "index array" resized to 15 outputs (notice that elements #3 and #8 are indexed out twice!) to replace the current 34 instances of index array.

 

Hopefully, the compiler will eliminate all the common subexpressions, but that still won't make the LabVIEW code any prettier to look at. 😄 

0 Kudos
Message 2073 of 2,565
(10,741 Views)

(Well, this is more an anti-Rube-Goldberg, because it is oversimplified beyond usefulness.)

 

"Hey, Just look at the attached image! You can clearly see that the result is wrong, so how to I fix it????" 😮

 

1

 

(Google translate of entire post: hello that such a good day I have a problem when executing a mathematical operation since when I do the subtraction of 10-8.5 the result sometimes gives me correct but sometimes throws me 1 or another number happens to me in some labels would have some suggestion that I can help me)

 

 

0 Kudos
Message 2074 of 2,565
(10,632 Views)

( Seen here )

 

A simple (very simple!) vending machine simulation for seven items apparently needs up to 45 value property nodes per indicator.

 

This image shows only a small fraction of the code. I wonder how this "architecture" (generous term!) scales for a vending machine containing 100 items 😮

 

INICIORUBE.png

0 Kudos
Message 2075 of 2,565
(10,575 Views)

@altenbach wrote:

( Seen here )

 

A simple (very simple!) vending machine simulation for seven items apparently needs up to 45 value property nodes per indicator.

 

This image shows only a small fraction of the code. I wonder how this "architecture" (generous term!) scales for a vending machine containing 100 items 😮

 

INICIORUBE.png


That is about as close as we can get to a transliteration of a program written in a text based language.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2076 of 2,565
(10,554 Views)

@altenbach wrote:

( Seen here )

 

A simple (very simple!) vending machine simulation for seven items apparently needs up to 45 value property nodes per indicator.

 

This image shows only a small fraction of the code. I wonder how this "architecture" (generous term!) scales for a vending machine containing 100 items 😮

 

 


Re: "Architecture" as a generous term

Demonstration of card architecture


"Should be" isn't "Is" -Jay
Message 2077 of 2,565
(10,546 Views)

@Ben wrote:


That is about as close as we can get to a transliteration of a program written in a text based language.

 

Ben

Interesting as I have also noticed people coming from a text based programming background tend to over use locals, globals and property nodes from the start.

 

When I was first starting in LabVIEW one of my colleagues programmed like that. He actually once said "I hate the whole wires running everywhere thing".

 

========================
=== Engineer Ambiguously ===
========================
Message 2078 of 2,565
(10,535 Views)

This discussion about how to generate a filename:

 

filename.png

 

vs. (better!):

 

 

 

Reminded me of this discussion about how to initialize a "special" array.

 

MakeSpecialArray.png

0 Kudos
Message 2079 of 2,565
(10,497 Views)

@RTSLVU wrote:

@Ben wrote:

Interesting as I have also noticed people coming from a text based programming background tend to over use locals, globals and property nodes from the start.

When I was first starting in LabVIEW one of my colleagues programmed like that. He actually once said "I hate the whole wires running everywhere thing".

Hence the expression of beginner sickness: Localitis and Sequentitis. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 2080 of 2,565
(10,441 Views)