With Statement (Bad Practice?) WAS RE: [AccessD] Naming Conventions

Charlotte Foust cfoust at infostatsystems.com
Fri Aug 13 13:42:54 CDT 2004


I believe that is the purpose.  Whether it actually works that way or
not, I'll leave to someone else to wrestle with.  I know that's what Ken
Getz claimed when it was first introduce, and Ken really ought to know. 

Charlotte Foust


-----Original Message-----
From: Jim DeMarco [mailto:Jdemarco at hudsonhealthplan.org] 
Sent: Friday, August 13, 2004 10:32 AM
To: Access Developers discussion and problem solving
Subject: RE: With Statement (Bad Practice?) WAS RE: [AccessD] Naming
Conventions


As I understand it it's a good thing because it does not cause the
object to resolve itself everytime you call a method or property.  To
clarify, when I call oMyObject.Property the reference to oMyObject has
to be confirmed to exist (<> Nothing) with each call.  Using With
eliminates that AFAIK.

Jim DeMarco

-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com]
Sent: Friday, August 13, 2004 2:20 PM
To: accessd at databaseadvisors.com
Subject: With Statement (Bad Practice?) WAS RE: [AccessD] Naming
Conventi ons


Here ya go, a new thread.

Is the With Statement bad practice, because it's entire purpose is to
remove the root object from your code, effectively orphaning chunks of
code?  With the use of the With Statement, you cannot directly tell from
an individual line of code what is being done, and what is doing it.

Drew

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


Drew,

I'm not trying to make this personal, but I think it's time I stop my
part in this "discussion".  I don't remember a "With Statement" thread,
which means it may not have been worth my time to reply or something
outside the list came up that needed my attention. There is no rule
requiring anyone to post a reply, and I sometimes get fed up with
beating my head against a stone wall and abandon the attempt, since it
is obviously non-productive. 

Charlotte Foust


-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Friday, August 13, 2004 9:57 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


I find it odd that you have never recognized the validity of anyone
else's viewpoint either.

When I bring up examples (because I still haven't gotten a reply about
the With Statement), if your side doesn't have a good argument
for/against, I get 'you just 'have' to be right'.

Have I ever said that to you? Other then in this post?

Oh well.

Drew

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


Drew, the reason you prolong these debates is because you can't STAND to
recognize the validity of anyone else's viewpoint.  Nobody said they
couldn't read your code, we said we wouldn't want to have to.

Charlotte Foust


-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Friday, August 13, 2004 9:30 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Naming Conventions


Websters definition of elite (letter d, out of many....)

a group of persons who by virtue of position or education exercise much
power or influence

An elitist is leadership/rule by the elite.

Now, we have a goup of persons, who by virtue of position (experience)
or education/training say that Hungarian is the only way to program.
Anything else is bad practice.  Exercising influence over those new
Listers, who may just be starting out in programming/developing. Setting
such hard rigid rules, is certainly going to influence them one way or
the other.  So if you ask me, the 'elitist' comment is pretty much on
the mark.  

That's why I even bother to get into these debates.  I honestly could
care less if anyone thinks I'm right or wrong.  But I am self taught,
and I learned a lot from forums much like this.  But I had to learn VERY
early, that some of what is out there is rock solid knowledge, and very
practical advice.  Yet some of what is out there is simply tribal
knowledge, with little foundation of actual usefulness.

Paraphrasing current debate:

Hungarians: If you don't use our naming convention, no one will
understand your code.

AnyConventions: We understand either way.

Hungarians:  Gasp, Sputter, ack....well, WE won't understand your code
then.


(Okay, took a little artistic license there! LOL)

So that's why I dig into these debates.  I want to make sure that people
who are still learning the in's and out's are presented with all
options, so they can chose which method best suits THEIR needs.

I can honestly say that I have learned something useful from everyone
who contributes on the list.  JC made a flattering comment about what he
has seen of my code, and believe you me, I think very highly of JC, and
his skills.  No matter how 'rough' we are with each other, I think we
have a pretty good respect for each other. (I know I do).

I have also come away from some of these debates with MY opinion
changed. Like the date table issue, using a table populated with dates
and 'sub info' of those dates.  I honestly never thought of doing that,
and with the information presented, I did my own testing, and definitely
agree that it is by far more efficient!

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Friday, August 13, 2004 11:16 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions


I truly think that is an offensive remark, Andrew.  Most of the
arguments in this list are good-natured, and the posts generally *are*
on topic.  The "elitist" comment, regardless of who it might be aimed
at, is out of line.

Charlotte Foust


-----Original Message-----
From: Haslett, Andrew [mailto:andrew.haslett at ilc.gov.au] 
Sent: Wednesday, August 11, 2004 4:37 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions


>> We're talking about access
LMAO - the majority of posts on this list are off-topic and made by the
same
(elitist) half-dozen people.  Please don't even try that one on me.

Microsoft DO NOT recommend Hungarian anymore.  This is a fact.  Believe
what you want.

-----Original Message-----
From: Charlotte Foust [mailto:cfoust at infostatsystems.com] 
Sent: Thursday, 12 August 2004 2:42 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions

Microsoft has *always* been wishy washy about coming down firmly behind
any particular naming conventions.  Your first link really says nothing
about Hungarian and is typical of weak Microsoft suggestions.  Your
second link isn't Microsoft, it's SSW, and our naming conventions are
just as valid as theirs, thank you!  Naming IS different in VB.Net, but
that's because the language and the objects are different.  We're
talking about Access.  And even in VB.Net, the MS partners we work with
use hungarian for non-object variables.   

Charlotte Foust


-----Original Message-----
From: Haslett, Andrew [mailto:andrew.haslett at ilc.gov.au]
Sent: Tuesday, August 10, 2004 6: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_Obje
ctNa
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 

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


<JC>So what do I use for a counting byte?  Or a counting long?  The
naming convention I use (yes I realize that is I) has three character
prefixes for not only objects but data types as well.  Your point about
"the whole world doesn't program the same way" is of course valid.  But
to program with the convention I use I or J or K is NOT a valid
variable?</JC>

That is exactly my point, that no one programs the same, which includes
'naming conventions'.  Since there is no truly established (and adhered
too) naming convention, anything works, and doesn't work, just as
well/unwell. And, you proved my point, 'to program with the convention I
use', is just like saying 'I like blue, so your red car is the wrong
color'.  LOL.

Because there is no absolute standard, there is no way to program for
those that come after you.  YOU may like the code that you write, but
the next guy may use a different standard then you, and he will probably
gripe just as much about your convention as you do about someone elses.

To really write forward code, I (try to) stick to two rules.  One, stick
with the same naming convention throughout a project.  No matter what
your naming convention is, changing rules in mid stream is far more
agitating then just adjusting for a new convention.  Two, stick to the
same programming logic/style.

Personally, my pet peeve is goofy logic.  I honestly don't care what
someone uses as a naming convention, because I look at the logic the
code is running, rather then look at the names of the variables.  I have
seen some pretty bass ackwards logic in a lot of code.

Not too mention that existing Objects do not adhere to prefixed naming
conventions.  It's Me.Height, not Me.dblHeight.  Why?  Because Height is
a property, it's going to be a number.  When you look at someone's code,
and they refer to Me.Height, do you then go to the help, to find what
data type is used?  No, because quite frankly, data types are irrelevant
until the logic is satisfied.  If the logic works fine, you should
already be familiar with the variables in play.  Then it's only a matter
of looking at the dim statements to verify data types.  So when I create
a Class, I use Properties without prefixes, and I name the classes as to
what they represent, without a prefix.  It's not colForms("MyForm"),
it's Forms("MyForm").  It's not Dim rs AS objADODB.objRecordset, it's
Dim rs AS ADODB.Recordset.  So if I build an Class to represent an
Inventory item, I would use Dim ii AS InventoryItem.

Ack, wha?, spatter, spit, garble. That's right, Dim ii As InventoryItem.
Why? Because I code a LOT.  In VBA, VB, and ASP.  If I were to use:
objCurrentInventoryItem, that is 23 characters, versus TWO! I type
around 80 words a minute, which is 400 characters a minute.  It would
take me a minute to type 17 of those variable names, versus typing ii
200 times!  That saves time......by quite a bit.

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

IMPORTANT - PLEASE READ ******************** 
This email and any files transmitted with it are confidential and may 
contain information protected by law from disclosure. 
If you have received this message in error, please notify the sender 
immediately and delete this email from your system. 
No warranty is given that this email or files, if attached to this 
email, are free from computer viruses or other defects. They 
are provided on the basis the user assumes all responsibility for 
loss, damage or consequence resulting directly or indirectly from 
their use, whether caused by the negligence of the sender or not.
-- 
_______________________________________________
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

IMPORTANT - PLEASE READ ******************** 
This email and any files transmitted with it are confidential and may 
contain information protected by law from disclosure. 
If you have received this message in error, please notify the sender 
immediately and delete this email from your system. 
No warranty is given that this email or files, if attached to this 
email, are free from computer viruses or other defects. They 
are provided on the basis the user assumes all responsibility for 
loss, damage or consequence resulting directly or indirectly from 
their use, whether caused by the negligence of the sender or not.
-- 
_______________________________________________
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


 



************************************************************************
***********
"This electronic message is intended to be for the use only of the named
recipient, and may contain information from Hudson Health Plan (HHP)
that is confidential or privileged.  If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or use of the contents of this message is strictly
prohibited.  If you have received this message in error or are not the
named recipient, please notify us immediately, either by contacting the
sender at the electronic mail address noted above or calling HHP at
(914) 631-1611. If you are not the intended recipient, please do not
forward this email to anyone, and delete and destroy all copies of this
message.  Thank You".
************************************************************************
***********

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