BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Imaginitive nonesense provided as a suggested solution to reset the 2nd LED

 

 

Not sure if this is a Rube Goldberg code or simply nonsense...

 

Found here:  http://forums.ni.com/t5/LabVIEW/Simple-LED-question-from-a-beginner/m-p/1221974#M520877

 

Message 751 of 2,602
(13,013 Views)

 


@Ray.R wrote:

Imaginitive nonesense provided as a suggested solution to reset the 2nd LED

 

 

Not sure if this is a Rube Goldberg code or simply nonsense...

 


Haha Smiley Very Happy I can't tell if they were joking around or if that was a serious proposed solution.
I think that beats the 'is boolean true?' trick.

 

Cory K
0 Kudos
Message 752 of 2,602
(12,990 Views)

And as long as the led 1 is true, how much CPU are we using?

 

"My computer is running really slow..."

 

     Rob

Message 753 of 2,602
(12,989 Views)

LOL!!  Good observation.  It may be a good code to slow down the computer.  I forgot to mention that benefit..  😄

0 Kudos
Message 754 of 2,602
(12,976 Views)

The Sudoku solver posted here has a pretty front panel, but the code could probably be reduced to 10% of the current monstrosity of locals and stacked sequences.

 

Here's a quick example:

 

We need to copy a 9x9 Array to a different 9x9 Array. Here's an animation showing the current hard way and a possible alternative. 😄

 

Message 755 of 2,602
(12,839 Views)

There are many ways to get the local IP address, here are two versions of varying complexity...

 

 

(The top version was spotted here).

 

(This was actually one problems at the 2010 NI week speed coding challenge. I wonder how long the upper versions would have taken to code from scratch :D))

 

Note also that the upper version is actually broken under Windows 7, because we would need to search for "IPv4 Address" and make some other adjustments.

 

 

Message 756 of 2,602
(12,695 Views)

A common eyesore is the manipulation of paths via string operations. Why????

 

 

This particular example is also dangerous, because it will break on different OS where the delimiter is NOT "\".

 

(seen here)

0 Kudos
Message 757 of 2,602
(12,606 Views)

How many times have we seen this:

 

undefined

 

If True then

  True

Else

  False

 

Found here.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 758 of 2,602
(12,600 Views)

The art of indexing!

 

To get the first three elements of a given row, we can use either:

 

 

  • 5 local variables
  • 4 diagram constants
  • "array subset"
  • 4 "index array" nodes
Alternatively, we could just use one simple atomic operations. 😄

0 Kudos
Message 759 of 2,602
(12,534 Views)

@broken Arrow wrote:

To sequentially index an array, so many people wire sequential numbers to individual Index Array functions rather than just expanding the function. I see it all the time, even by experienced wire slingers.


OK - What is wrong with that? If you want really quick traceability of a wire halfway down a large index array function that you are then going to bundle after performing an operation on it, coming back to the code in 6 months time it's really useful to see which index is connected to which wire. Then you KNOW you have done what you intended or can see what the original programmer intended without having to count e.g. 13 lines down the index funtion which indexes 24 lines of a 1x36 array starting at index 5.

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 760 of 2,602
(12,498 Views)