BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Well, I can see that for people that have been on this forum for a while there's no problem, but for new people, they could take it the wrong way. Anyways, my comments where just meant as a concern, nothing moreSmiley Happy

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 1031 of 2,635
(11,463 Views)

We all see the odd piece of hair raising code - like some of the recent posts, but I do think that some of the snippets called out as Heath Robinson constructs are just small optimisations rather than a case full blown over-engineering.

 

- Boolean==True? Could be overlooked remenants of refactored code 

 

- Dividing by zero to generate a NaN constant; it isn't entirely obvious you can just enter NaN. The compiler will convert it to a NaN constant anyway; nothing lost and nothing gained.

 

 And so on.

_____________________________
- Cheers, Ed
0 Kudos
Message 1032 of 2,635
(11,450 Views)

Why does it need a subVI and two sub-subVIs (= 3 VIs!) to basically implement the following code functionality ????

 

 

 

If you don't believe me, have a look at the UI challenge template 😄 Here's the original.

 

 

Sure, the original is better documented (especially all the "multiplies"! ;)) , modularized, and structured. 😄

Download All
Message 1033 of 2,635
(11,363 Views)

Nicely documented but I understood what the multiply did the first time. I was pretty sure that the other two did the same function as the first but it is nice to see how they hammer it in. Now I will never forget what the function with the multiplication symbol on it does! Smiley Very Happy

 

 

=====================
LabVIEW 2012


Message 1034 of 2,635
(11,307 Views)

@Steve Chandler wrote:

Nicely documented but I understood what the multiply did the first time. I was pretty sure that the other two did the same function as the first but it is nice to see how they hammer it in. Now I will never forget what the function with the multiplication symbol on it does! Smiley Very Happy


That was done for text-based programmers so they wouldn't be all confused. Smiley Very Happy

0 Kudos
Message 1035 of 2,635
(11,271 Views)

@smercurio_fc wrote:
That was done for text-based programmers so they wouldn't be all confused. Smiley Very Happy


But it is not complete. Shouldn't the diagram constant have a label with "one half". 😄

0 Kudos
Message 1036 of 2,635
(11,260 Views)

@smercurio_fc wrote:

 

That was done for text-based programmers so they wouldn't be all confused. Smiley Very Happy



You mean "normal" programmers. Smiley Tongue

Richard






0 Kudos
Message 1037 of 2,635
(11,259 Views)

@broken Arrow wrote:

@smercurio_fc wrote:

 

That was done for text-based programmers so they wouldn't be all confused. Smiley Very Happy



You mean "normal" programmers. Smiley Tongue


 

Maybe he means "real" programmers. Smiley Tongue

 

(I am just bitter because I wrote some beautiful code for the other challenge in G and it is slower than the totally lame brute force code I wrote in C just for the heck of it. )
0 Kudos
Message 1038 of 2,635
(11,242 Views)

@Darin.K wrote:
Maybe he means "real"programmers. Smiley Tongue

"Real" programmers use switches and patch cables.

 

 

Message 1039 of 2,635
(11,242 Views)

@Darin.K wrote:
(I am just bitter because I wrote some beautiful code for the other challenge in G and it is slower than the totally lame brute force code I wrote in C just for the heck of it. )


How would the lame brute force code perform when implemented in G? 😄

0 Kudos
Message 1040 of 2,635
(11,238 Views)