Jump to content

The dangers of seeing too many trees


Daklu

Recommended Posts

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.

post-7603-1214537650.png?width=400

(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.)

Link to comment

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.

Link to comment

QUOTE (Daklu @ Jun 26 2008, 11:39 PM)

http://lavag.org/old_files/monthly_06_2008/post-7603-1214537650.png' target="_blank">post-7603-1214537650.png?width=400

(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

Link to comment

QUOTE (Yair @ Jun 27 2008, 12:03 PM)

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 ...)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.