From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-26-2016 08:59 AM - edited 08-26-2016 09:01 AM
Ran into this code today and it seems to be screeming Rube Goldberg. Any comments?
08-26-2016 12:30 PM
I'm not seeing what the simpler alternative would be for this to be a Rube. Looking at it for a minute or so, it doesn't seem bad.
08-26-2016 01:35 PM - edited 08-26-2016 01:36 PM
@Ray.R wrote:Ran into this code today and it seems to be screeming Rube Goldberg. Any comments?
Sorry Ray but I am with Bill and can not point the RubeGoldbergness of that code. It some ways it is rather clever way to get the index (plus 1) of all of the true bits in a cluster of booleans.
Ben
08-26-2016 01:49 PM
Ray.R wrote:
The only thing Rubish I see is perhaps the cluster could have been an array from the beginning. But there are often good reasons for the cluster.
08-31-2016 07:09 PM
Thanks guys!
I am always looking for ways to improve my code. 🙂
09-01-2016 07:12 AM
Snap of portion of code
09-01-2016 08:05 AM
09-01-2016 08:08 AM
Actually its a part of complexcode, just portion of it i thought to share, the output will be passed to another loop.
09-01-2016 09:14 AM - edited 09-01-2016 09:17 AM
I would even build the rows 2&3 into a 2D array of strings (or use subset array), do only one single spreadsheet conversion, then index the rows out at the end.
I am also questioning the sanity of using binary formats for DBL. That's typically a thing for integers so maybe the type should be a blue array. Where is the output used?
Of course all output terminals should have self-explanatory names. Most seem to be at the defaults.
09-01-2016 09:23 AM
You know, this is mainly a fun thread, but we could use it as an excellent tool to post what we think is Rube-ish code and see if anyone can help us un-Rube it.