BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

A couple that I saw in some code sent to me:

 

Or simply string constant 'Enable IrDA Device'.png

 

Why not a simple string constant 'Enable IrDA Device'?

 

 

 

 

When will the next state be 'IRDA_ENABLE_3V'.png

 

When will the next state be 'IRDA_ENABLE_3V'?

 

 

 

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

@sebster wrote:

 

 

 

 

When will the next state be 'IRDA_ENABLE_3V'.png

 

When will the next state be 'IRDA_ENABLE_3V'? 

 


I was going to guess it would be 3V if you close the one button dialog using the red X...but I just tested it and even then it is true.  So what is the point of this output?  Data flow?

0 Kudos
Message 1532 of 2,571
(10,609 Views)

Nice catches Seb!

Regarding the last one, maybe it was a 2-button dialog earlier?

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 1533 of 2,571
(10,596 Views)

Your task is to take four boolean controls and build their state into a boolean array with four elements. Any of us could program that in 10 seconds, but others do it in different ways. (seen here)

 

Message 1534 of 2,571
(10,446 Views)

@altenbach wrote:

.... (seen here)


Another lead nugget from the same VI:

 

What is the purpose of building a scalar into an array and then taking the "array max"???? 😮

 

(Since I am clarivoyant, I can predict that taking the "array min" would probably give the same result! :D)

 

 

Message 1535 of 2,571
(10,444 Views)

altenbach wrote:

 

(Since I am clarivoyant, I can predict that taking the "array min" would probably give the same result! :D)

 

 


This has to be a case of randomly throwing down nodes and finding ones that don't break the wires when connected.  Then keep wiring stuff together until the result is what is expected, then stop because you are done.

0 Kudos
Message 1536 of 2,571
(10,403 Views)

@Hooovahh wrote:

This has to be a case of randomly throwing down nodes and finding ones that don't break the wires when connected.  Then keep wiring stuff together until the result is what is expected, then stop because you are done.


DNA/Evolution programming? Random mutations to the code until it's better adapted to the evironment/target! 😄

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 1537 of 2,571
(10,319 Views)

@Yamaeda wrote:

DNA/Evolution programming? Random mutations to the code until it's better adapted to the evironment/target! 😄

/Y


I've used evolutionary computation with AI / machine learning. Throwing the occasional random noise into a learning algorithm has somewhat similar intentions to preventing integral windup in a PID controller

_____________________________
- Cheers, Ed
0 Kudos
Message 1538 of 2,571
(10,313 Views)

@Yamaeda wrote:

DNA/Evolution programming? Random mutations to the code until it's better adapted to the evironment/target! 😄

/Y


I proposed a game of random scripting when I was first learned about scripting.  Start with two inputs, something simple like two booleans.  Then have a truth table of what you want.  Then setup a routine that would drop random functions from the palette down which is of the correct data type, until there is a run-able routine.  Then have it run the VI looking for the expected result.  If the result isn't correct, add more random functions until there isn't a broken arrow and then run again.

 

Theoretically this could produce unexpected ways to get the same result.  For more complex functions this could result in a more efficient way of programming a subroutine than the developer...of course the actual output would probably be a fun experiement in a Rube Goldberg using way more functions than it should need.

0 Kudos
Message 1539 of 2,571
(10,304 Views)

Today's delight! 🙂

 

Stern Warning! When there is no error from the H/W, you should be extra careful with the way you code. 😉

 

 

Rube Goldberg Code for Error-NoError.jpg

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 1540 of 2,571
(10,291 Views)