[AccessD] Naming Conventions

Charlotte Foust cfoust at infostatsystems.com
Mon Aug 9 11:03:05 CDT 2004


May I point out that you previously said these variables represented
longs because you *always* use longs as counters.  Now you're saying
they're "counting integers".  It seems you've demonstrated the problem I
raised quite nicely. <evilgrin>

Charlotte Foust


-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Sunday, August 08, 2004 8:49 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


Ah, but i, j, k, etc. are a naming convention in and of itself.

We don't go:

LongIntegerSomethingOrOther

We go:
lngSomethingOrOther

or 

intSomethingOrOther

Because lng relates to a long integer....int to integer....

so, i, j, k relate to a counting integer.....

What's the fuss?

Now, this whole naming convention thing would be a completely different
story if the entire world programmed the same way.  But they don't.  No
one can agree on the exact same convention, so all this is, is many many
'camps' saying 'my way is better, I better not ever have to read your
code'.....

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Saturday, August 07, 2004 2:07 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions


It's really quite simple the why.  Because we use a naming convention.
We don't "sometimes, when we feel like it, if it's not raining, if the
moon is out, if I'm not pissed at the boss, its just a loop counter for
petes sake" name things by the convention.  We use a naming convention.
Or we don't.  I is not a naming convention.  intI or lngI or bytI or
whatever, yes, that is a naming convention.  Not a great one.  Variables
are supposed to named to tell us what they represent.

For bytWidgetCnt = 1 to 250
Next bytWidgetCnt

THAT is a naming convention.  I can see by the name what the data type
is, and I can see by the name what it counts.

I realize that quick and dirty programming takes place.  I know that
quick and dirty programs end up transforming into critical applications
for companies.  I discovered a long time ago that every time I failed to
use my convention, it made it that much easier to NOT use the convention
the next time.  I learned a long time ago that every time I USED the
convention, it made it that much easier to USE the convention the next
time.

I make no claim to perfection, however I do TRY to use the convention, I
TRY to use it all the time, and I even go back and clean up code where I
didn't. Really!

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
DWUTKA at marlow.com
Sent: Thursday, August 05, 2004 4:41 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


Because:

Dim i As Long
Do until i=100
	i=i+1
loop

Runs faster then 

Dim i as Integer
Do Until i=100
	i=i+1
Loop

Why declare a counter with a prefix?  If you are using an integer, for
'smaller' counts, then whether you are using a prefixed variable or not,
you're still missing the point.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Thursday, August 05, 2004 3:19 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions


But you see, I have to rationalize that in order to guess that you've
used a long.  If the loop only requires an integer up to 100, why use a
long "of course"?  If you declared the variable with a prefix or even a
type declaration character, it wouldn't require anyone else to try and
guess what you were thinking.

Charlotte Foust


-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Thursday, August 05, 2004 11:11 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


Long of course.  Why would you use byte or Integer in a 32 bit
environment? A 32 bit Long Integer will out perform the other two!  In
fact, the only reason to use other numbers, is to confirm with API
calls, when necessary. Other then that, there is no reason to use them.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Thursday, August 05, 2004 1:14 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions


Byte, Integer or Long?  Any of them can be counters.  Counter is a
non-definitive term for a value, and I object to that kind of coding.  

Charlotte Foust


-----Original Message-----
From: Arthur Fuller [mailto:artful at rogers.com] 
Sent: Thursday, August 05, 2004 8:23 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions


Me too, Drew. In my code, anything named i j or k immediately signals
that's all it is, a counter.

A.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
DWUTKA at marlow.com
Sent: Wednesday, August 04, 2004 5:15 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


What's wrong with:

For I=1 to 50

Next I

?

Drew

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list