Daklu Posted June 28, 2008 Report Share Posted June 28, 2008 I'm sure we've all experienced customers who continually want "just one more feature" and the bizarre code that often results from trying to accomodate their wishes. While trying to fix a bug in a program built in that way I ran across this code snippet. After figuring out what it does I had to paste it in a test vi just to make sure I wasn't missing something. (The developer who created this program is quite competent. I think it's just a case of getting into details too much and missing the bigger picture.) Quote Link to comment
Yair Posted June 28, 2008 Report Share Posted June 28, 2008 So basically, the boolean is set to F in either case. That's a classic Goldberg. P.S. Stephen, if you see this, please thank the kind soul at NI who decided that placing points on wire junctions was a good idea. It would really have made reading this piece of code easier. Quote Link to comment
LAVA 1.0 Content Posted June 28, 2008 Report Share Posted June 28, 2008 QUOTE (Yair @ Jun 27 2008, 05:03 AM) P.S. Stephen, if you see this, please thank the kind soul at NI who decided that placing points on wire junctions was a good idea. It would really have made reading this piece of code easier. I was thinking the same thing. No dots? None of these wires are connected!! :headbang: Quote Link to comment
Rolf Kalbermatter Posted July 1, 2008 Report Share Posted July 1, 2008 QUOTE (Daklu @ Jun 26 2008, 11:39 PM) http://lavag.org/old_files/monthly_06_2008/post-7603-1214537650.png' target="_blank"> (The developer who created this program is quite competent. I think it's just a case of getting into details too much and missing the bigger picture.) He may be competent but whenever I see a Selector function used on Boolean wires I have a feeling of: Öhhh no, one more person that has missed the Boolean Algebra classes or doesn't bother to think about creating a logic state table for a boolean problem. It is so much easier to think in terms of OR and AND for boolean problems that I simply can't understand how someone could think about using the selector instead for that. Rolf Kalbermatter Quote Link to comment
silmaril Posted July 5, 2008 Report Share Posted July 5, 2008 QUOTE (Yair @ Jun 27 2008, 12:03 PM) So basically, the boolean is set to F in either case. That's a classic http://forums.ni.com/ni/board/message?board.id=BreakPoint&thread.id=2634' target="_blank">Goldberg. Yes, it is set to F in either case. But this is no Goldberg-code at all! It's simply a data flow solution to make shure that you really read the input value before you reset it using the local variable. OK, there might have been solutions that are easier to read (like using a single sequence frame or calculating "value AND false" or ...) 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.