Page 3 of 6

Re: Naming Conventions

Posted: Thu Jul 29, 2010 3:43 pm
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 ... ;)

Re: Naming Conventions

Posted: Fri Jul 30, 2010 2:47 am
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

Re: Naming Conventions

Posted: Fri Jul 30, 2010 4:07 am
by Rathinagiri
Nice words Danny. Thanks for sharing.

Re: Naming Conventions

Posted: Fri Jul 30, 2010 10:48 am
by melliott42
Danny very well spoken. Thanks for posting.

Re: Naming Conventions

Posted: Fri Jul 30, 2010 11:55 am
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

Re: Naming Conventions

Posted: Fri Jul 30, 2010 1:04 pm
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 :) )

Re: Naming Conventions

Posted: Fri Jul 30, 2010 4:11 pm
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.

Re: Naming Conventions

Posted: Fri Jul 30, 2010 4:17 pm
by sudip
Very good proposal :D

Re: Naming Conventions

Posted: Fri Jul 30, 2010 4:56 pm
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

Re: Naming Conventions

Posted: Sat Jul 31, 2010 3:00 am
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: )