BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

That's a Sin-full way to program..  😛
0 Kudos
Message 231 of 2,635
(12,568 Views)
Seems more like a  "Wing and a prayer.."
0 Kudos
Message 232 of 2,635
(12,564 Views)


altenbach wrote:
  1. First we do a NOOP, writing a control to a local variable of itself! (where have we seen that before?)



Atleast It could easily be figured out that control was wired to a local variable of itself.
 
Imagine, I have come across situation where 2 control labels are being SAME. And the control was written to the other control's local variable. Smiley Mad (Making an impression just as above,,, But actually not!!!)
 
And the other control was HIDDEN!!!! Smiley MadSmiley Mad Smiley Mad...  That was ridiculous... I had nothing to do other than scratching my head to debug it!! Smiley Mad




Message Edited by Vsh on 04-30-2008 11:43 PM
0 Kudos
Message 233 of 2,635
(12,532 Views)

Vsh,

I actually had to debug code that resembled very much the one posted by Altenbach, and yes they hid the bloody controls.  They not only hid the bloody controls on the front panel of all sub-vi's, but also the terminals were hidden (placed under) by stacked sequence structures. Thus explaining the eye patch on my avatar.  😞

 

Message 234 of 2,635
(12,518 Views)
There is an INI token for this:
structuresFadeToDiagramBeneath=TRUE

but be awere on big VIs this will slow down the speed dramatically (and unfortunatly their is a correlation between those two).
The code capture tool saves these changes to, so maybe you can get an image of the troublesome VI, reset the INI token and start editing fast.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 235 of 2,635
(12,460 Views)

Thanks Ton,

I'll have to investigate that.

0 Kudos
Message 236 of 2,635
(12,433 Views)
Here is Norbert's version of Rube Goldberg Code found by Mike! Smiley Very Happy
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 237 of 2,635
(12,377 Views)
It is amazing how much code could be used to read data from a 2-column spreadsheet file.
 
 
(A) here's the actual code:
 
  1. read it line by line in a while loop
  2. with each iteration index the current line string and convert it to a 2D array containing two data points
  3. set the file position for the next line
  4. followed by indexing out the two values with two seperate index nodes
  5. form an xy cluster
  6. built a cluster array at the loop boundary
  7. Check if the file position is at the end of the file 
  8. bundle the array
  9. make the cluster into an array with one huge element
  10. feed it to a 2D graph.
  11. Surround everything with a useless sequence frame!

 

(B) And here's a simple alternative that does exactly the same thing!


Solution (A) is only approriate if you get paid by square footage of the diagram and performance is never an issue. 😄

Message Edited by altenbach on 05-07-2008 01:40 PM
Message 238 of 2,635
(12,347 Views)


@parthabe wrote:
Here is Norbert's version of Rube Goldberg Code found by Mike! Smiley Very Happy

That's not nice, Partha, posting that in here 😉

Well, just as stated in the thread, there is a reason for that WEQ (It's only not documented in this screenshot..... Smiley Sad )
And, on the other hand, everybody has the right to "Goldberg" from time to time 🙂

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 239 of 2,635
(12,315 Views)

Sorry, Norbert.

BTW, what is meant by WEQ?

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 240 of 2,635
(12,311 Views)