Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message"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.
Post Follow-up to this messageForgot 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. > >
Post Follow-up to this message"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*
Post Follow-up to this messageMichael 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.
Post Follow-up to this messageBob 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"
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.