BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

People say I have a pretty good imagination, but this one really puzzles me. What was the programmer thinking exactly?
 
So we have a cluster and turns it into an array with a single element. Now we index out the second element (which by definition does not exist) and again turn it into an array.
 
WWWhhhyyyyy????
 
 
 


Message Edited by altenbach on 06-24-2008 07:59 AM
Message 281 of 2,635
(12,831 Views)
Left-overs.

Left over from functionality which should either be implemented in future or was removed (incompletely) in the past.

The fact that black is the default colour for a non-existant colour box makes the code APPEAR to work correctly.  Of course a change to the constant to anything other than black will show up the erroneous nature of the code.

The final "build array" is just wrong.  The programmer perhaps didn't realise he needs to set colours for each state of the boolean indicator?

Just my 2c

Shane.
0 Kudos
Message 282 of 2,635
(12,826 Views)
Intaris, i remark that a little late:
Are you Shane as in Shoneill? i think it is you from your writing style.
 
What happened to your other username?
 
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 283 of 2,635
(12,806 Views)
Yeah it's me.

Other username is still there.

I've starting working for myself under the company name Intaris (taken from the Romanian word întări meaning to strengthen or grow stronger).

Ooer, I just looked it up on Wiktionary and it gives a different example than my german-romanian dictionary at home......

Shane.

PS what's so distincive about my writing style that numerous people have "spotted" me based on the way I write.  Is it good Smiley Happy, is it bad Smiley Sad, is if funny Smiley Very Happy


0 Kudos
Message 284 of 2,635
(12,792 Views)

Interesting...

Very much good luck with that.

About your style: the (localised) language patterns transpire.. :). nothing bad tough Smiley Very Happy (my english is probably worse than yours)

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 285 of 2,635
(12,772 Views)
Isn't it amazing how much we know about Shane?
  • From the icon we know he likes sushi.
  • From the wiktionary link, we know he's a guy. 😄
  • ...

Shane,

I probably would not have picked up on the writing style without the "Shane" signature. A relatively rare name. Of course a new user with veteran skills is a bit odd and quite noticeable.

Still, I probably trust non-verbal clues more: e.g. from the programming style of the code you attach. 😄 I still remember the long discussions during the median challenge a long time ago.

I wish you great success with your company. 🙂



Message Edited by altenbach on 06-24-2008 02:01 PM
0 Kudos
Message 286 of 2,635
(12,787 Views)
Well it's true that I don't write according to US-en definition, so that probably limits the number of possible users.

Median challenge.  I was thinking recently if it wouldn't be interesting to re-visit that with the new in-place structure.  Should make a bit of a difference given all the swapping being made in the code, no? Smiley Tongue

And yes, I'm a guy.  You wouldn't believe how many Swiss people respond to hearing my name with "But isn't that a girl's name?".  I have never encountered a girl named Shane. Smiley Mad

There was a cowboy film once if I remember correctly......

Shane.
0 Kudos
Message 287 of 2,635
(12,751 Views)
Apparently you have all missed Ben's message in this post ! AFAIK, he was the first to discover the true identity of Intaris.
0 Kudos
Message 288 of 2,635
(12,734 Views)
In order to work on an array element by element in a loop, we could use autoindexing....
 
OR:
 
We could place the array in a shift register and, at each iteration index out the first element and then
delete the first element from the array before placing it back in the shifter.
 
We stop the loop once the array reaches zero size. Whew!!! 😮
 
 
 


Message Edited by altenbach on 06-30-2008 11:11 AM
Message 289 of 2,635
(12,650 Views)
Well, we could...
  1. get the file size
  2. wire it to N of a FOR loop
  3. Feed the array via a shift register
  4. inside the array, we index each element
  5. divide the element by the scalar
  6. and replace the result back into the array
  7. Since we used so much code, we need a backwards wire for the output.

(See left side of image)

Scary thing: this is just the tip of an iceberg. The diagram is many screens big. Titanic!

Or we could just divide the array (right side of image). Same difference. 😄

(Spotted here: http://forums.ni.com/ni/board/message?board.id=170&thread.id=338330&jump=true)




Message Edited by altenbach on 07-07-2008 03:41 PM
Message 290 of 2,635
(12,532 Views)