BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

This one I love

Capture.PNG

Follow the bottom wire into the "Build Array" tnear the right of the snip back to its origin Seen Here

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 1691 of 2,571
(10,644 Views)

(seen here)

 

local variable overload. Clearly a text programmer!

 

Message 1692 of 2,571
(10,611 Views)

@altenbach wrote:

(seen here)

 

local variable overload. Clearly a text programmer!

 

 


I just recently started to notice this but I appreciate the names given to the images you attach.

Matt J | National Instruments | CLA
0 Kudos
Message 1693 of 2,571
(10,599 Views)

(seen here)

 

"Index array" is such a complicated function and it is difficult to use to get the second element of an array with two elements.

Wouldn't it be much easier to convert the array to dynamic data instead and treat it as scalar form then on??? 😮

 

 

 

 

 

 

Message 1694 of 2,571
(10,388 Views)

How to Heath Robinson int to Hex string

 

int to hex.png

_____________________________
- Cheers, Ed
0 Kudos
Message 1695 of 2,571
(10,295 Views)

@yenknip wrote:

How to Heath Robinson int to Hex string

 

 


Where did you find that?  Are there REALLY 255 cases in the 😮 inner nested stacked sequence:O


"Should be" isn't "Is" -Jay
0 Kudos
Message 1696 of 2,571
(10,245 Views)

It's vendor driver and example code - and yes among the local variable abuse, nested while loops, stacked sequences, zero error handling, laggy stop button, and ignored VISA buffers, there are 255 cases to the if block.

 

Even better; the in-to-hex function is in several places and based on the code not being the same, they must have written it from scratch each time:

 

no copypasta.png

 

Still, at least they're not committing the sin of copy/pasting code!

_____________________________
- Cheers, Ed
0 Kudos
Message 1697 of 2,571
(10,236 Views)

There should be at least 256 cases. Robot LOL But considering that Number is a U32. I wonder what their default case is or perhaps extra warnings are thrown for that. (BTW, in that picture, if the value is 255, they will increment it to 256. Wonder what character value they will write to the serial port there)

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

0 Kudos
Message 1698 of 2,571
(10,231 Views)

My favorite:

 

stuff an x10 character.png

 

This is supposed to find all ASCII DLE characters in the stream and place another DLE after so a binary sequence that looks like a msg begin (0x10 0x01) or end (0x10 0x02) will not occur in the data.  Honestly, I would've done something similar; my colleague came up with this gem:

 

stuff or unstuff an x10 character.png

 

Actually, this undoes the action, too.  More for less.

 

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.
Message 1699 of 2,571
(10,080 Views)

I'm still not sure why this solved his problem because he didn't share the code itself... but this is an interesting way for the code to wait a few iterations before accepting a True boolean. My guess is there's something else in the code that needs a few iterations to fully initialize.

disable_connection_upon_start (5) - working.JPG

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 1700 of 2,571
(9,957 Views)