BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

People that "grew up" on dynamic data and Express VIs tend to do this. I hope the compiler knows better. 

Richard






Message 2551 of 2,571
(1,453 Views)

Slicing and dicing a JSON string like a master sushi chef! (no toolkits) can be done in many ways. Some fit on a quarter postcard!

 

Seen here

 

 

altenbach_0-1703179737383.png

 

 

 

Message 2552 of 2,571
(1,338 Views)

@altenbach wrote:

Slicing and dicing a JSON string like a master sushi chef! (no toolkits) can be done in many ways. Some fit on a quarter postcard!

 


Yes, made to the Rube Goldberg thread. 🤣

 

That's what happens when you want to code someting by learning DIY hardly any training and no one to ask for advice. I asked the question to learn and improve

Message 2553 of 2,571
(1,286 Views)

@MatthiasAr wrote:
Yes, made to the Rube Goldberg thread. 

No shame in that. It is always an honor to be mentioned! Congratulations!

 

(After using LabVIEW for almost 30 years, sometimes looking at my own code from 10 years ago (i.e. written with 20 years of daily programming experience!) makes me cringe. 😄 Hey, I can do that with half the code!)

0 Kudos
Message 2554 of 2,571
(1,265 Views)

Parsing a file can be hard and might require many loops, multiple delete from array and insert into array, even detours to 3D arrays! (seen here)

 

Or it could be done with much less:

 

altenbach_0-1703892074302.png

 

Message 2555 of 2,571
(1,199 Views)

@altenbach wrote:

Parsing a file can be hard and might require many loops, multiple delete from array and insert into array, even detours to 3D arrays! (seen here)

 

Or it could be done with much less:

 

altenbach_0-1703892074302.png

 


At least, the developer documented the code well with wire labels and comments.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2556 of 2,571
(1,172 Views)

Two ways to close a polygon:

 

(The version on top was seen here. I suspect that it was intentional to track student plagiarism. 😄 )

 

altenbach_0-1705105568591.png

 

Message 2557 of 2,571
(994 Views)

@altenbach wrote:

 

(The version on top was seen here. I suspect that it was intentional to track student plagiarism. 😄 )

 


😉

0 Kudos
Message 2558 of 2,571
(916 Views)

Here is some FPGA Rube Goldberg code for flattening multiple clusters and arrays into a single (fixed-size) array of U32. Sometimes the need for resource optimization pushes the developers to try all sorts of weird workarounds (seen here). It adds unnecessary delays because of all the shift registers, and uses lots of resources because of all the insertions at variable indexes (useless because the output array has the max size anyway).

 

raphschru_0-1708698085867.png

 

Which is equivalent to this:

raphschru_1-1708698138809.png

 

Message 2559 of 2,571
(723 Views)

I can't speak to that specific use case, but looks like they were trying to do some pipelining, as illustrated in the examples here:
https://www.ni.com/en/shop/electronic-test-instrumentation/add-ons-for-electronic-test-and-instrumen...

 

Edit: clicked the link in the post and saw the discussion discussing exactly this

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 2560 of 2,571
(699 Views)