BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

And Jack wins a prize for code obfuscation

Maybe I'll wait for official support after all.... !Smiley Surprised

0 Kudos
Message 661 of 2,571
(11,261 Views)

I am going to link to an interesting VI here.

 

It isn't so much a Rube Goldberg, though there are a few Rube constructions like building an array of string constants rather than just creating a constant that is already a string array.  The code is actually neatly laid out, but really just has a lot of wrong things going on it.  It could also be a good nomination for the Local Variable thread.  It uses stacked sequences.  It uses a weird intermingling of single sequence frames, single iteration while loops, multiple iteration while loops, bits of data like a boolean whose only purpose is to link stuff together to have it operate in sequence, even if the two things that it is linking could be a single 2-frame flat sequence (or going the bad route of a stacked sequence which has been done numerous times.)

 

But just to give a taste, here is the beginning of the very linear program, and the comment that I thought was funny and fitting about the "penalty box".  (Actually, the whole program looks like a linear sequence of penalty boxes.)

 

Message Edited by Ravens Fan on 04-07-2010 10:42 PM
Message 662 of 2,571
(11,220 Views)

Ravens Fan wrote:

I am going to link to an interesting VI here.

 

 (Actually, the whole program looks like a linear sequence of penalty boxes.)

 

 

Message Edited by Ravens Fan on 04-07-2010 10:42 PM

Wheew!
 
That looks like it was developed by an "inside-the-box" thinker!

"Should be" isn't "Is" -Jay
0 Kudos
Message 663 of 2,571
(11,173 Views)

Here is one of my own dandies from here, where nathand set me straight.  All of this

rube1.PNG

gets replaced by this 

 

rube2.PNG

 

At least I recognized it as Rube when I posted for help...

--
Tim Elsey
Certified LabVIEW Architect
Message 664 of 2,571
(11,160 Views)
Hey, have you been looking at my project from work? It looks _exactly_ like that with sequentitis and penalty boxes!

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 665 of 2,571
(11,126 Views)
Could I just say, rather than make a 300 shift-register solution to http://forums.ni.com/ni/board/message?board.id=170&message.id=490052#M490052 to get a mention. I'd rather not be evil in the process.
0 Kudos
Message 666 of 2,571
(11,066 Views)

found here

 

Message Edited by Broken Arrow on 04-14-2010 04:19 PM
Richard






0 Kudos
Message 667 of 2,571
(10,999 Views)

Broken Arrow wrote: 

 


 

 I was just going to post that. A WEQ!
 
You did not show the entire WEQ code. See what the output of the case structure is!
 
Message Edited by altenbach on 04-14-2010 02:39 PM
Message 668 of 2,571
(10,992 Views)

altenbach wrote: 
 I was just going to post that. A WEQ!
You did not show the entire WEQ code. See what the output of the case structure is!

Yeah Smiley Happy but I've seen that before. The ol' True if True and False it False statement.

Richard






0 Kudos
Message 669 of 2,571
(10,982 Views)

Sometimes it is difficult to understand why certain code is the way it is.

 

In this example, arrays are built for a lifetime of a few clock cycles, just to break them down again in the next primitive.

 

Look at the first row of the built 2D array, it is never even used! Why???

 

 

Message Edited by altenbach on 04-17-2010 09:51 AM
Message 670 of 2,571
(10,901 Views)