[AccessD] Naming Conventions

Hale, Jim Jim.Hale at FleetPride.com
Mon Aug 9 11:30:58 CDT 2004


We should definitely eschew obfuscation! The main reason I using naming
conventions is I hate running across old unreadable code and realizing I was
the idiot who wrote it :-(. On the other hand, the only way I will give up
my x, y and i counters is when they pry them from my cold, dead hands <g>.
These are my last links with days of old when real men programmed in
assembler, Fortran was cutting edge, etc., etc. This recalls a discussion
sometime ago when one of our younger cohorts asked what was wrong with
generating an error to test for a condition in code such as

On Error Resume Next
Set appExcel = GetObject(, "Excel.Application")
Excel_is_running = (Err.Number = 0)

The answer is nothing is wrong but I shuttered nonetheless. I avoid code
like that and I guess it goes back to the FORTRAN days when one itty bitty
error would generate pages of error codes <shutter again>. Hey, we can't
deny our roots.  If you want my rationalization 
a) my loops are short enough that the meaning of the counter is
intrinsically obvious to the casual observer and
b) I find array(x,y) easier to follow and read than
array(somehumongousmultidimensionalname,yetanotherincrediblyingenious name)
in fun,
Jim Hale

-----Original Message-----
From: Colby, John [mailto:JColby at dispec.com]
Sent: Monday, August 09, 2004 10:49 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions


Counters count SOMETHING.  What is it counting?  WHY are you bothering to
count?  

It is exactly that thinking that leads to obfuscation.

JWC

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


Exactly! The names ijk imply throwaway variables not of interest in
themselves -- mere counters. So there's nothing wrong IMO with

Dim i as Long, j as Long, k as Long

For I = 1 to 100
	For j = 1 to 10
		For k = 1 to 35
			DoSomething
		Next
		DoSomethingElse
	Next
	DoSomethingCompletelyDifferent
Next

What's the rumpus? (quoting my fave movie of all time, "Miller's
Crossing")

Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
DWUTKA at marlow.com
Sent: Monday, August 09, 2004 12:49 AM
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

-- 
_______________________________________________
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