Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Revisiting an old friend: Set oRS = Nothing
Bob Barrows [MVP] wrote:
> I still can't get past this:
>
> The VB/VBA documentation has always stated that COM objects are dereferenc
ed
> when they go out of scope. When Eric says: "The script engine will
> automatically clear those variables when they go out of scope", he isn't
> saying anything that the docs haven't said for the last umpteen years.
>
> Yet bugs have been documented that have been corrected by explicitly
> destroying them. A couple people on that blog page talked about the old DA
O
> Database object bug. Another referred to the intemittent IIS failures that
> were corrected by explicit cleanup of ADO connection objects. This tells m
e
> that COM _never behaved the way it was supposed to_. Why am I supposed to
> all of a sudden start trusting it to behave correctly just because we have
> another OS or another version of IIS? To me the burden of proof is rather
> high, and would have to involve explaining how the previous failures
> occurred and what's been done to prevent them. Instead we get people like
> Eric treating us as if we are idiots who don't understand scope and "how C
OM
> works".
>
> Bob Barrows

An excellent summarization. Such bugs as described in
http://www.4guysfromrolla.com/webtech/060999-2.shtml will keep me
performing such practices as setting objects to Nothing until I write
my last line of code. This I consider a good example of another
metaphor: "defensive programming".

Microsoft has had it's share of so-called "regression bugs"
http://www.sciencedaily.com/encyclo...ression_testing
wherein a bug in an older version of software is re-introduced in later
versions (often skipping versions). Such occurrences reinforce the
utility of defensive programming.

IMO the OP (and Eric Lippert) are merely fascinated with their
(apparently) recent discovery of the cargo cult metaphor. But the
metaphor has been in common use on the Internet for years prior to
_their_ discovery of the term, e.g.:
http://groups.google.com/groups?q=c...vax.UUCP&rnum=1

Nonetheless, to use yet another metaphor, just as
"To a child with a hammer, all the world looks like a nail.",
so those children among us who have only recently discovered the term
"cargo cult programming" are wildly eager to share with everyone their
newly-discovered "hammer" and possibly to use it to hammer other
programmers. Lippert and Microsoft in general are newbies to the
Internet however, so we can surely forgive their enthusiasm.

From another perspective, I would maintain that _all_ users of
Microsoft products are _necessarily_ "cargo cult" users because
Microsoft doesn't reveal their source code and we necessarily _cannot_
understand how their systems work. As a result, superstitious practices
abound in the Windows world ("Heck, I dunno; why don't you reboot the
system?").

Indeed, to be intellectually honest, _everyone_ is a "cargo cult"
person, because _everyone_ uses words and tools which they do not
understand (at some level), yet which they trust to work (e.g., I would
be hard-pressed to build an automatic transmission for my car, even
given the scrap steel necessary to make the parts). So we're merely
talking about the _degree_ to which we are "cargo cult" programmers. But
to the best of my knowledge there is no consistent "cargo cult scale"
that we can neasure differences with, and so, at that point the metaphor
ceases to be useful.

Good Luck,
Michael D. Kersey

Report this thread to moderator Post Follow-up to this message
Old Post
Michael D. Kersey
05-13-04 12:16 AM


Re: Revisiting an old friend: Set oRS = Nothing
"Bob Barrows [MVP]" wrote in message
news:u4Q7C16MEHA.3016@tk2msftngp13.phx.gbl...
: Instead we get people like Eric treating us as if we are idiots who
: don't understand scope and "how COM works".

I understand scope completely.  Open the cabinet, remove the bottle, unscrew
the cap, take a swig, swish, gargle and spit.  Simple.



Report this thread to moderator Post Follow-up to this message
Old Post
Roland Hall
05-13-04 12:16 AM


Re: Revisiting an old friend: Set oRS = Nothing
Forgot to Set cuboard = Nothing
You didnt put it back in


"Roland Hall" <nobody@nowhere> wrote in message
news:%23SLE9qUNEHA.3460@TK2MSFTNGP10.phx.gbl...
> "Bob Barrows [MVP]" wrote in message
> news:u4Q7C16MEHA.3016@tk2msftngp13.phx.gbl...
> : Instead we get people like Eric treating us as if we are idiots who
> : don't understand scope and "how COM works".
>
> I understand scope completely.  Open the cabinet, remove the bottle,
unscrew
> the cap, take a swig, swish, gargle and spit.  Simple.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Don Grover
05-13-04 12:16 AM


Re: Revisiting an old friend: Set oRS = Nothing
"Don Grover" wrote in message
news:%23SnTmvUNEHA.3460@TK2MSFTNGP10.phx.gbl...
: Forgot to Set cuboard = Nothing
: You didnt put it back in

That's what wives are for! *ducks and runs*



Report this thread to moderator Post Follow-up to this message
Old Post
Roland Hall
05-13-04 12:16 AM


Re: Revisiting an old friend: Set oRS = Nothing
Michael D. Kersey wrote:
>
> An excellent summarization...

Indeed. It is the most persuasive argument I have heard to date on either
side of the issue. On the other hand...


> ...IMO the OP (and Eric Lippert) are merely fascinated with
> their (apparently) recent discovery of the cargo cult metaphor.
> But the metaphor has been in common use on the Internet for
> years prior to _their_ discovery of the term, e.g.:
> [URL replaced with http://tinyurl.com/yvehu ]

I cannot speak for Lippert, but this is certainly not my affliction. And the
dismissiveness of this response is insulting to anyone who believes in
challenging his own assumptions. It discounts the very notion that
revisiting assumptions has any worth at all. And I think that is .


> ...From another perspective, I would maintain that _all_ users
> of Microsoft products are _necessarily_ "cargo cult" users
> because Microsoft doesn't reveal their source code and we
> necessarily _cannot_ understand how their systems work. As a
> result, superstitious practices abound in the Windows world
> ("Heck, I dunno; why don't you reboot the system?").

This more or less** fits within the generalized "group of people making
obeisance to something that it is obvious they do not comprehend"
(http://en.wikipedia.org/wiki/Cargo_cult), but the following does not:


> Indeed, to be intellectually honest, _everyone_ is a "cargo
> cult" person, because _everyone_ uses words and tools which
> they do not understand (at some level), yet which they trust
> to work (e.g., I would be hard-pressed to build an automatic
> transmission for my car, even given the scrap steel necessary
> to make the parts).

I think this stretches the analogy too far. Using tools is not shallow
emulation. Just consider the source of the analogy, and see if it fits a
modern proxy: If a U.S. pullout occurred today in South Korea, do you think
the Koreans would perform ritualistic practices to entice back those
mysterious jets that once flew out of Osan? The populous, after all,
understands little (if anything) about the inner workings of F-16 fighter
jets.


> So we're merely talking about the _degree_ to which we are
> "cargo cult" programmers. But to the best of my knowledge
> there is no consistent "cargo cult scale" that we can neasure
> differences with, and so, at that point the metaphor ceases
> to be useful.

I disagree with the assertion that we are all cargo cult programmers. I
don't believe the cargo cult analogy applies to those of us who are
comfortable with having been wrong, but uncomfortable with being wrong.
Intellectual curiosity an the will to challenge one's own beliefs count for
something.




**I say more or less because I believe there is a distinction between
"cannot" and "do not". Many of us are quite capable of understanding these
things, but lack the access to (or even interest in) the specifics. That is
not the same as failing to comprehend something, IMO.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.



Report this thread to moderator Post Follow-up to this message
Old Post
Dave Anderson
05-14-04 04:30 PM


Re: Revisiting an old friend: Set oRS = Nothing
Bob Barrows [MVP] wrote:
> Instead we get people like Eric treating us as if we are idiots

I do wish to retract this as far as Eric's blog itself is concerned. I had
unfairly lumped him in with some people I had encountered in the past who
DID treat those of us who espoused explicit object creation and destruction
as "idiots". Also, at least one of the respondants to the blog does exhibit
this attitude.

I also want to say that, except for ADO objects, I am not as religious about
this as my prior posts may indicate. I sometimes fail to explicitly destroy
my xml domdocument and fso objects. I guess my thinking on this subject has
undergone some alteration ...

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
05-28-04 08:30 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 01:58 PM.

 

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.