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)

0 Kudos
Message 2071 of 2,124
(723 Views)

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

 

USeCluster2.png


LabVIEW Champion. It all comes together in GCentral GCentral
Message 2072 of 2,124
(694 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. 😄 


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2073 of 2,124
(610 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)

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2074 of 2,124
(501 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


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2075 of 2,124
(444 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

 

 

0 Kudos
Message 2076 of 2,124
(423 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

Message 2077 of 2,124
(414 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".

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 2078 of 2,124
(403 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


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2079 of 2,124
(364 Views)
Highlighted

@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! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 2080 of 2,124
(306 Views)