Coding Conventions from Microsoft

  • Thread starter Thread starter Ralph Lund
  • Start date Start date
R

Ralph Lund

Hi.

I am starting a new project with C#. I am searching for "good" coding
conventions. I know that there are some coding conventions from microsoft,
(but they are very extensive and not clear). In the example programs of
Microsoft they use different coding conventions:
private members sometimes with underscore, sometimes without; when calling
a method sometimes: method(param1, param2) or method ( param1, param2)
(with or without blanks), ...

What should I do. Is there a way to get the internal coding conventions of
Microsoft, if there are some?

Thanks for any comment.
 
Hi,

Create one your self, I'm of the opinion that the best convention is the one
that your group feel confortable with and that is enforce in the entire
project , you could include a document with the project especification
detailing what the conventions are.

Also create UML models for your classes and the interactions among them,
these are of more values than any document you can write.

Hope this help,
 
Uhm. Just how compact? I mean, you've been offered a comprehensive
document explaining alot of information, yet you reject it as too long
or too verbose? I don't understand how you can ask for something that
might end up becoming what amounts to a "corporate standard" for you
without being willing to do some reading, a little research and some
personal extrapolation from the data you have at your disposal.

So essentially what you're asking for is for someone to give you a
complete coding standards styling document in a few sentences? Without
learning the pros and cons of a variety of different stylings on your
own?

Do you need help at the urinel, too?
 
Thank you Ignacio for your hints.

A problem is to use foreign source code, which does not follow "my" coding
conventions, like some source code from Microsoft (or some other company).

I am searching for a template, which I can adapt.

Thanks.
 
Uhm. Just how compact? I mean, you've been offered a comprehensive
document explaining alot of information, yet you reject it as too long
or too verbose?
One document? Are you talking about the same thing as I do? If you are
searching for some convention during coding, you want to search in a single
document and not in a link collection. That's my opinion! I am searching
for something like the Java Coding Conventions - short, simple, one
document. I think the coding conventions (link collection) of Microsoft is
a overkill and not absolutely clear.

I don't understand how you can ask for something that
might end up becoming what amounts to a "corporate standard" for you
without being willing to do some reading, a little research and some
personal extrapolation from the data you have at your disposal.
I have been reading a lot (belonging to this subject). Did I told you that
I haven't? Did I told you that I didn't research. So why do you think so?

So essentially what you're asking for is for someone to give you a
complete coding standards styling document in a few sentences? Without
learning the pros and cons of a variety of different stylings on your
own?
I don't asked for coding standards in a few sentences - I asked for a place
where I can find some. I am searching for a template, which I can adapt. I
think there are pros and cons of every style - I have my own experiences
with coding styles, but I think a good way to create new coding standards
is to adapt an existing document. I know that I have to do this, I asked
for a template, nothing more!

Do you need help at the urinel, too?
This is a really nice comment. I asked a reliable question (in my opinion),
and get such an answer from you? Moderate your twang!

Thanks for your unNICE answer!!!
 
Hi Ralph,

If you use code from other company, or even from your own company that is
external to your project you will have several different convention or even,
no convention at all in several cases :)

Cheers,
 
Back
Top