- Local time
- Yesterday, 19:14
- Joined
- Feb 28, 2001
- Messages
- 28,715
From Pat:
For about the first 5 to 10 years of my stay with the U.S. Dept. of Defense, my biggest job was cleaning up other people's messes. Which is probably why both Pat and I use globals when needed, but with trepidation because of the dangers inherent. Solo, you will say that this is group-think or prejudice. I must respectfully - but emphatically - tell you that it is called experience.
In 40+ years of computing in private and public environment, I have learned a few things about the fine art of software engineering. You don't only code something to work - but you code it to work well and you code it to be re-usable because otherwise you are pitching dollars down the "wishing it would work" wishing well. It has been my experience that you must constrain the urge to globalize too many things.
Solo, your viewpoint as you express it is, I am sure, heartfelt and in your mind it must seem clear. To my way of seeing it, you are arguing in favor of practices that I have seen to be expensive (in the "time is money" sense of that term.)
You KNOW if you read my posts that I use globals - but only when carefully designed and limited in subject matter. Please understand that I am not saying to never use globals. But I am saying that they are like having feral cats as pets - they will do their business where you least expect it and stink up the place. Not to mention they will attack you when you least expect it. Whereas if you have a place for your globals, it's like a litter box, a place to contain the stink. OK, I use colorful metaphors sometimes, but it's the way I am.
One thing I will say that is important here is simply this: It's a poor tool kit that doesn't have very many tools in it. Globals are just one way to track things. Tempvars are another. And the problem with having too few tools in the kit? If all you have is a hammer, everything you've got gets nailed.
I get called in to clean up lots of messes.
For about the first 5 to 10 years of my stay with the U.S. Dept. of Defense, my biggest job was cleaning up other people's messes. Which is probably why both Pat and I use globals when needed, but with trepidation because of the dangers inherent. Solo, you will say that this is group-think or prejudice. I must respectfully - but emphatically - tell you that it is called experience.
In 40+ years of computing in private and public environment, I have learned a few things about the fine art of software engineering. You don't only code something to work - but you code it to work well and you code it to be re-usable because otherwise you are pitching dollars down the "wishing it would work" wishing well. It has been my experience that you must constrain the urge to globalize too many things.
Solo, your viewpoint as you express it is, I am sure, heartfelt and in your mind it must seem clear. To my way of seeing it, you are arguing in favor of practices that I have seen to be expensive (in the "time is money" sense of that term.)
You KNOW if you read my posts that I use globals - but only when carefully designed and limited in subject matter. Please understand that I am not saying to never use globals. But I am saying that they are like having feral cats as pets - they will do their business where you least expect it and stink up the place. Not to mention they will attack you when you least expect it. Whereas if you have a place for your globals, it's like a litter box, a place to contain the stink. OK, I use colorful metaphors sometimes, but it's the way I am.
One thing I will say that is important here is simply this: It's a poor tool kit that doesn't have very many tools in it. Globals are just one way to track things. Tempvars are another. And the problem with having too few tools in the kit? If all you have is a hammer, everything you've got gets nailed.