Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming Style Change 1

Status
Not open for further replies.

PJFry

Technical User
Feb 6, 2005
93
US
I currently us the 'no spaces' style for naming objects, ranges, etc. in both Access and Excel. The group I am working with claims to have a difficult time reading the names and have requested that I move to the underscore style for naming. This would only affect my excel data. Is there code or a function that would allow me to change these? I figure I have about 600 lines that would need to be changed. I could probably bang that out in a few hours, but who want to do that? What is the easiest way to change the styles? An example:

Current: ThisIsHowINameMyObjects
New: This_Is_How_I_Name_My_Objects

Thoughts?

Many thanks in advance,

PJ
 
Good point. I'll post it there now.
 
You might investigate a tool like WinGrep, which can do a search/replace across multiple source files.

But it's still likely to be a fairly painful process.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
I have many thoughts on the concept, but not one of them has anything to do with actually making a single change to the code you wrote. "Camel-case" (the common term for what you describe as "no space") is the more common form of variable naming. Tell the group you are working with to come up from the dark ages of uppercase only programming and learn to do it the modern way.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Gotta believe they're COBOL_PROGRAMMERS who lament the bygone days of the System 370 and baker-tam.
 
There are three possible standard styles in naming objects, ranges, etc: Hungarian (strPartTimeEmployee) , Pascal (PartTimeEmployee), and Camel (partTimeEmployee) in programming. The new style you propose is not among them.

vladk

 
>The new style you propose

The OP isn't proposing it; the group he works with are

 
<three possible standard styles
I believe the style that he's having proposed to him was a standard 30 years ago.
 
Just a cautionary note. If you build classes and use "Implements" in your classes ... the implements keyword creates new properties in your class that have the underscore character. Any existing properties, methods etc., that contain underscores will be misinterpreted as coming from an implemented class. If this is happening (or might happen in future) then you are well advised to stay away from

This_Is_How_I_Name_My_Objects

or similar constructs involving underscore characters.
 
Wow. A lot can happen when you don't log on for a few days!

To try and answer the questions:
These are not programers, just end users. One user commented that is style is 30 years old. True, which is why these folks are looking for this style. The ablity to change is not amoung their strong suits.

At the end of the day, I could go with a 'spaces' naming style and have it be ok, it is just an output after all. I am just being stubborn about holding on to at least somekind of naming convention!

Thanks for all the thoughts.
 
I agree with strongm -- end users should not care what your naming convention is.

Other developers, and possibly managers, yes. But not end-users.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Exactly! Are these users planning to maintain the source code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top