Re: Poor VB Programming
From: Randy Birch (rgb_removethis_at_mvps.org)
Date: 09/24/04
- Next message: Michael D. Long: "Re: .ASP, MTS transactions, and stored procedure I/O variables"
- Previous message: Zeng: "Re: replace multiple string constants in text columns for multiple rows"
- In reply to: Stephanie Stowe: "Re: Poor VB Programming"
- Next in thread: Michael D. Long: "Re: Poor VB Programming"
- Reply: Michael D. Long: "Re: Poor VB Programming"
- Reply: J French: "Re: Poor VB Programming"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Sep 2004 20:17:07 -0400
I had a question once from a programmer that couldn't understand why his
results were not as expected. Seems he subscribed not only to the
Use-Hungarian-Notation-At-All-Costs movement, but also had a scope issue ...
he had defined a variable something like Global glob_mod_var_int_i in a bas
module, then used that as the counter in all his for next loops throughout
his app. Needless to say the counters were getting a tad out of whack.
-- Randy Birch MS MVP Visual Basic http://vbnet.mvps.org/ "Stephanie Stowe" <NoSpam@IWishICould.com> wrote in message news:%23F6yr8YoEHA.1152@TK2MSFTNGP11.phx.gbl... : : "AustinMN" <tacooperX@Xatt.net> wrote in message : news:M5q4d.622044$Gx4.68540@bgtnsc04-news.ops.worldnet.att.net... : > Jeff Johnson wrote: : > <snip> : > > ------------------- : > > Subject: JimmyCode of the day : > > : > > As part of a function call: : > > : > > <SomeFunction> <param1>, <param2>, CDate(Now), ... : > > : > > So how the #$^! did you think Now() would be interpreted, huh? Dumbass. : > > -------------------- : > : > Yup, some people just love to program in the worst possible way. : > : : : It reminds me of a guy that I used to work with who told me that he always : declared variables globally because he could not understand scope. : : : This guy was making a living as a programmer. Can't understand scope. Used : to give me the shivers. : : > I had to deal with a SP that was called SP_FundPerfromance. It calculated : > fund performance. Of course, the original programmer could have fixed the : > spelling error right away, but he didn't. Instead, he made sure it was : > called by 20-30 other SP's and a host of VB aplications. Then I got to : > inherit it. : > : > > Of course then there's passing global variables to functions, and some : of : > > the most fragmented code in the world. I mean functions placed in : standard : > > modules that were never called by more than one form and were never : > intended : > > to be. I could go on, but it starts to make my head hurt. : > : > This used to be necessary in VB3, because sometimes form modules would : crash : > if they went over 64K in length. It was standard procedure to have a : module : > to go with every form of any significant size. All you saw was a leftover : > habit. : > : > Austin : > -- : > You programmed with 1s and 0s? We only had 0s! : > There are no X characters in my address : > : :
- Next message: Michael D. Long: "Re: .ASP, MTS transactions, and stored procedure I/O variables"
- Previous message: Zeng: "Re: replace multiple string constants in text columns for multiple rows"
- In reply to: Stephanie Stowe: "Re: Poor VB Programming"
- Next in thread: Michael D. Long: "Re: Poor VB Programming"
- Reply: Michael D. Long: "Re: Poor VB Programming"
- Reply: J French: "Re: Poor VB Programming"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|