10-28-2011 08:41 AM
And another candidate for how not to write LabVIEW code (but how to write text-based code using LabVIEW icons): http://forums.ni.com/t5/LabVIEW/Compatibility-of-windows-xp-with-labview-and-windows-2000-with/td-p/...
10-28-2011 11:05 AM
roffle... i love the "//comments".
10-28-2011 01:08 PM
@smercurio_fc wrote:
And another candidate for how not to write LabVIEW code (but how to write text-based code using LabVIEW icons): http://forums.ni.com/t5/LabVIEW/Compatibility-of-windows-xp-with-labview-and-windows-2000-with/td-p/...
That VI looks like a Flying Spaghetti Monster wearing gigantic, colorful mittens. Also reminds me how much I like the smaller locals we got a year ago, I think (too lazy to look it up) an Altenbach Idea.
10-29-2011 12:03 PM
@broken Arrow wrote:
@smercurio_fc wrote:
And another candidate for how not to write LabVIEW code (but how to write text-based code using LabVIEW icons): http://forums.ni.com/t5/LabVIEW/Compatibility-of-windows-xp-with-labview-and-windows-2000-with/td-p/...
That VI looks like a Flying Spaghetti Monster wearing gigantic, colorful mittens. Also reminds me how much I like the smaller locals we got a year ago, I think (too lazy to look it up) an Altenbach Idea.
NO NO NO there are no locals in Spaghetti.vi
12-08-2011 04:25 PM - edited 12-08-2011 04:27 PM
A masterpiece of codestench every anti-pattern is in there somewhere. VI analizer took forever and found dup control names and unused code!
The
02-02-2012 08:37 AM
I wish I could edit the first post. I think we DO need to discuss what's wrong with using Locals within this thread and possibly offer examples to how to improve the code, similar to the Rube Goldberg thread. Maybe changing the title of the thread itself...
02-02-2012 08:54 AM
This thread is already 10s of pages long, the rube thread has over 1000 posts. If people were encouraged to discuss posts as well, I think it might get out of hand - although probably not as badly as the up/down convert threads.
Maybe we could have another LabVIEW sub-board called "LabVIEW Pitfalls to Avoid" or similar, where people are encouraged to post examples of bad code, and discuss how they might be improved. Off my head, topics might include examples of:
- Local variable abuse
- Globals variable abuse
- FGV abuse
- Obfuscated code
- Rube code
- Race conditions
- Misuse of the synchronisation palette
02-02-2012 09:44 AM
Ray.R said
I wish I could edit the first post. I think we DO need to discuss what's wrong with using Locals within this thread and possibly offer examples to how to improve the code, similar to the Rube Goldberg thread. Maybe changing the title of the thread itself...
Feel free to start a new thread or I can edit the first post/title for you. I just need to know what you'd like it to say
Jordan
02-02-2012 10:51 AM
Thanks Jordan,
I knew you monitored the forum, but didn't realize you monitored it so closely.. 😉 🙂
I would simply remove the following from the first post:
PLEASE do not discuss using or not using Locals in this thread.
Thanks,
RayR
02-02-2012 10:53 AM
@yenknip wrote:
This thread is already 10s of pages long, the rube thread has over 1000 posts. If people were encouraged to discuss posts as well, I think it might get out of hand - although probably not as badly as the up/down convert threads.
Maybe we could have another LabVIEW sub-board called "LabVIEW Pitfalls to Avoid" or similar, where people are encouraged to post examples of bad code, and discuss how they might be improved. Off my head, topics might include examples of:
- Local variable abuse
- Globals variable abuse
- FGV abuse
- Obfuscated code
- Rube code
- Race conditions
- Misuse of the synchronisation palette
Yes... There are many pitfalls.. Maybe like you said, we could have a sub forum. However, we would not want to give the idea that LabVIEW has pitfalls.. All programming languages do.. It's the programmers that create the pitfalls... 😉
Maybe a sub-forum called "Gatchas"... LOL! 😄