From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

I was debugging drivers, and I ran across an icon I didn't quite recognize:

 

BowenM_0-1596746936499.png

 

Quickly realized it was actually this:

 

BowenM_1-1596746982916.png

 

Found here

 

Message 2201 of 2,571
(11,755 Views)

@BowenM wrote:

I was debugging drivers, and I ran across an icon I didn't quite recognize:

 

BowenM_0-1596746936499.png

 

Quickly realized it was actually this:

 

BowenM_1-1596746982916.png

 

Found here

 


That is from the conversion from the old Merge Errors VI and the new Merge Errors primitive.  I've seen it plenty of times.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2202 of 2,571
(11,713 Views)

@crossrulz wrote:

@BowenM wrote:

I was debugging drivers, and I ran across an icon I didn't quite recognize:

 

BowenM_0-1596746936499.png

 

Quickly realized it was actually this:

 

BowenM_1-1596746982916.png

 

Found here

 


That is from the conversion from the old Merge Errors VI and the new Merge Errors primitive.  I've seen it plenty of times.


So THAT's what that monstrosity is!  Yes, I've seen that in drivers, too.  I never made the connection about the conversion before, probably because no one on our dev team ever used it.  (Except for me; I make extensive use of it.  It's a great way to control dataflow.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2203 of 2,571
(11,705 Views)

We've all seen rampant abuse of the "Bytes at port" node for Serial communications, but this has to be the most complicated workaround for its problems that I have ever seen:

 

Kyle97330_0-1596838051331.png

 

Message 2204 of 2,571
(11,676 Views)

@Kyle97330 wrote:

We've all seen rampant abuse of the "Bytes at port" node for Serial communications, but this has to be the most complicated workaround for its problems that I have ever seen:

 

Kyle97330_0-1596838051331.png

 


😲

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2205 of 2,571
(11,531 Views)

So we need to generate an I32 integer that is 2^23.

 

(seen here)

 

Some think this needs to be done using higher math using DBL, introducing 3 (!!!) coercion dots. Others think more in binary. 😄 (And the real nerds would probably use logical shift just to obfuscate again)

 

altenbach_0-1597675110358.png

 

Message 2206 of 2,571
(11,527 Views)

@altenbach wrote:

So we need to generate an I32 integer that is 2^23.

 

(seen here)

 

Some think this needs to be done using higher math using DBL, introducing 3 (!!!) coercion dots. Others think more in binary. 😄 (And the real nerds would probably use logical shift just to obfuscate again)


With constant folding, it probably comes out the same anyways...

 

And I prefer "geek", as I am one of those who see bunches of bits to be shifted around.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2207 of 2,571
(11,513 Views)

@crossrulz wrote:
And I prefer "geek", as I am one of those who see bunches of bits to be shifted around.

Be careful there, they are not the same! The scale by power of two is an arithmetic shift, not a logical shift. The result differs when dealing with negative lower inputs..

0 Kudos
Message 2208 of 2,571
(11,509 Views)

I'm currently taking over an application (that was supposed to be an end product already, and just a new iteration on my part).

Almost the entire code is the definition of Rube Goldberg, I am not extremely experimented in LV, and it makes it really difficult to understand and check the necessity of certain actions.

 

Here are 2 pictures to illustrate the very nice use of Event structures with parrallel loops but also the consistency in the logic of the development:

 

This is one of the main loop (yes, One of them) I did "all" the comments, and organized everything to start trying understand what the hell was going on, but the "Buttons and Window Handling" loop is a magnificent use of Event structures. Not really Rude Goldberg, but still pretty funny.

VinnyLaTaupe_0-1598455376283.png

 

Second one is about the consistency in the dev logic and is part of the "main.vi"

VinnyLaTaupe_1-1598455901826.png

 

 

 

Message 2209 of 2,571
(11,404 Views)

@VinnyAstro wrote:

I'm currently taking over an application (that was supposed to be an end product already, and just a new iteration on my part).

Almost the entire code is the definition of Rube Goldberg, I am not extremely experimented in LV, and it makes it really difficult to understand and check the necessity of certain actions.

 

Here are 2 pictures to illustrate the very nice use of Event structures with parrallel loops but also the consistency in the logic of the development:

 

This is one of the main loop (yes, One of them) I did "all" the comments, and organized everything to start trying understand what the hell was going on, but the "Buttons and Window Handling" loop is a magnificent use of Event structures. Not really Rude Goldberg, but still pretty funny.

VinnyLaTaupe_0-1598455376283.png

 

Second one is about the consistency in the dev logic and is part of the "main.vi"

VinnyLaTaupe_1-1598455901826.png

 

 

 


The new iteration needed on this code is an entire refactoring of the code base. I'm sorry, but I'm glad this is you and not me that has inherited this code. Not even text on the icons to tell what they do, let alone nice glyphs. Local variables everywhere. Ugh, I'm getting a headache and it's not my project. Good luck. 

0 Kudos
Message 2210 of 2,571
(11,393 Views)