Rolf Kalbermatter Posted September 23, 2007 Report Share Posted September 23, 2007 QUOTE(manic @ Sep 19 2007, 03:39 AM) The worst example of bad labview code i've ever seen was a monstrous 16 MB VI without any subVI. I guess it had about 300 screen sizes, when viewed in 1280x1024 px. Something like 20 screens wide and 15 screens high.Unfortunately, i can't provide an image of that thing...(not only because of the size, but due to legal reasons) Fortunately, i wasn't the guy to redesign that piece of LV-**** :laugh: If I would be tasked with that my reaction would be simple. Don't even try to redesign it! It will cost at least double the time than doing it from scratch and still not be as clean and performent as it should be. Rolf Kalbermatter Quote Link to comment
Mache Posted September 23, 2007 Report Share Posted September 23, 2007 QUOTE(rolfk @ Sep 22 2007, 09:53 AM) If I would be tasked with that my reaction would be simple. Don't even try to redesign it! It will cost at least double the time than doing it from scratch and still not be as clean and performent as it should be.Rolf Kalbermatter In fact one of my last assignments has been to take over multiple projects whch are done (not wired or coded) anti-principles. You name it. Case inside a sequence inside a case inside a sequence. Local Variables, Globals, Not Auto indexing, using While loops instead of for loops etc. Can't post the code as it multiple screens in Height and width. Another thing that puzzled me ia lot is varibale names. It can drive you crazy. PressurePSI is actually holding PressurekPA in some places. The biggest challenge was that there are more than 30 loops in the same VI all polling, all timed at different rate and the only way the data is exchanged is via Locals and Globals. The problem was the program works on one PC and does not on another. Pray why should that be?!! The original Author blames the Windoze!! They want me to fix this. Anyway to make the long story short. This is what I told them. "Go ask Eric Clapton to pick up his guitar and play cacophony, just random sounds. I bet he will not be able to do it. It is the same here. If you want more Cacophony hand the guitar to someone who does not know how to play. If you want music, the concert must start all over again." Anyway. We talk about Design Patterns all the time. But it may be worthwhile to look at Anti-Pattrens, when teaching new people. Lava Flow Accumulate and Fire http://en.wikipedia.org/wiki/Accumulate_and_fire Busy Spin Italian Coding Golden Hammer Accidental Complexity Boat Anchor Just Some nice terms to use... when talking code Regards Mache Quote Link to comment
badwolf Posted September 13, 2008 Report Share Posted September 13, 2008 Oh My God!!!! Quote Link to comment
jcarmody Posted September 16, 2008 Report Share Posted September 16, 2008 I've inherited a bunch of spaghetti code, some of the most tangled bunches of wire you've ever seen. But, as bad as they are, I was able to understand & extend them. I've attached my favorite example of horrible code. The best thing about it is that I can point to the spaghetti code (written by coworkers) and honestly say it's not the worst I've seen. Quote Link to comment
crelf Posted September 16, 2008 Report Share Posted September 16, 2008 QUOTE (jcarmody @ Sep 14 2008, 07:06 PM) The best thing about it is that I can point to the spaghetti code (written by coworkers) and honestly say it's not the worst I've seen. That doesn't make it a good thing Quote Link to comment
TobyD Posted September 16, 2008 Report Share Posted September 16, 2008 QUOTE (jcarmody @ Sep 14 2008, 04:06 PM) I've inherited a bunch of spaghetti code, some of the most tangled bunches of wire you've ever seen. But, as bad as they are, I was able to understand & extend them. I've attached my favorite example of horrible code. The best thing about it is that I can point to the spaghetti code (written by coworkers) and honestly say it's not the worst I've seen. I'd like to run that through diagram cleanup and see how it comes out (and how long it takes - so far I've been impressed with the speed) Quote Link to comment
JiMM Posted September 16, 2008 Report Share Posted September 16, 2008 This must be a vampire thread. Once a year it rises from the grave to haunt us! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.