BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Here's another small one:

Intensity Sc(f)ail.png

 

The lower one simply isn't scalable. The picture shows the algorithm after cleaning it up.



Remember Cunningham's Law
Message 1761 of 2,608
(11,361 Views)

@PeterFoerster wrote:

 

The lower one simply isn't scalable. The picture shows the algorithm after cleaning it up.


Here's what I would do... 😄

 

 

Message 1762 of 2,608
(11,329 Views)

Well, that's part of why I posted it here... Nice one!

At least now I know what the thing I get from quickdrop when wanting "index array" does...

 

Edit: Also, mine doesn't work for a single color. Then again, why would anyone need it to?



Remember Cunningham's Law
0 Kudos
Message 1763 of 2,608
(11,292 Views)

We've all seen Rube Goldbergs where the programmer copies the Index Array Function unnecessarily.  And we've seen where they go and wire up every index connector of the Index Array with a constant.

 

But I don't think I've seen this before where they continually add 1 to the array index in a long series to get the next element.  Just to make it even more painful, they actually added 1 every time and didn't even use the +1 increment function.  (You know, just to double the work that they had already expononentially created.)

 

Seen here

 

For bonus points, it also as the =True? comparison elsewhere in the VI.

 

Message 1764 of 2,608
(11,137 Views)

@RavensFan wrote:

We've all seen Rube Goldbergs where the programmer copies the Index Array Function unnecessarily.  And we've seen where they go and wire up every index connector of the Index Array with a constant.

 

But I don't think I've seen this before where they continually add 1 to the array index in a long series to get the next element.  Just to make it even more painful, they actually added 1 every time and didn't even use the +1 increment function.  (You know, just to double the work that they had already expononentially created.)

 

Seen here

 

For bonus points, it also as the =True? comparison elsewhere in the VI.

 

Just because,  I tried a BD clean-up The result was "amazing"  I would have shared a view of that with y'all except:

Capture.PNG

BEAUTIFUL! Smiley Very HappySmiley LOLSmiley LOL


 


"Should be" isn't "Is" -Jay
Message 1765 of 2,608
(11,121 Views)

Someone better not tell them the index is resizable, and defaults to getting the next element...or you know auto indexing loops.  Also using a double as the index made me cringe a little bit.

0 Kudos
Message 1766 of 2,608
(11,116 Views)

Note to self:

Do not ever crash the CCT!  

After crashing and attempting to close LabVIEW the darn thing was still running.

After BLOWING LabVIEW away via Task Manager and re-opening LabVIEW I created a new Blank lvproj.  

Capture.PNG

Doesn't that look a lot like the CCT Dependancies list?

I'll be back after a reboot I guess.

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 1767 of 2,608
(11,061 Views)

@JÞB wrote:

Doesn't that look a lot like the CCT Dependancies list?


Nope, or if it is, it is an extremely partial list, because the CCT has a bunch of VIs of its own and your scrollbar shows there isn't enough space there for those (not to mention that your dependencies list is a bit weird in that it doesn't show those VIs under the vi.lib folder, which it usually should. I think you might be seeing separate utility copies which LV might be using for itself?).

 

But yeah, the CCT was never optimized for large BDs. I tried quite a few years back and gave up when I saw the level of effort compared to the potential result (let's just say the NI picture control was not designed for effiency with raster images).


___________________
Try to take over the world!
Message 1768 of 2,608
(11,026 Views)

(seen here)

Is the absolute value function really that hard to find? (Yes, the other case is just wired across).

 

 

 

 

 

Message 1769 of 2,608
(10,925 Views)

Flattening a U16 numeric to a little endian string is trivial, but some seem to need a screenful of code. (seen here) (The actual code contains several of these in parallel, this is just a small excerpt)

 

 

In other parts of the code they are reversing the operations with a similar detour, even invovling a matrix (!!!) datatype, no kidding! See for yourself.

 

Message 1770 of 2,608
(10,838 Views)