BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@Ray.R wrote:

@Steve Chandler wrote:

I tried cleanup. It does help a lot but readability is only part of it. It is still hard to add things in the middle. It isn't that hard but I am lazy that way. Also for me it is easier to read code if there are less wires. Don't get me wrong - I like wires! I just don't like when there are too many of them because it makes me dizzy. The original could have at least concatenated the semicolon and linefeed separately and wired the output between each constant in the other concatenate. I still don't like it because there is a wire going to way too many nodes.

 

Now that I think about it the thing that bothers me about concatenating a bunch of constants is when you have something like a linefeed between each.

 

I would much prefer even this way.

 

Example_VI_BD.png

 

 

 


 

 

Wait!!  Wait!!  wait!!!

 

You're original solution still holds true to be the better one.  This one is just a cleaned up representation of the same Rube Goldberg. 

So it's still a Rube.  Making it a non-Rube does cause the block diagram to be cleaner. 🙂


 


I agree the original solution is the better way. The one above is only a slightly better way than the pure build string.

=====================
LabVIEW 2012


0 Kudos
Message 1071 of 2,635
(11,614 Views)

How's this?

AntiRube1.png

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1072 of 2,635
(11,568 Views)

@Yamaeda wrote:

How's this?

 


There is a subtle difference that may make that unacceptable if the result is sent to very picky hardware. In the constant lines are terminated by a linefeed. The very picky hardware needs the linefeed, carriage return and semicolon to be absolutely sure the line has ended.

 

Also to me the semicolons in the constant just don't look nice. The constant is there for me to look at and the code will format it for the dumb device.

=====================
LabVIEW 2012


0 Kudos
Message 1073 of 2,635
(11,560 Views)

Don't see what your problem is with Yameda's post Steve.. If you looked at the constant with /codes turned on you would probably fin has has ;\r\n after each letter.

 

what do you want to do? pass the intial constant through a preprocessing loop so you can edit even easier the delimiter?

(any reason why not to build an array of the constants and pass it through array to spreadsheet string - no errors will be generated)

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1074 of 2,635
(11,520 Views)

@James W wrote:

Don't see what your problem is with Yameda's post Steve.. If you looked at the constant with /codes turned on you would probably fin has has ;\r\n after each letter.

 

what do you want to do? pass the intial constant through a preprocessing loop so you can edit even easier the delimiter?

(any reason why not to build an array of the constants and pass it through array to spreadsheet string - no errors will be generated)

 

James


I don't "have a problem" with his post. Is there a way to set the line ending for a string constant?

 

[Edit: No the delimiter will not change. The set of commands might. Inserting one in the middle using the concatenate string method is much more difficult.]

=====================
LabVIEW 2012


0 Kudos
Message 1075 of 2,635
(11,508 Views)

I can create RG code along with the best of them

RG Concatenation.png

 

But wait... This forum isn't about "creating" RG code... 🙂

 

Or did we want to start a thread for who can create the wildest RG when given a simple task?

 

Rob

0 Kudos
Message 1076 of 2,635
(11,522 Views)

@Robert: Rubify code can be quite fun, but then you'll need to change those 2 spreadsheet to array to for-loops. 🙂

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1077 of 2,635
(11,495 Views)

@Robert Cole wrote:

I can create RG code along with the best of them

RG Concatenation.png

 

But wait... This forum isn't about "creating" RG code... 🙂

 

Or did we want to start a thread for who can create the wildest RG when given a simple task?

 

Rob


 

Been there done that!

 

See here.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 1078 of 2,635
(11,458 Views)

I remember that thread. I read through it all at the time it was active.

 

I'm thinking, though, that RG code and obfuscation are not, necessarily, the same thing. But that may be debatable and a question of semantics.

 

We should probably get back to our original program (thread) already in progress.

 

     Rob

0 Kudos
Message 1079 of 2,635
(11,453 Views)

I came across this today in my meanderings through the forum.  Nothing like reading from a text file, formatting the string into individual numbers, writing those numbers to a cluster, converting the cluster to an array, making that into a 2D array, transposing the 2D array, converting that back into a spreadsheet string, and converting that into a digital waveform!

 

read file and convert to boolean rube.png

Or, you could convert the text file string directly to a U32 array, reshape it to a 1D array, and convert that.

 

But perhaps the other way is more fun because you get more colors on your block diagram.

Message 1080 of 2,635
(11,368 Views)