When humans and machines aren't quite on the same page

Jason and I have been working on some projects together and have had this problem bugging us where the data in a certain table was 'mysteriously' deleting itself (re: this post).  We had checked a particular stored procedure and despite both of us having looked it over many times, we just didn't see that little extra "@" character stuck in there (oopsie).  What we saw was what we humans wanted to, not what was actually there.

This reminds me of those emails you get where you are asked to comb through a paragraph and count the number of times the letter 'F'

Finished files are the result of years of scientific study combined with the experience of many years

There are 6 letter F's in this paragraph.  Most folks skip over the the word 'of' and only count the letter F in the larger words.  Humans skim when we read.  The computer does not.

Here was our procedure (table names changed to protect the innocent)

ALTER PROCEDURE [dbo].[ProcedureName]
@EmailAddress varchar(256)
AS
IF EXISTS (SELECT TableID from The_Table_Name_Was_Pretty_Long
WHERE EmailAddress=@EmailAddress)
BEGIN
         DELETE The_Table_Name_Was_Pretty_Long
         WHERE @EmailAddress = @EmailAddress
END

Obviously now the WHERE @EmailAddress = @EmailAddress should have been WHERE EmailAddress = @EmailAddress.  Indeed, the computer takes your instructions very seriously.

This is fairly common phenomenon though, I see it in my classes every day as well as in the field by both novice and experienced professionals.  The simpler it is, the easier it is for you to overlook it.  If only that machine could just read our minds!

This also reminds me of the words of Charles Babbage

"On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."
I know I said this last time, but really, next time I'll be look more closely and be more careful.