BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

I would say it probably never makes a real difference, but one could of course try to design some very detailed benchmarks. Seems difficult.

 

 

If the code to be timed is gigantic and contains many parallel code paths (i.e. many "clumps"), there might still be cases where the "ticker" execution gets delayed if everything is in the same frame because so many other things need to happen in parallel. I have no idea if the compiler would set certain priorities and if "high resolution relative seconds" is prioritized or not.

 

Out of habit, I probably would keep using the three-frame flat sequence, just because it neatly separates the benchmarkee from the benchmarker. 😄

Message 2031 of 2,565
(11,026 Views)

(Seen here)

 

To generate a list of filenames with incrementing suffix, we of course have this function (which gets expensive if the folder already contains a lot of files, different story).

 

Assuming we want to roll our own, we could do this: (guess what would happen if e.g. "# of digits" = 0 when we call/run it! 🐵

 

Generate File Name.JPG

 

 

Or we could of course just do the following. Seems easier. 😮

(Personally, I would even omit the +1, because ABCDEF0000000000.xls is a perfectly good file name, but that's just me :D)

 

MakeFileNames.png

 

0 Kudos
Message 2032 of 2,565
(10,974 Views)

Is dynamic data really the solution for everything? 😮

 

Some think so!

 

Of course we cannot wire a 2D array of DBL to a "Cursor.posX" property node for good reason, because there is no conceivable way this would make sense in any scenario. LabVIEW of course will break the wire.

 

To avoid the broken wire, all we need is convert the 2D array to dynamic data right? No broken wire>>> No problem! 😄 (This is about as effective as fixing low oil pressure by putting electrical tape over the indicator light.)

 

42.png

0 Kudos
Message 2033 of 2,565
(10,863 Views)

Another one of these dynamic data monstrosities (see here)

 

rubeg.png

 

(If you are a dynamic data expert, feel free to help the guy out. I am out!)

0 Kudos
Message 2034 of 2,565
(10,808 Views)

@altenbach wrote:

 

 

(If you are a dynamic data expert, feel free to help the guy out. I am out!)


Dynamic Data is just whatever is convenient for it to be at that time right? /s

Matt J | National Instruments | CLA
0 Kudos
Message 2035 of 2,565
(10,804 Views)

@Jacobson-ni wrote:

@altenbach

Dynamic Data is just whatever is convenient for it to be at that time right? /s


OTOH, dynamic data is always inconvenient for the programmer 😄

Message 2036 of 2,565
(10,799 Views)

@Jacobson-ni wrote:

@altenbach wrote:

 

 

(If you are a dynamic data expert, feel free to help the guy out. I am out!)


Dynamic Data is just whatever is convenient for it to be at that time right? /s


That depends on what "Data" can be...in NI's definition and what that configuration wizard will support:D


"Should be" isn't "Is" -Jay
0 Kudos
Message 2037 of 2,565
(10,784 Views)

@altenbach wrote:

@Jacobson-ni wrote:

@altenbach

Dynamic Data is just whatever is convenient for it to be at that time right? /s


OTOH, dynamic data is always inconvenient for the programmer 😄


Now I finally know why it's called dynamic data. It switches from convenient to inconvenient dynamically.

 

Almost never back though Smiley Wink.

Message 2038 of 2,565
(10,755 Views)

How's that for the ultimate audio compression? (seen here)

 

So we are reading stereo audio data, concatenate left and right channels into one long 1D array, then all we send over UDP is the size of the flattened string. N bytes to 4 bytes! Seems a little bit lossy... 😮

 

(Of course things are hard to debug with all these hidden and backwards wires near the typecast, so I took the liberty to also show the same code section after diagram cleanup)

 

UltimateAudioCompression.png 

Message 2039 of 2,565
(10,458 Views)

@altenbach wrote:

How's that for the ultimate audio compression? (seen here)

 

 

(Of course things are hard to debug with all these hidden and backwards wires near the typecast, so I took the liberty to also show the same code section after diagram cleanup)

 

UltimateAudioCompression.png 


There is something wrong with your cleanup settings.  The For loop grew(should have shrunk and the i term is wrongly placed), wires are on top of each other and the int wires cross twice.  Tell me that was not a Ctrl+U result 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2040 of 2,565
(10,402 Views)