[AccessD] Naming Conventions

John W. Colby jwcolby at colbyconsulting.com
Wed Aug 11 17:26:42 CDT 2004


I don't see a naming convention so it would be a bit difficult to follow
that.  As far as the logic, I dare say I have figured out logic that would
make your eyes bug out so no, no problem figuring out your logic.

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: Wednesday, August 11, 2004 4:53 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


Actually JC, i wouldn't be acceptable as a variable InventoryItem object.
Two reasons.  One, i already is set aside for counting integers (longs), and
all objects have at least 2 characters in them.  ii would be an
InventoryItem, but if I had a larger collection class, of InventoryItems,
then I would use iis.

Hopefully you're not spitting blood yet.....though you may be foaming at the
mouth.  Here's an example of one of my Class Initialization events:

Private Sub Class_Initialize()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String
Dim inv As Invoice
Set Invs = New Collection
Set rs = New ADODB.Recordset
DBConnection cnn
strSQL = "SELECT tblShoppingCarts.CartID, InvoiceNumber " & _ "FROM
tblShoppingCarts INNER JOIN tblInvoiceNumbers ON
tblShoppingCarts.CartID=tblInvoiceNumbers.CartID " & _ "WHERE
RecordedInGlovia=False AND Closed=True AND PaymentResponse=1" rs.Open
strSQL, cnn, adOpenKeyset, adLockReadOnly If rs.EOF = False Then
rs.MoveFirst Do Until rs.EOF = True
    Set inv = New Invoice
    inv.CartID = rs.Fields(0).Value
    inv.InvoiceNumber = rs.Fields(1).Value
    Set inv.Connection = cnn
    inv.GetLineItems
    Invs.Add inv
    Set inv = Nothing
    rs.MoveNext
Loop
rs.Close
Set rs = Nothing
cnn.Close
Set cnn = Nothing
End Sub

Now tell me that you would have a real problem following the logic and
naming convention used above.

Drew

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


>Then why has Microsoft CHANGED it's recommended naming conventions..

And you call II for Inventory Item a naming convention?  Why not just call
it I and be done with it.  That's after all a 100% reduction in keystrokes!
If speed of typing the code is all that matters why add the extra I?  It
does nothing for me!

Would you call I for inventory item a naming convention?  I think we need to
redefine the term naming convention in that case.

I call it as I see it which is "in too much of a hurry to bother".  

Further much of Microsoft's argument has nothing to do with strongly typed
so much as the availability of intellisense which is just a STUPID argument.
Now I have to place the cursor over something to see what it is.  STUPID!
STUPID!!  STUPID!!!  The fact that Microsoft is proud of their intellisense
(and rightfully so, it is WONDERFUL) in no way makes it a replacement for a
naming convention.  STUPID!

>In the real world, where you develop different projects with different
teams, in different companies, you're simply not going to always be able to
use the same convention. Therefore you need to be adaptable.

Yea.  I kinda draw the line at II as a naming convention.  

I have indeed worked at many different companies, using many different
conventions.  I must admit I've never seen II accepted as a variable name at
any of them though.  

Actually I take it back, back in the wild and woolly old west days when 'C'
was just getting started, and only real men used it, they did do some of
that kind of stuff.  Thankfully cooler heads prevailed, the Marshals moved
in, Judges were appointed and hanging the rustlers from the nearest tree was
banished.  

Or so I thought.  ;-)

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Haslett, Andrew
Sent: Tuesday, August 10, 2004 10:42 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions


Then why has Microsoft CHANGED it's recommended naming conventions..

They recommend NOT to use prefixes now as its less relevant working in
strongly typed languages such as .Net.  Hungarian is out...
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html
/vaconVBNamingRules.asp)
(http://www.ssw.com.au/SSW/Standards/DeveloperDotNet/DotNetStandard_ObjectNa
ming.aspx)

Your argument about using the same naming conventions 'everywhere' so it us
universally recognised, is therefore mute. Microsoft THEMSELVES have
changed. Times change, technology changes, standards change.

The most important thing about using naming conventions is to actually use
one (as is usually the outcome of this religious argument). As long as its
documented as to WHAT convention you are using within a project, and you
stick to it, then those that follow have a reference.

In the real world, where you develop different projects with different
teams, in different companies, you're simply not going to always be able to
use the same convention. Therefore you need to be adaptable.

A



-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com] 
Sent: Wednesday, 11 August 2004 11:50 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions

Saving your time is nowhere near as relevant as saving the time of the
person coming in after you.  You put in 100 hours or 200 hours and are done.
The maintenance is hundreds or thousands of hours over many many years.  If
the poor schmuk coming in has to spend 100 hours just figuring out what the
heck your naming is before they can even do anything, the company just lost
all the money you saved them and MORE.  That person goes away and the next
person comes in and spends 100 hours figuring out your crazy naming
scheme...  That person goes away...  Hmm.... 

II?  GIVE ME A BREAK!!!

You are not focused on the overall picture, just your convenience and
"getting it out the door".  

I can tell you without a shadow of a doubt that if you went to a Microsoft,
or any other large company and told them "I want to program for you and this
is what I do and why" (giving them this email below) they would politely
show you the door.  

Using the fact that there is no "one standard" to justify doing whatever you
feel like is just silly.

John W. Colby
www.ColbyConsulting.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