BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Gabi,

Yeah, I hate those stangers who sit in your chain, in your office.  Worse is that they even look like you.  But to top it off, they even drink YOUR COFFEE!!!!  That's just bad!!

Looking at the code, it reminds me of my coding from days gone by, when I was young, carefree, and didn't visit this forum as often.  Maybe a couple of weeks ago??  😄  LOL!!  😄

Message 111 of 2,600
(16,709 Views)


JoeLabView wrote:
Looking at the code, it reminds me of my coding from days gone by, when I was young, carefree, and didn't visit this forum as often.  Maybe a couple of weeks ago??  😄  LOL!!  😄

to my defense this is very, very old code. didnt know a forum even existed when i made it (i am not sure i even existed at that time..Smiley Very Happy.) . i think it is a LV 5 code, that got updated to LV7.1 at some point without touch in the code.
and then somebody asked me the wrong question this morning. and i said: "i think i calculated it some time ago..."
well, i cant touch the code at all (try to follow a wire of tought in there...). but can still use the prog!
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
Message 112 of 2,600
(16,701 Views)

Oh, but its so monochrome orange, with just a touch a blue at the bottom. 😄

You must admit that the use of locals in this case has the advantage of self-documentation (and they are all beautifully named! ;))

It seems at one time in the past, the code was used with simulated data. How else would do explain that gaussian noise that's not used at all.

How many times does one need to calculate h/2pi? 😄

Message 113 of 2,600
(16,670 Views)


@altenbach wrote:
How many times does one need to calculate h/2pi? 😄

Well, with the state of physics being what it is today, one can't even count on constants being constant anymore, so I guess you could say he was being proactive. Smiley Very Happy
0 Kudos
Message 114 of 2,600
(16,641 Views)

smercurio_fc wrote:
 
Well, with the state of physics being what it is today, one can't even count on constants being constant anymore, ...


By modern physics we have to assume that a "constant" is constant because it is more likely to be the value we assigned to it than any other value. Kinda like I'm more likely to be surfing the web than working. Smiley Tongue
0 Kudos
Message 115 of 2,600
(16,638 Views)


You must admit that the use of locals in this case has the advantage of self-documentation (and they are all beautifully named! ;))


it is back from the times i had all my variables in the first sequence, and i was addressing them only trough locals. this prog has only 5 sequences. and yes, they all look like this one. Smiley Sad


It seems at one time in the past, the code was used with simulated data. How else would do explain that gaussian noise that's not used at all.

This is a MC simulation. the outer loop is nb of steps, inner loop is number of samples. i assume the unused gaussian noise was a first approx for a random value of one of the degrees of freedom, and was replaced with a more elaborate random number with thermal distribution weight. this is the small subvi named '1'.

i hope this was my worst one ever, and that i wont have any other surprise like that. Smiley Mad Smiley Tongue


-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 116 of 2,600
(16,639 Views)
Unbelievable amount of local variables in this VI.  http://forums.ni.com/ni/board/message?board.id=170&thread.id=290122
 
Local variables updating their indicators.
Controls updating their local variables.
VI functions updating indicators and local variables simultaneously.
 
And the real heart of the programming is all done in numerous embedded formula nodes!
 
Some loops are Stop when true, okay, but others are continue while true with extra Boolean operations thrown in to straighten out the logic.
Message 117 of 2,600
(16,621 Views)
A diagram filling about 40 screens with 5-7x value property nodes per terminal. Every operation is done via value property nodes, sometimes 1000x times in a loop.
 
 
(see also my answer fro a few picks).
 
 


Message Edited by altenbach on 12-19-2007 12:15 AM
Message 118 of 2,600
(16,553 Views)
 
If you ever have the need to run a while loop a little bit more than for one iteration, but definitely less than for two full iterations, I would suggest the following construct:
 
Basically, the entire VI gets aborted early in the second iteration (after ~1.0001 iterations). 😄
Message 119 of 2,600
(16,422 Views)
Vestigiality describes something that has lost all its original functionality (e.g. the appendix organ in humans).
 
Similarly, vestigial code is junk code that during the evolution of the program has lost all its original functionality and no longer servers any useful purpose.
 
Here is an example of a Vestigial WHILE loop. Notice that you can remove the while loop (and delete the "=0" primitive) and we end up with exactly the same functionality. 🙂
 
 
Message 120 of 2,600
(16,384 Views)