Results 1 to 13 of 13

Thread: Bitwise-Logical-Operators

  1. #1

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Bitwise-Logical-Operators

    Did anyone else read this article under Visual Basic News?

    http://visualbasic.about.com/b/2010/...-operators.htm

    I thought it was a very bad treatment of the subject. I especially don't like articles like that when the code they post relies on Option Strict Off.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Bitwise-Logical-Operators

    It certainly isn't how I would prefer to think about the subject.
    My usual boring signature: Nothing

  3. #3
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: Bitwise-Logical-Operators

    If a programmer considers bitwise operations a 'dark corner' then one should question that programmers core competency.

    Yes, the article is more confusing than enlightening (about.com is probably not a 'goto' source of concise information) and does exemplify this current trend of going back to technologies such as VBScript and adopting all the bad things (Bad Things™) from that language.

    That is, you have to run the code to see what it does.

    (As a side note, while looking for the Character Map, I stumbled upon the Math Input Panel - OMGLOLWUT?! - can someone explain the existence of such a thing? Is it really that valuable on a tablet PC?)
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

  4. #4

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Bitwise-Logical-Operators

    Quote Originally Posted by SJWhiteley View Post
    If a programmer considers bitwise operations a 'dark corner' then one should question that programmers core competency.

    Yes, the article is more confusing than enlightening (about.com is probably not a 'goto' source of concise information) and does exemplify this current trend of going back to technologies such as VBScript and adopting all the bad things (Bad Things™) from that language.

    That is, you have to run the code to see what it does.

    (As a side note, while looking for the Character Map, I stumbled upon the Math Input Panel - OMGLOLWUT?! - can someone explain the existence of such a thing? Is it really that valuable on a tablet PC?)
    I posted a comment to the article and, well, hmmm, I guess he didn't like it.

    I have a Bamboo Pen/Touch and Math Input Panel is great for formula's. I wish there were forums that accepted digital ink.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Bitwise-Logical-Operators

    I've made a few comments on Dan's posts before. I think he is a bit loose with his terminology and that is a great way to cause confusion in the inexperienced. For a start, there's no such thing as a "bitwise logical operator". There are bitwise operators and there are logical operators. The same keywords are used for both but they are two different sets of operators.

    I also have to agree that using code that won't compile under Option Strict On is a great way to encourage people to develop bad habits. Anding a Boolean and an Integer and then using the result as a Boolean is simply a bad idea.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Bitwise-Logical-Operators

    I cannot believe how bad that article is! It should be banned from the internet!

    Does an XOR - doesn't explain why you might ever want to use an XOR - comes up with -12 and doesn't even discuss the sign-bit!

    That article is the 'dark corner' I'm afraid of

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  7. #7

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Bitwise-Logical-Operators

    The article is displayed prominently in the banner for this forum.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Bitwise-Logical-Operators

    I would not go that far. To some extent, we are all groping in the dark when it comes to logic. There are things that we have not considered. Situations we have not encountered. Lessons that we have not learned. Here we have somebody who has taken the initiative to try to put something informative on the web. We disagree with various aspects of what has been written, but for most of us, we have not been so bold as to write something ourselves. With any design, it is far easier to criticize than to create. I disagree with the message in this article, and I would have been trying to deliver a different message, but then again, in reality I have not delivered ANY message.

    In my trivial experience as a teacher, where I mostly learned that I am not one, I was amazed at how differently people learned fairly basic concepts. What this meant to me was that my way of teaching some concept will get through to only one segment of the population, while other approaches will get through to other segments. One is not right or wrong, it just is. I didn't feel that these articles were intended to be discussions about the use of either bitwise or Boolean logic, nor did I really have a feel for what they were actually intended to teach, but just by reading the comments here it is clear that the various readers took different lessons from the articles, and that alone is learning.

    Personally, I don't remember ever not understanding bitwise logic. I can only assume that I wasn't born with an understanding of the subject, but I don't remember how or when I learned it. For somebody else coming new to the subject, any one approach to teaching may or may not make sense to them. For a person who is reading a series of sources in an attempt to understand the subject, this is one source. It isn't complete, and it isn't introductory, but I could easily see how it could benefit the right person.

    Most of us do not write tutorials on any one subject. JMC does, and what he writes is quite informative, but he writes only about certain subjects. Who else writes such things? I don't, so I don't think it is my place to be too critical.
    My usual boring signature: Nothing

  9. #9
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: Bitwise-Logical-Operators

    The ability to teach does not just come from an intimate understanding or application of a subject, but from an ability to teach.

    The article, by the writers own admission, demonstrates a lack of understanding and application of a subject as well as an inability to express that subject to a wider audience than themselves.

    The lack of any teaching experience - either brick-and-mortar or virtual - does not preclude one from critiquing the teaching of another. Just as a restaurant patron is not above critiquing the chef even though that patron would not be able to boil an egg.

    Likewise, a football coach is a coach (generally) because of his ability to teach football - requiring quite an extensive knowledge of football, of course - but primarily for the ability to teach and motivate. The latter skills are essential for the position of coach; even though said coach would not be capable of playing football.

    As it is with teach an academic subject. While knowledge of the subject is important, the ability to transfer that knowledge is, in and of itself a skill, requiring education and training. The ability to faceroll the keyboard and shove it on the internet does not mean the nut behind the keyboard has anything relevant to say.

    But even then, when the posting, article or argument appears relevant on the face of it, and garners a following or positive response, does not validate the posited argument. In every field, consensus does not make anything fact or right.
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

  10. #10
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Bitwise-Logical-Operators

    I agree on most of the critics comments on the blog, however
    the visual representation of what happens (binary) can help a lot of people.

    And to those who strongly object to the blog as challenge...
    Write a better article explainig this for this forum. I sugest with C# and VB.Net examples etc...
    I think it's better to use your energy positvly.


    Have fun...
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  11. #11

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Bitwise-Logical-Operators

    Quote Originally Posted by Shaggy Hiker View Post
    I would not go that far. To some extent, we are all groping in the dark when it comes to logic. There are things that we have not considered. Situations we have not encountered. Lessons that we have not learned. Here we have somebody who has taken the initiative to try to put something informative on the web. We disagree with various aspects of what has been written, but for most of us, we have not been so bold as to write something ourselves. With any design, it is far easier to criticize than to create. I disagree with the message in this article, and I would have been trying to deliver a different message, but then again, in reality I have not delivered ANY message.

    In my trivial experience as a teacher, where I mostly learned that I am not one, I was amazed at how differently people learned fairly basic concepts. What this meant to me was that my way of teaching some concept will get through to only one segment of the population, while other approaches will get through to other segments. One is not right or wrong, it just is. I didn't feel that these articles were intended to be discussions about the use of either bitwise or Boolean logic, nor did I really have a feel for what they were actually intended to teach, but just by reading the comments here it is clear that the various readers took different lessons from the articles, and that alone is learning.

    Personally, I don't remember ever not understanding bitwise logic. I can only assume that I wasn't born with an understanding of the subject, but I don't remember how or when I learned it. For somebody else coming new to the subject, any one approach to teaching may or may not make sense to them. For a person who is reading a series of sources in an attempt to understand the subject, this is one source. It isn't complete, and it isn't introductory, but I could easily see how it could benefit the right person.

    Most of us do not write tutorials on any one subject. JMC does, and what he writes is quite informative, but he writes only about certain subjects. Who else writes such things? I don't, so I don't think it is my place to be too critical.

    It was wrong of me to be such a critic (I can hear my Mother talking about sins and stones.) I should not be surprised that being "published" is not a sign of authority in all cases. You are correct that he at least tries, which is more than I can say for me. I wouldn't know how to start a blog if I had too.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  12. #12
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Bitwise-Logical-Operators

    I was overly harsh as well!

    I have actually tutored many in the use of bitwise logic - both in VB and T-SQL. We use it extensively even to this day.

    And the posts I have made on the forum here about that very topic have chosen more meaningful AND and OR and AND NOT's along with the concept of masking bits for my examples!

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  13. #13
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Bitwise-Logical-Operators

    Quote Originally Posted by dbasnett View Post
    It was wrong of me to be such a critic (I can hear my Mother talking about sins and stones.) I should not be surprised that being "published" is not a sign of authority in all cases. You are correct that he at least tries, which is more than I can say for me. I wouldn't know how to start a blog if I had too.
    I, too, would have to ask for help to actually get started on such an endeavor. I've thought about it at times, but I have a firm grasp on my own reality, which is that I wouldn't write more than one or two things then abandon it, so I have never bothered. I have lived long enough to recognize some of my characteristics. One of the most consistent is that I am a dedicated non-joiner. It is actually pretty surprising that I am here, and that I write as much as I do when I am here, because in every other aspect of my life, if you want information from me, you have to beat it out of me.

    So for those who try to teach, I usually support them. This guy kind of laid an egg with this particular article, in my opinion, but some of his other articles were pretty valuable, and even this has a bit.






    (and I'll just leave it to the reader to decide whether I meant to make that lame-ass pun or not)
    My usual boring signature: Nothing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width