DWUTKA at marlow.com
DWUTKA at marlow.com
Thu Aug 12 09:11:08 CDT 2004
Actually, with a lot of my projects, the naming convention would be the least of anyone's worries.....<grin> Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Wednesday, August 11, 2004 5:07 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Naming Conventions Not to mention the job security it offers, since no one else can figure it out! LOL Charlotte Foust -----Original Message----- From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] Sent: Wednesday, August 11, 2004 2:05 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Naming Conventions LOL. Not trying to impress you with ii. In fact, I only put that in the post cause I knew it would rile you up....hmmmm...mission accomplished! LOL I do use it though. Simply because I'm not coding to impress anyone. I'm coding in a method that I find quick to develop, easy to understand, and simple to maintain. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Colby, John Sent: Wednesday, August 11, 2004 3:00 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Naming Conventions Scott, You are correct, I am not saying that. I have seen some of the things that Drew does and I am VERY impressed with his skill as a programmer. I am not impressed with a variable name of II. There is more to being a good programmer than lines of code per day, or the coolness of your algorithm. JWC -----Original Message----- From: Scott Marcus [mailto:marcus at tsstech.com] Sent: Wednesday, August 11, 2004 3:47 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Naming Conventions John, You are exactly right. Best practices in no way imply that someone's code is worst practice, just not best practice. I think some members of the list take it that if you don't follow best practice, then you stink as a programmer. I don't think you are saying that. Scott Marcus -----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:06 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Naming Conventions >would you really want: Dim lngFieldCollectionCounter As Long No, I'd want lngFldCnt. In my world: lng is an abbreviation for long (everywhere) Fld is an abbreviation for Field (everywhere) Cnt is an abbreviation for Count or counter (everywhere) I DO use EXACTLY that syntax in that situation. I would NEVER use i in that situation. I do NOT switch on and off my use of naming conventions "because it's just a little piece of code". A million line program is nothing more than 100,000 little pieces of code. I wrote code for a small company out in Carlsbad, CA called Puritan-Bennett. They make ventilators. That is life support equipment. They do things differently simply because the FDA (or some such government agency) forces them to. If your code fails someone could die. They do code reviews. Three man teams that look at EVERY line of code. You take notes, which are published. You fix ALL issues found in the code review. You do another code review. You review the code line by line, looking for issues, but also looking for fixes to the issues found last time. You take notes which are published. You fix every issue found in the code review. Repeat until no issues found. They have written guidelines. Things like: No magic numbers (you must use named constants). ALL case statements have an else that logs an error message if you ever get there. Comments! Naming conventions ALL the time. Dimming all variables, always, with explicit data types. Comments! Using exactly the data type needed. NO automatic coercion (no depending on the compiler to get it right). If you want to coerce a variable you do it explicitly. Comments! Etc. and many many more! You do it that way or you find another job. The things they do are not bad, in fact they are very useful. A little extreme sometimes but very useful. You learn good programming practices and you use them. ALWAYS, not just when you feel like it. 10 (no, closer to 15 years) later I still use many of them. I would love to do code reviews but they just aren't possible in the situations I find myself in nowadays. By the way, these things mentioned above (and more) are simply known as best practices and you can find white papers and even books that describe them in detail. I did not make them up, nor did Puritan-Bennett. They exist because companies found that the costs of best practices are far outweighed by the costs of fixing the bugs that lack of best practices allow to exist. You make up some example to justify lazy programming. There is no justifying lazy programming, just admit that you don't feel like doing it (and nobody is forcing you to do it) and get on with life. 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:58 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Naming Conventions Okay JC, if I did this: Dim i as Long Dim rs As Recordset Dim strFieldNames as String ....(Opening Recordset) For i=0 to rs.Fields.Count-1 strFieldNames=strFieldNames & rs.Fields(i).Name & ", " Next i strFieldNames=Left(strFieldNames, Len(strFieldNames)-2) would you really want Dim lngFieldCollectionCounter As Long ????? Give me a break! 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