Re: A Colon, in Visual Basic
- From: erewhon@xxxxxxxxxx (J French)
- Date: Thu, 30 Jun 2005 07:16:20 +0000 (UTC)
On Wed, 29 Jun 2005 07:15:17 -0700, "Steve Gerrard"
<mynamehere@xxxxxxxxxxx> wrote:
>
>"J French" <erewhon@xxxxxxxxxx> wrote in message
>news:42c2640a.263681505@xxxxxxxxxxxxxxxxxxxxxxx
>> On Wed, 29 Jun 2005 08:51:41 +0100, "Ross" <Ross.Drew@xxxxxxxxxxxxxx>
>> wrote:
>>
>>
>> I can think of at least 10 programmers who see 'L9' and think - top
>> level loop.
>>
>
>Make that 11 now.
>
>I never noticed that there was a pattern in your L9, L8, ... variables. Like
>Mike, I just thought you were a little soft in the head :)
>
>Thanks for posting the expanation of the style. It does make sense now, even
>though it has that old school "punch card" feel to it.
You might be interested in another convention that came from the same
source.
For Private Subs in a module,
prefix their names with LS (for Local Sub)
eg: LS_CalculateTotalSalesValue( .. )
Ditto for Private Functions eg: Sum = LF_SomeCalc( .. )
For Subs that are 'Global' to a suite of EXEs within one Application,
but are of no meaning to any other type of App
Call GS_GetCustomerData( .. )
For Subs that can potentially be used by any App, but are not really a
'language extension', they are 'Universal Subs'
eg: USArSort( A$() ) ' sort the Array
Personally I regard such things as 'programmer utilities' while such
things as FileExists( Fle$ ) are an extension to the language.
The advantage of taking this approach is that one can get a very good
idea of the type of Sub or Function, also whether or not one needs to
take extra care when tinkering with it.
( BTW I'm not that keen on using the '_' in variable or procedure
names, but I'll do so if it makes the code clearer )
Another concept that you might find interesting is 'Code Combing'
One writes a routine, gets it working, then before moving on too far,
one goes back and keeps re-working the code until all obscurities have
been ironed out.
It actually pays off, because one can often find obscure problems,
also it makes it a heck of a sight easier when one goes back to the
same code six months later.
Also, when one is in 'frantic typing mode' one is just after getting
the result. Reviewing and reworking the code when one has it working
fine is a bit like 'snagging' after building work.
.
- Follow-Ups:
- Re: A Colon, in Visual Basic
- From: Steve Gerrard
- Re: A Colon, in Visual Basic
- From: Ross
- Re: A Colon, in Visual Basic
- References:
- A Colon, in Visual Basic
- From: Ross
- Re: A Colon, in Visual Basic
- From: Ross
- Re: A Colon, in Visual Basic
- From: Mike Williams
- Re: A Colon, in Visual Basic
- From: Ross
- Re: A Colon, in Visual Basic
- From: Mike Williams
- Re: A Colon, in Visual Basic
- From: J French
- Re: A Colon, in Visual Basic
- From: Ross
- Re: A Colon, in Visual Basic
- From: J French
- Re: A Colon, in Visual Basic
- From: Steve Gerrard
- A Colon, in Visual Basic
- Prev by Date: Beginner question
- Next by Date: Re: create multiple Check Boxes at run time
- Previous by thread: Re: A Colon, in Visual Basic
- Next by thread: Re: A Colon, in Visual Basic
- Index(es):
Relevant Pages
|