Coding Standards - We need a hero

C

CMM

Do gurus like Kathleen Dollard frequent these forums? I wonder what she has
to say about "Hungarian Notation" thread above. It seems that with her work
in "Code Generation" she'd be well qualified to offer input.

I think the VB.NET community needs to address this. It's about time! Other
developer communities have settled on standards... why can't the VB
community? We look stupid for not having done so after all this time.

It seems to me that (radical strays notwithstanding... like using p_ to
prefix parameters) there are only two contraversies left remaining.
1) naming locally dim'd variables (either local to a method or class level)
2) naming controls

Everything else is covered well in Microsoft's OM Naming Guidelines.

We can also learn from their MS's Patterns & Practices frameworks VB source
code as well! In MS's Application Blocks they use camelCase for all local
variables (from what I've seen). They also use it for UI controls!... which
I don't exactly like but I see the rationale... they're not properties...
they're really class variables. I personally like to treat them as
properties nowadays.... but this is exactly why we need a good standard!

By developing a standard maybe the VB community will shed a lot of the
stigmatism and the body of our work might be easier to maintain and not be
seen as a thing to be derided. Every time I open a VB project that someone
else wrote, I shouldn't have to hold my breath in anticipation of the
horrors that await or adapt to one persons peculiar coding standard.
 
C

Cor Ligthert [MVP]

CMM,

One of the nice things from Visual Basic is that it gives the user a lot of
free things to do it in the way we self decide it the best. If somebody
does not like that, than languages as C# are probably better tools for them.

Although he is still young can I assure you that in a discussion about this
Herfried likewise Armin have proven always to have very good view on it, for
that we don't need Kathleen. There where it makes sense I follow them.
(Although Kathleen is welcome in a discussion like that).

However keep in mind that not every person is the same and often has
different cultural background.

I am from a culture "Holland" that as soon as a rule is made people starts
to find out how it can be done better without it. Without a rule we do it
probably mostly all the same. Herfried and Armin are from cultures (both
different) from where people often don't understand why we have that
behaviour. (By the way I have never seen written from one of them that
something should be done, only that they did not understand why people did
not do that).

So please let us free and don't give us all kind of policeman who us tell
that all inventions should stop. You know by instance that there are (or
have exist) in the US a lot of (wartime) rules that made them impossible to
create better cars.

Cor
 
C

CMM

My friend I am only trying to help. I do not espouse any one standard. I
only say that there should be *some* sort of standard.

Truth be told I was totally surprised by the "hungarian notation" thread
that I started. I thought EVERYBODY was using modern standards and was
surprised and aghast that "MVP's" were doing stuff like CamelCasing
locals... something not even seen in the old days of VB3 hobbiest
programmers....

And, you know what? If the "norms" in the community was to CamelCase locals,
I'd be doing it too! For this reason: I don't know about you... (and I'm not
tryng to "preach") but I have had to maintain and upgrade (or rewrite) many
large financial Wall Street applications and business objects in my career
(snce the middle of college - 1994/VB3/Windows 3.1). One thing I've learned
is that consistency is KEY.... not just in a company (you might not be there
forever) but in the community as a whole.

VB has developed a very bad rep in many corporate circles (especially now
that they have a VERY GOOD alternative in C#)... and for good reason. Maybe
it should stay an immature, standard-less, language like some people
consider it. But, I don't think so. I don't believe that.
 
C

Cor Ligthert [MVP]

CMM,

As I wrote in the original thread, this is a discussion which started almost
on the first day of the introducion of the symbolic languages about 45 years
ago. After a while people were glad that they could pronounce themselves in
a way as the behaviour of a natural language and others did like languages
more based on mathimetical standards.

Maybe strange is that those which are based on the first named rules exist
both consistently for decenia now and are therefore very consistent in the
way they are written.

From the mathimetical ones from which much are made, don't almost all not
longer exist than 10 years and even less, they die or get a kind of hidden
life. Those strict written programs would in your sample have been a much
harder job to convert.

See this great schema

http://www.levenez.com/lang/history.html#01


Just my thought,

Cor
 
L

Larry Lard

CMM said:
My friend I am only trying to help. I do not espouse any one standard. I
only say that there should be *some* sort of standard.

Truth be told I was totally surprised by the "hungarian notation" thread
that I started. I thought EVERYBODY was using modern standards and was
surprised and aghast that "MVP's" were doing stuff like CamelCasing
locals... something not even seen in the old days of VB3 hobbiest
programmers....

Not seen by you maybe. But one person's experience - however diverse -
always misses something. Anecdote is not the singular of data.
And, you know what? If the "norms" in the community was to CamelCase locals,
I'd be doing it too!

That's PascalCasing; and how do you know what the norms in the
community are or aren't?
 
A

Andrew Morton

CMM said:
Other developer communities have settled on standards... why can't
the VB community?

Yes, standards please, and plenty of them so we can pick and mix the parts
of each we like <g>.

Andrew
 
C

CMM

Oops.. did I say "CamelCasing?".... I meant PascalCasing "locals" was a
shock. See now I'm confused!
 
C

CMM

Larry Lard said:
That's PascalCasing

Yes... I meant to say PascalCasing.
and how do you know what the norms in the
community are or aren't?

Um, judging from samples all over the place and other developers that I've
had the pleasure of working with (I live and work in New York City.... HUGE
developer community!). If anything I still see a lot of VB.Classic notation
(s, i, b, or str, int etc.) but definately not pure PascalCase for locals.
Perhaps the overseas community do things differently.
Not seen by you maybe. But one person's experience - however diverse -
always misses something. Anecdote is not the singular of data.

Man, I've been coding since BASIC on the Commodore 64/128... sorry... but
there's no way you can make me demure on what I have or have not seen. But,
sure... you're right. Anything is possible. I'm sure there's also still
people using $ to dimension a string (Dim A$), which still works in .NET.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top