BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

The consesus seems to be that if code does not work right, the only solution is to throw even more code at it. 😄

 

So if a shift register does not work as expected, maybe we can add a few more N=1 FOR loops so we can pipe the data through more shift registers. The idea probably is that asymptotically the code will work perfectly after we repeat that for an infinite number of times. 😄

 

(seen here)

 

 

Message 1371 of 2,635
(11,809 Views)

Changing the color of a scatter plot (seen here) to a single color can be extremely complicated and require sequence frames unbundling and bundling of unchanged elements, making a custom ramp with all the same colors and three property nodes.

 

 

 

Or it could be done with two property nodes and 10% of the code.

0 Kudos
Message 1372 of 2,635
(11,782 Views)

Creating a simple 2D image apparently needs 4 FOR loops, many identical diagram constants and a couple of DBL arrays, if all we really need is a final U8 array to convert to a picture. The insert shows basically the same code (the scaling is slightly modified, but that's irrelevant).

 

0 Kudos
Message 1373 of 2,635
(11,707 Views)

Instead of using a boolean to drive a case structure, let's convert the boolean to the string values of "True" and "False" and use the string value to drive a case structure.

 

Seen here.

 

(I'd attach the screen shot as a file and embed it, but apparently .pngs are still busted as "The contents of the attachment doesn't match its file type" when I try to upload it.)

 

Message 1374 of 2,635
(11,594 Views)

Maybe they want a True, False and a "Don't really know" option?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 1375 of 2,635
(11,578 Views)

A particular favorite of mine that I came across last year was this:

Selection.jpg

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
Message 1376 of 2,635
(11,601 Views)

Having just sat the CLD exam (after years of procrastinating) I can tell you that NI has put together some very nice exam preparation material to help you pass.

 

CLD Preparation E-Kit

 

I highly recommend going through it thoroughly... except maybe ignore these bits:

 

CLD 4 Event Structure Timer Solution.vi

CLD 4 Event Structure Timer Solution.vi rube.png Classic Rube / Wire Equivalent Code

 

 

CLD 16 Add process.vi

CLD 16 Add process.vi rube.png Constant Equivalent Code? T=0 F=0

 

Hmmm, maybe I should wait until I get my results back before I point this out?

There's probably more rube in my 1 exam submission than in all the preparation material.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 1377 of 2,635
(11,502 Views)
That first one has remarkable similarity to my avatar.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 1378 of 2,635
(11,436 Views)

You might have been their inspiration 😉

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 1379 of 2,635
(11,389 Views)

@TroyK wrote:

CLD 16 Add process.vi

CLD 16 Add process.vi rube.png Constant Equivalent Code? T=0 F=0

 



It's a Bool-to-Int on Line Two. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 1380 of 2,635
(11,392 Views)