07-01-2017 11:29 AM - edited 07-01-2017 11:33 AM
Sometimes the program is working perfectly and no improvements are possible, but we still have days left for the project (never happens!), so we could start doing some artsy-fartsy creative modifications.
Of course there are others that instead try to learn programming and write/debug code from scratch mostly with the paint tool. Seems like they chose the wrong profession and would have more success with a career in the visual arts. 😄
(Yes, these blue things are stacked sequences. Imagine programming with integers in this color scheme)
07-01-2017 12:06 PM
I didn't paint it prettily (you could say neither did the OP in your linked post?) but here was something I found whilst repackaging my code recently...
I'm actually a little concerned that this isn't equivalent to what I replaced it with, since if the Finalize throws an error it will behave differently, but I think for the Finalize to error there would need to be an earlier error anyway. Hopefully I don't discover this was my carefully written workaround to a problem I've forgotten...
And then in another example - RG version
and new version
I added the FP to show that actually I was previously indexing the entire cluster in order. I don't think I knew about the Cluster to Array node when I first wrote this, so I understand that... but an Express VI instead of Concatenate String, sat right next to a Concatenate String?
07-09-2017 01:54 PM - edited 07-09-2017 01:54 PM
While I doubt the algorithm is sound, here's a near literal translation (bottom) of some convoluted code found in the forum.
I added a limited amount of comments to guide the eye, but there are plenty more things wrong (well, it works, but at a snails pace :D)
07-11-2017 06:38 PM
my very own (very small) rube goldberg
.. but i'm just beginning 😉
07-11-2017 07:02 PM
@jwscs wrote:
my very own (very small) rube goldberg
.. but i'm just beginning 😉
Oh, you found it! (Hey, what is the increment doing there? Yeah, auto-increment work on columns too when row is unwired!) I liked the code over where you posted it! peruse this thread at your own peril! I hope you have a sense of humor! We've all done worse- that is what code reviews are for!
07-11-2017 07:12 PM - edited 07-11-2017 07:13 PM
@jeff i read this thread (or parts of it) already, but since it is not in the main labview forum, it often slips my mind .. but never again 😉 because of the email updates i now get
and the humor is what drove me to post here (and to never make that error again)
this thread was a good learning experience, the standard beginner error of the select with true and false wired to it for example.
(the +1 was for myself and from the other post to be explicit rather than implicit)
07-11-2017 08:24 PM - edited 07-11-2017 08:33 PM
@jwscs wrote:
@Jeff i read this thread (or parts of it) already, but since it is not in the main labview forum, it often slips my mind .. but never again 😉 because of the email updates i now get
and the humor is what drove me to post here (and to never make that error again)
this thread was a good learning experience, the standard beginner error of the select with true and false wired to it for example.
(the +1 was for myself and from the other post to be explicit rather than implicit)
I actually caught a bug in my code last week using the output of "Value Changed.vim" AND TRUE rather than the output of "Value Changed.vim" AND "Value" to detect a F-T transition. 2017
Use Value Changed AND TRUE to detect any value change on a BOOL
07-11-2017 09:57 PM
@jwscs wrote:
my very own (very small) rube goldberg
They are probably about equally good. It is likely that the "transpose" is actually not carried out at all, but the output data flagged internally to index the other way.
07-12-2017 05:07 AM
in this case i knew about the "its only a flag" thing, but since the index array gave me the "transposed" columns anyway it was really superfluuous
07-17-2017 10:31 AM - edited 07-30-2017 02:20 PM
Some people complain that their diagram gets too big, but then they use a screenful of code just to generate an LED level meter. (17 coercion dots, 17 diagram constants, 17 LEDs, 17 comparisons) when all they really need is a small FOR loop the size of a postage stamp and an LED array indicator. The code could even be wrapped into a subVI: I32 in, boolean array out.