BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@Steve Chandler wrote:

This construct is very similar to the first reply in this thread. Maybe the following code was posted in one of the other many replies.

 

some kind of buffer or something.PNG

 

Found in a code review.


There's too much confusion
can't get no relief
Buisness men they drink my wine
Plowmen dig my earth
None would ever compromise
Nobody of this world
Smiley Very Happy



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 981 of 2,635
(12,198 Views)

Plot Images.vi found with the example finder is not exactly an RG but there is some pointless code.

 

Spoiler
I am guessing this was originally written before LabVIEW had the event structure and #3 was overlooked.

 

Capture.PNG

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


0 Kudos
Message 982 of 2,635
(12,171 Views)

A simple array transformation apparently needs a lot of code (top). The bottom shows an equivalent alternative, too simple! 😄

 

 

 

Note that LabVIEW is actually smart enough to fold most of the while loop code ("transpose", "array size", "index array", "-1"), because it is loop invariant. WIthout this feature, we would repeat e.g. the same transposition on the same data N times in a row.

 

(seen here)

Message 983 of 2,635
(12,108 Views)

R-g.png

Found in Agilent 34790.Lvlib:List to array

Spoiler
(c) 2005-2010 National Instruments.  ALL RIGHTS RESERVED.

 for whatever its worth I think the string searches in the upper case call the split string function anyway but I won't bother benchmarking either


"Should be" isn't "Is" -Jay
0 Kudos
Message 984 of 2,635
(12,067 Views)

That "continue if true" is a hint that this is ancient...

0 Kudos
Message 985 of 2,635
(12,060 Views)

Just when you thought you've seen it all, a VI gets posted that pushes the boundaries a little bit more.

 

Just look at the navigation window. It actually brings LabVIEW to its knees. redrawing the navigation window is really sluggish on my machine. 😄

 

(seen here. Also notice that some people program the same way as they compose post titles ;))

 

Message 986 of 2,635
(11,995 Views)

The curious case of the blue booleans!

 

Is there a reason to temporarily convert booleans to numbers just do do some boolean operations?

 

(seen here)

 

 

 

 

(Of course we would also have e.g. "in range and coerce" to simplify things even more ;))

0 Kudos
Message 987 of 2,635
(11,922 Views)

@altenbach wrote:

The curious case of the blue booleans!

 

Is there a reason to temporarily convert booleans to numbers just do do some boolean operations?

 



To do it just like it was developed in VB.  (If I remember my text programming correctly)


"Should be" isn't "Is" -Jay
Message 988 of 2,635
(11,915 Views)

Really this thread is very good and very much useful.. My hartley thanks to the author.

---
Silver_Shaper | CLD
0 Kudos
Message 989 of 2,635
(11,838 Views)

@altenbach wrote:

The curious case of the blue booleans!

 

Is there a reason to temporarily convert booleans to numbers just do do some boolean operations?

 

(seen here)

 

 

 

 

(Of course we would also have e.g. "in range and coerce" to simplify things even more ;))


 

I've been digging through code tha looks like this for the past month..

Except for the locals.. 

0 Kudos
Message 990 of 2,635
(11,765 Views)