Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Inquiring Minds Wanna Know...

Inquiring Minds Wanna Know...

Scheduled Pinned Locked Moved The Lounge
xmlhelpquestion
21 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RaviBeeR RaviBee

    Yes.  I comment every method, property and field regardless of its access level.  However, private members don't make it to customer facing generated documentation. /ravi

    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

    M Offline
    M Offline
    Mark_Wallace
    wrote on last edited by
    #7

    Ravi Bhavnani wrote:

    private members don't make it to customer facing generated documentation

    So you're left with the dilemma: "Should I let my workmates see what I've done, and hope that they'll do as much for me?" Tough decision.

    I wanna be a eunuchs developer! Pass me a bread knife!

    RaviBeeR 1 Reply Last reply
    0
    • K Kevin Marois

      ... do you put XML comments on private members?

      If it's not broken, fix it until it is

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #8

      Yes. We used to have a policy of "no, not needed" but that resulted in a bunch of methods and parameters which were totally, perfectly obvious to the author, and a complete mystery to everyone else. So comments. Always.

      cheers Chris Maunder

      L RaviBeeR 2 Replies Last reply
      0
      • K Kevin Marois

        ... do you put XML comments on private members?

        If it's not broken, fix it until it is

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #9

        Absolutely yes. Though sometimes they start as Ludo and end up as Llandudno...

        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • K Kevin Marois

          ... do you put XML comments on private members?

          If it's not broken, fix it until it is

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #10

          Kevin Marois wrote:

          ... do you put XML comments on private members?

          Only the most outstanding members.

          «There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

          1 Reply Last reply
          0
          • K Kevin Marois

            ... do you put XML comments on private members?

            If it's not broken, fix it until it is

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #11

            Of course. Who is going to read the reference document that is going to be generated from the comments? Right: Future me and those who must do the job after me. Why should I hold back any information that might be useful for understanding what those mysterious private members were intended to do?

            The language is JavaScript. that of Mordor, which I will not utter here
            This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
            "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

            1 Reply Last reply
            0
            • C Chris Maunder

              Yes. We used to have a policy of "no, not needed" but that resulted in a bunch of methods and parameters which were totally, perfectly obvious to the author, and a complete mystery to everyone else. So comments. Always.

              cheers Chris Maunder

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #12

              Exactly. Pretending we are our own customers and need not know how our own classes work internally is just lazyness.

              The language is JavaScript. that of Mordor, which I will not utter here
              This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
              "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

              1 Reply Last reply
              0
              • M Mark_Wallace

                What, tattoo them?

                I wanna be a eunuchs developer! Pass me a bread knife!

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #13

                Some people would not agree to the XML comments I would tattoo on their private members, but that's probably mutual. :-)

                The language is JavaScript. that of Mordor, which I will not utter here
                This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                1 Reply Last reply
                0
                • K Kevin Marois

                  ... do you put XML comments on private members?

                  If it's not broken, fix it until it is

                  P Offline
                  P Offline
                  Phil Martin
                  wrote on last edited by
                  #14

                  Yes, but only if it adds to the why and how it's used. If it is just a backing field to some other property, them almost always no. If it is some super important field necessary to making the simulated annealing work just right, then mostly definitely yes.

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    ... do you put XML comments on private members?

                    If it's not broken, fix it until it is

                    D Offline
                    D Offline
                    den2k88
                    wrote on last edited by
                    #15

                    Why XML comments? Are plain comments too easy to use and read? IMHO documentation must be divided in two parts: usage, which explains what a class do and which public members do what and internals, where private members have their rationales explained. The first kind shouldn't be automatically generated nor bulkily included into the code while the second kind makes very little sense in a document so it should really stay near the code and easily readable when codingz, so the less meta-information the better.

                    GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

                    1 Reply Last reply
                    0
                    • K Kevin Marois

                      ... do you put XML comments on private members?

                      If it's not broken, fix it until it is

                      B Offline
                      B Offline
                      Besinger
                      wrote on last edited by
                      #16

                      I am forced to use Stylecop...nuff said.

                      1 Reply Last reply
                      0
                      • K Kevin Marois

                        ... do you put XML comments on private members?

                        If it's not broken, fix it until it is

                        Mike HankeyM Offline
                        Mike HankeyM Offline
                        Mike Hankey
                        wrote on last edited by
                        #17

                        Liberally

                        New version: WinHeist Version 2.2.2 Beta
                        I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!

                        1 Reply Last reply
                        0
                        • K Kevin Marois

                          ... do you put XML comments on private members?

                          If it's not broken, fix it until it is

                          F Offline
                          F Offline
                          Foothill
                          wrote on last edited by
                          #18

                          I do but only on the functions that have non-obvious arguments and outputs, or could not be described easily in a short function name so they show up in intellisense. I also add comments to large, monolithic functions that I haven't had time to break apart into smaller components.

                          if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016

                          1 Reply Last reply
                          0
                          • M Mark_Wallace

                            Ravi Bhavnani wrote:

                            private members don't make it to customer facing generated documentation

                            So you're left with the dilemma: "Should I let my workmates see what I've done, and hope that they'll do as much for me?" Tough decision.

                            I wanna be a eunuchs developer! Pass me a bread knife!

                            RaviBeeR Offline
                            RaviBeeR Offline
                            RaviBee
                            wrote on last edited by
                            #19

                            At the shop I work at, missing/incomplete comments are caught in code reviews. /ravi

                            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                            M 1 Reply Last reply
                            0
                            • RaviBeeR RaviBee

                              At the shop I work at, missing/incomplete comments are caught in code reviews. /ravi

                              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                              M Offline
                              M Offline
                              Mark_Wallace
                              wrote on last edited by
                              #20

                              I love and hate code reviews. Love because they can bring real improvements, and hate because they mean working on things that are a couple of weeks old, so you've forgotten about them.

                              I wanna be a eunuchs developer! Pass me a bread knife!

                              1 Reply Last reply
                              0
                              • C Chris Maunder

                                Yes. We used to have a policy of "no, not needed" but that resulted in a bunch of methods and parameters which were totally, perfectly obvious to the author, and a complete mystery to everyone else. So comments. Always.

                                cheers Chris Maunder

                                RaviBeeR Offline
                                RaviBeeR Offline
                                RaviBee
                                wrote on last edited by
                                #21

                                Chris Maunder wrote:

                                So comments. Always.

                                :thumbsup: /ravi

                                My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups