Naming Conventions

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Naming Conventions

Post by sudip »

Hello,

Are you talking about LESZYNSKI (Hungarian) Naming Convention?

I followed this naming convension (somehow strictly!) before I saw Rathi's code!!! :lol: (Effect of Microsoft VFP :mrgreen: )

Yes, after seeing his code, I thought it is better for me to concentrate on my program and logic than naming convension.
Shakespeare wrote:"What's in a name? That which we call a rose
By any other name would smell as sweet."
But, now Rathi changed his coding style ... ;) :lol:

Hmm ... what to do ... :?

Ok, I was joking :lol: this naming convension is good ... but needs more typing ... ;)
With best regards,
Sudip
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Naming Conventions

Post by dhaine_adp »

Hi everyone,

Naming conventions is a by product of innovation regarding code sharing in multi-developers environment. If you're an analysts and have another programmer(s) as contractor to develop the source codes or if you are an in-house developer working with a team of programmers adhering to code convention most especially the variables would save the day if you're going to debug or modify the source code.

It is also much easier to share the code with a few comments because the code itself is self-documenting. Likewise variable scoping convention is taken into account including those parameters that is being passed to a function. And by convention you end up writing an elegant code which is easy to read, debug and maintained. Thus it follows that within the system you could easily visualized the program flow.

Depending on your role in the organization or in a team the division of work can be easily distributed. So now everything can be quantifiable and feed into Ghannt Chart, PERT/CPM what ever your choice. Reporting to management who are dumb in programming is easier.

Regards,

Danny
Regards,

Danny
Manila, Philippines
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Naming Conventions

Post by Rathinagiri »

Nice words Danny. Thanks for sharing.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: Naming Conventions

Post by melliott42 »

Danny very well spoken. Thanks for posting.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

Hi all
sudip wrote:Are you talking about LESZYNSKI (Hungarian) Naming Convention?
Does Hungarian Notation is only prefixing variable names?

Or Naming Convention is about only variable?

Please express your opinions like Danny; and as far as possible detailed. So this discussions will be valuable documentation in the future. :D

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Naming Conventions

Post by sudip »

esgici wrote:...
Does Hungarian Notation is only prefixing variable names?

Or Naming Convention is about only variable?

Please express your opinions like Danny; and as far as possible detailed. So this discussions will be valuable documentation in the future. :D
...
Hello Esgici,

Please check the following url http://en.wikipedia.org/wiki/Leszynski_ ... convention

Scope of this naming convension is mainly for objects and database fields.

IMHO, if anyone is following his own convension he should follow this through out a project. Eg., I prefer to use txtXXXX as text box, I should not change it to tbxXXXX suddenly WITHIN A PROJECT. I may change it, but the naming convension must be uniform through out a project.

So whether one calls a window as frmXXX or winXXX will depend upon him.

For naming variables I prefer to use mXXX for private and lXXX for local variables. For arrays I am using aXXX.

Microsoft is playing a big role in this naming convension ;) Even I have it's influence ... frmXXX, txtXXX, cmdXXX etc. :lol: We can also call winXXX, tbxXXX, btnXXX etc.

This naming convension has it's pros and cons (please refer the wiki site). But they didn't refer one big problem ... it requires more typing ;) :lol: This is a serious problem especially if you are working on a laptop.

Sometimes it reminds me Binomial Nomenclature http://en.wikipedia.org/wiki/Binomial_nomenclature, we read in our school days. Yes, all Homo Sapiences, I like it :)

(Please note that I am a student of software development. So, please correct me if I said anything wrong :) )
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Naming Conventions

Post by Rathinagiri »

IMHO, we can create a simple and effective naming convention for HMG related variables.

This would help all the HMG developers to understand the codings of others.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Naming Conventions

Post by sudip »

Very good proposal :D
With best regards,
Sudip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

Hi all

As far as I know "Naming Convention" is a part of another subject : "Coding Convention" and this is also a sub heading of "Coding Standards" and finally "Coding (programming) styles".

I know (please look with favor on my age) two principal style of coding : cowboy and citizen style.

I like cowboys, because:

- they are individual, enough to they self; no need being together anyone
- they don't know nor obey to any rule, if necessary, poses rules they self
- they are courageous, never afraid of mistake or forget anything
- they haven't any worry on "how works" a tool they made, important is "what" that tool make

I like citizens too, because:

- they are social, couldn't live alone
- they are always obey to rules; discuss and works for change rules when necessary, but always obey existing rules; this make their society worth to live
- they are careful against danger, such as mistake and forget
- they concern on "how works" tools, as far as "what" that tool make; so attach importance to being "understandable" tools they made and tools they will analysis

to be continued ... ( if enjoyed )

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Naming Conventions

Post by sudip »

:lol: :lol: :lol:
Great :D
Esgici, please continue :D

Only one question brother - as "Most" of the programmers are human beings, they like to follow 0.25, 0.50, 0.60 etc., instead of strictly 1 and 0 ;) So, is there any common path between the 2 ways of coding?

(Sometimes an enjoyable discussion or chat or in our local language "Adda", doesn't continue without small inputs from the other participants also .... ;) So, it's just my 2 cents :lol: )
With best regards,
Sudip
Post Reply