NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here:
NI Home > NI Developer Zone > NI Discussion Forums


BreakPoint
Register  ·  Sign In  ·  Help
Jump to Page:   1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · »  |  Next Page
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Proven Zealous Veteran Ray.R
Proven Zealous Veteran


Ray.R

Message 11 of 600

Viewed 7,430 times


I see code as shown by Jason (#4) and Darren (#2) all the time...  Especially Darren's example.

:smileysurprised:

Then again, I've been corrected by much simpler code while posting answers to this forum, too.. 

where's the smiley-guilty icon???  :womanwink:


 

=========================*=========================
(trying to) See Life in a brand new way...

b* ^ )
2
Kudos!
01-04-2007 11:55 AM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Proven Enthusiastic Veteran Ray Farmer
Proven Enthusiastic Veteran


Ray Farmer

Message 12 of 600

Viewed 7,409 times


we are probably all guilt of these bits of code sometime or another.
 
watch out the person whom professes to be innocent and posts example code on these types of forums.:smileyvery-happy::smileyvery-happy::smileyvery-happy:
2
Kudos!
01-04-2007 03:54 PM
  Reply   Reply  

Re: Rube Goldberg Code   [ Edited ]
Options    Options  
Knight of NI Ben
Knight of NI


Ben

Message 13 of 600

Viewed 7,323 times


Here is another one.

I included both states just incase you thought there may have been a goode reason hiding in the other state.

Here is another in the same VI

Ben

Message Edited by Ben on 01-23-2007 01:28 PM

Message Edited by Ben on 01-23-2007 01:31 PM

Message Edited by Ben on 01-23-2007 01:31 PM
 


 

Attachment RG_Code.JPG (17 kb)
Attachment Iteration count.JPG (7 kb)

5
Kudos!
01-23-2007 01:27 PM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Proven Active Veteran Darren
Proven Active Veteran


Darren

Message 14 of 600

Viewed 7,313 times


I've seen the array size/indexing thing a LOT before...I wonder if there's an easier way we could teach new users how auto-indexing works...
 
-D

 

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
1
Kudos!
01-23-2007 01:50 PM
  Reply   Reply  

Re: Rube Goldberg Code   [ Edited ]
Options    Options  
Proven Active Veteran shoneill
Proven Active Veteran


shoneill

Message 15 of 600

Viewed 7,301 times


Ben,

I have them all over some code I inherited from a previous employer at our company.

I honestly studied it for a while thinking ther HAS to be some significance to that code (Regarding the error cluster).  I mean, come on.....

In the end I convinced myself I WAS actually sane (Something I feel I have to do on an almost daily basis)  and it had no purpose whatsoever.

Shane.

Message Edited by shoneill on 01-23-2007 10:49 PM
 

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
1
Kudos!
01-23-2007 03:49 PM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Knight of NI altenbach
Knight of NI


altenbach

Message 16 of 600

Viewed 7,271 times




Ben wrote:

Here is another one.


We defined Rube Goldberg code as "exceedingly complex LabVIEW code that performs simple tasks in very indirect and convoluted ways" (see first post).

This (and some of the examples shown earlier)  is now actually a Rube Goldberg NOP (or Rube Goldberg NOOP), freshly defined as:

"exceedingly complex LabVIEW code that performs absolutely nothing in very indirect and convoluted ways". :smileyvery-happy:

(We could also define the construct as a WEQ (wire equivalent code), code that can be replaced with a plain wire without any change in functionality. :smileywink:)


 


LabVIEW Champion . Oh, by the way, I work for peanutsKudos .

3
Kudos!
01-23-2007 04:11 PM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Knight of NI Ben
Knight of NI


Ben

Message 17 of 600

Viewed 7,250 times


First the legal stuff:

Warning: The code posted previously was written by "proffesionals". Do NOT attempt to write this code yourself.

 

Excellent point Christian. (Leave ti to one our academic types to recognize when we need a new term :smileyvery-happy: ).

Just to help me understand the differences...

WEQ's are identity operations and satisfy the condition

A = B

where:

A = Input

B =Output

Can we say the same about RG-NOP's?

Shane wrote;

"

Ben,

I have them all over some code I inherited from a previous employer at our company.

I honestly studied it for a while thinking ther HAS to be some significance to that code (Regarding the error cluster).  I mean, come on.....

In the end I convinced myself I WAS actually sane (Something I feel I have to do on an almost daily basis)  and it had no purpose whatsoever.

Shane.

"

That construct is all over this code I recieved. I wonder if it was the same developer or if they both came from the same LV school of thought.

After stepping outside the "Good Developer Box" for a second it hit me what that code was for!

It is a very handy way to make sure the sub-VI does not return an error. If the sub-VI is failing, just switch the boolean constant to false! :smileysurprised: :smileysad::smileymad:

The the very thought alone gave me the sensation of "finger-nails on the chalk board".

If this is indeed the case, then the code I posted is not RGC or RG-NOP or WEQ...

It's a hack!

Ben

 


 

2
Kudos!
01-24-2007 07:50 AM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Proven Zealous Veteran Ray.R
Proven Zealous Veteran


Ray.R

Message 18 of 600

Viewed 7,232 times


LOL !!! @ Ben!!!!

Whoever coded that must have worked here (customer) too!!!

Now talk about useless code!!!!  If it's No Error, then nothing is done to the error cluster values.  If there was an error, the status was ALREADY TRUE!!, so again no change!!!

I'm spending hours upon hours at changing code like this..  

 

 


 

=========================*=========================
(trying to) See Life in a brand new way...

b* ^ )
1
Kudos!
01-24-2007 10:41 AM
  Reply   Reply  

Re: Rube Goldberg Code   [ Edited ]
Options    Options  
Knight of NI altenbach
Knight of NI


altenbach

Message 19 of 600

Viewed 7,222 times


Here's another WEQ, straight from the forum :smileyhappy::
 
 

Message Edited by altenbach on 01-24-2007 01:31 PM
 


LabVIEW Champion . Oh, by the way, I work for peanutsKudos .


 

Attachment Dunce.png (8 kb)

Kudos!
01-24-2007 03:31 PM
  Reply   Reply  

Re: Rube Goldberg Code
Options    Options  
Proven Active Veteran shoneill
Proven Active Veteran


shoneill

Message 20 of 600

Viewed 7,210 times


Hey Ben,

"It's a hack!"

You're forcing me back to another round of sanity checks.....

Somehow I always knew LabVIEW was referring to ME when it complained about "Insane Objects"......

Shane

 

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
1
Kudos!
01-24-2007 04:25 PM
Jump to Page:   1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · »  |  Next Page
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.comâ s copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2010 National Instruments Corporation. All rights reserved.