BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Assuming you start with the correct four input bytes, another option would be a word swap. Same result. 😉

 

Message 1801 of 2,565
(11,134 Views)

Sorry to bring this back to an "old" topic, but I found a nice selection of code. It was actually the shift register button was attached to. I had to split it into 2 halves because it was long.

 

first half.JPG

 

 second half.JPG

 

The biggest offender is the case structure with a constant false, and the false case only passes the cluster and error wires right across. The only reason I could think of is debugging, and then forgot/didn't care to clean up.

 

The person who wrote this code really loves case structures and flat sequences, and they also don't trust error clusters.

0 Kudos
Message 1802 of 2,565
(11,086 Views)

Instead of using a boolean to determine which case of a case structure to use, Let's use the words "start" and "stop" in strings, but check the length of the string and determine whether it is 4 or 5 characters long.  Because you know that "plate" should be just as valid to start something, and "lion" would be just as valid to stop it.Smiley Surprised

 

Seen here  http://forums.ni.com/t5/LabVIEW/Internal-error/m-p/3586987#M1004531

 

Message 1803 of 2,565
(11,073 Views)

@RavensFan wrote:

Let's use the words "start" and "stop" in strings, but check the length of the string



Personally I prefer to use "Init" and "Cease" in that sort of code!Smiley Very Happy

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 1804 of 2,565
(11,020 Views)

Or:

 

"DoIt"

 

"DoNot"

---
CLA
0 Kudos
Message 1805 of 2,565
(11,015 Views)

It starts to be interesting when you add "exit" and "error" ... but with the current code you can send "f*ck" and "S4T4N". 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 1806 of 2,565
(10,962 Views)

@Yamaeda wrote:

It starts to be interesting when you add "exit" and "error" ... but with the current code you can send "f*ck" and "S4T4N". 🙂

/Y


 

 

 

 

So how would the documentation read for that case structure?

 

If it was S4t4n Or  is S4t4n and  is not f*ck then it is S4t4n

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 1807 of 2,565
(10,931 Views)

I like the syntax "If it is ABORT or was ABORT and it is not GOOD then, START."Smiley Surprised


"Should be" isn't "Is" -Jay
Message 1808 of 2,565
(10,919 Views)

@JÞB wrote:

I like the syntax "If it is ABORT or was ABORT and it is not GOOD then, START."Smiley Surprised


Every time I hear code in sentence form, this (missile guidance description) starts playing in my head.

Josh
Software is never really finished, it's just an acceptable level of broken
Message 1809 of 2,565
(10,874 Views)

@JW-JnJ wrote:

@JÞB wrote:

I like the syntax "If it is ABORT or was ABORT and it is not GOOD then, START."Smiley Surprised


Every time I hear code in sentence form, this (missile guidance description) starts playing in my head.


But don't start with Phenomenology 😄

The Dark Star bomb (most important part 11:28) 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 1810 of 2,565
(10,860 Views)