Coding Conventions from Microsoft

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralph Lund

    Coding Conventions from Microsoft

    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.
  • caviar

    #2
    Re: Coding Conventions from Microsoft

    > What should I do. Is there a way to get the internal coding[color=blue]
    > conventions of Microsoft, if there are some?[/color]

    I guess read the stuff on this page:


    called:
    .NET Framework General Reference

    Design Guidelines for Class Library Developers
    And draw your own conclussions, what works for you and your team.
    regard hjm


    Comment

    • Ralph Lund

      #3
      Re: Coding Conventions from Microsoft

      On Thu, 18 Sep 2003 09:08:15 +0200, caviar wrote:
      [color=blue][color=green]
      >> What should I do. Is there a way to get the internal coding
      >> conventions of Microsoft, if there are some?[/color]
      >
      > I guess read the stuff on this page:
      > http://msdn.microsoft.com/library/de...guidelines.asp
      >
      > called:
      > .NET Framework General Reference
      >
      > Design Guidelines for Class Library Developers
      > And draw your own conclussions, what works for you and your team.
      > regard hjm[/color]

      Thanks ...

      but I would need a compact form.
      Does anyone have such a document.

      Thanks.

      Comment

      • Ignacio Machin

        #4
        Re: Coding Conventions from Microsoft

        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,

        --
        Ignacio Machin,
        ignacio.machin AT dot.state.fl.us
        Florida Department Of Transportation

        "Ralph Lund" <nomail@nomail. com> wrote in message
        news:m5hitkrpnc 9s$.i79dl9pcp7b f$.dlg@40tude.n et...[color=blue]
        > 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.[/color]


        Comment

        • Chris Hornberger

          #5
          Re: Coding Conventions from Microsoft

          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?

          Ralph Lund <nomail@nomail. com> wrote in message news:<boqxc5hb5 al4.16mjsmwv171 fk$.dlg@40tude. net>...[color=blue]
          >
          > but I would need a compact form.
          > Does anyone have such a document.
          >
          > Thanks.[/color]

          Comment

          • Ralph Lund

            #6
            Re: Coding Conventions from Microsoft


            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.

            Comment

            • Ralph Lund

              #7
              Re: Coding Conventions from Microsoft


              [color=blue]
              > 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?[/color]
              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.

              [color=blue]
              > 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.[/color]
              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?

              [color=blue]
              > 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?[/color]
              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!

              [color=blue]
              > Do you need help at the urinel, too?[/color]
              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!!!

              Comment

              • Ignacio Machin

                #8
                Re: Coding Conventions from Microsoft

                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,

                --
                Ignacio Machin,
                ignacio.machin AT dot.state.fl.us
                Florida Department Of Transportation

                "Ralph Lund" <nomail@nomail. com> wrote in message
                news:1ttlwzeodu d0g$.11x3uaxsk4 qzz$.dlg@40tude .net...[color=blue]
                >
                > 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.[/color]


                Comment

                Working...