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. No comment

No comment

Scheduled Pinned Locked Moved The Lounge
businesscollaboration
77 Posts 58 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.
  • R Rob Philpott

    Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

    Regards, Rob Philpott.

    C Offline
    C Offline
    Chris Meech
    wrote on last edited by
    #26

    It's interesting how this 'battle' has been going on now for quite some time as most languages support some form of commenting. It suggests to me that comments are like most other language constructs. That is they are necessary sometimes, but not always required. For me, as long as the code is reviewed and deemed as correct and maintainable, then whether it has comments or flashing lights, doesn't seem too important. :)

    Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

    1 Reply Last reply
    0
    • R Rob Philpott

      Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

      Regards, Rob Philpott.

      N Offline
      N Offline
      Nemanja Trifunovic
      wrote on last edited by
      #27

      Point them to the other extreme: Literate Programming.[^]

      utf8-cpp

      R 1 Reply Last reply
      0
      • N Nemanja Trifunovic

        Point them to the other extreme: Literate Programming.[^]

        utf8-cpp

        R Offline
        R Offline
        Rob Philpott
        wrote on last edited by
        #28

        Yes, I have a book which details a project in literate programming. I find it a bit confusing...

        Regards, Rob Philpott.

        1 Reply Last reply
        0
        • R Rob Philpott

          Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

          Regards, Rob Philpott.

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #29

          Rob Philpott wrote:

          comments in code are not allowed

          That's just plain silly.  :sigh: /ravi

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

          1 Reply Last reply
          0
          • R Roger Wright

            I would be very agile if I were you - agile enough to get out of the way of the train wreck about to happen. Undocumented code is unmaintainable code, and it will someday return to bite you in the arse. One of my first assignments in the post-college working world was to port old applications from obsolete minicomputers to new ones. Constructs like DATA 1,123.4521,42Q,.003241563, -.01000342701, .0000128546 READ A, B, C CALL 201(A,B,C) READ X, Y, Z I= 9.8 + X J= 9.8 + Y K= 9.8 + Z CALL 142(I,J,K) were all too common. In fact, something very like this led me to my first professional faux pas. I bitched about the awful code to my department head at great length, describing in detail the obvious deficiencies of the idiot who wrote the original program, including the likelihood that he met only one of his parents, if that many. He read the printout, agreed with me, hung his head low and admitted that he'd written it ten years before. :doh: I realize that modern languages are much more readable, and OOP techniques, structured programming, et al result in better organization, but one can't safely assume that the poor sap who one day might be expected to use or modify today's code will be familiar with the language or the framework on which it is based. Such an assumption is folly, and an invitation to failure. Well constructed comments that clearly describe the programmer's intent and assumptions are part of the product; neglecting them is sufficient cause for giving the programmer an opportunity to seek a new career path.

            "A Journey of a Thousand Rest Stops Begins with a Single Movement"

            T Offline
            T Offline
            Tim Deveaux
            wrote on last edited by
            #30

            // introduce the point with a mixture of metaphor and // colloquialism, seeking to avoid the pedantic. I would be very agile if I were you - agile enough to get out of the way of the train wreck about to happen. Undocumented code is unmaintainable code, and it will someday return to bite you in the arse. // cite example One of my first assignments in the post-college working world was to port old applications from obsolete minicomputers to new ones. Constructs like DATA 1,123.4521,42Q,.003241563, -.01000342701, .0000128546 READ A, B, C CALL 201(A,B,C READ X, Y, Z I= 9.8 + X J= 9.8 + Y K= 9.8 + Z CALL 142(I,J,K) // supporting the point with a segue into relevant anecdote were all too common. In fact, something very like this led me to my first professional faux pas. I bitched about the awful code to my department head at great length, describing in detail the obvious deficiencies of the idiot who wrote the original program, including the likelihood that he met only one of his parents, if that many. He read the printout, agreed with me, hung his head low and admitted that he'd written it ten years before. :doh: // recognize and rebut the alternate view I realize that modern languages are much more readable, and OOP techniques, structured programming, et al result in better organization, but one can't safely assume that the poor sap who one day might be expected to use or modify today's code will be familiar with the language or the framework on which it is based. Such an assumption is folly, and an invitation to failure. // and suggest alternate routes for those in disagreement. Well constructed comments that clearly describe the programmer's intent and assumptions are part of the product; neglecting them is sufficient cause for giving the programmer an opportunity to seek a new career path.

            FTFY :)

            R 1 Reply Last reply
            0
            • R Rob Philpott

              Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

              Regards, Rob Philpott.

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #31

              Sounds good to me :) (probably just because that is what I do)

              xacc.ide
              IronScheme - 1.0 RC 1 - out now!
              ((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition

              1 Reply Last reply
              0
              • R Rob Philpott

                Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

                Regards, Rob Philpott.

                A Offline
                A Offline
                Abhi Lahare
                wrote on last edited by
                #32

                I am uncomfortable of doing things without any reason. In the past like I was being told to have a specific style of commenting for generating some documents from code, and we are only 4 people in dev team at same location, who needs style for this. Micromanagement of coding habits by an non-programmer is always harmful to programmer. that's what I think.

                R 1 Reply Last reply
                0
                • R Rob Philpott

                  Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

                  Regards, Rob Philpott.

                  C Offline
                  C Offline
                  Christopher Duncan
                  wrote on last edited by
                  #33

                  Makes perfect sense to me, given that the agile methodology is all about being nimble enough to avoid accountability. :)

                  Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services

                  1 Reply Last reply
                  0
                  • I Ian Shlasko

                    Yes, comments are good... But do you really think you can avoid stupidity and ignorance in the business world?

                    Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

                    R Offline
                    R Offline
                    Rob Graham
                    wrote on last edited by
                    #34

                    The business world is absolutely dependent on stupidity and ignorance (hopefully your competitors and customers, but hey, whatever works).

                    1 Reply Last reply
                    0
                    • R Rob Philpott

                      Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

                      Regards, Rob Philpott.

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #35

                      Rob Philpott wrote:

                      I'd be interested to hear what people's opionions on this are.

                      How the f*** do you document a complicated algorithm or architecture? There's a lot of information lost when coding, the first thing is the decisions made that lead up to the current implementation. And what better place to put most of that but in code comments??? Idiots. Marc

                      Will work for food. Interacx

                      I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner

                      1 Reply Last reply
                      0
                      • A Abhi Lahare

                        I am uncomfortable of doing things without any reason. In the past like I was being told to have a specific style of commenting for generating some documents from code, and we are only 4 people in dev team at same location, who needs style for this. Micromanagement of coding habits by an non-programmer is always harmful to programmer. that's what I think.

                        R Offline
                        R Offline
                        Rob Graham
                        wrote on last edited by
                        #36

                        Abhi Lahare wrote:

                        Micromanagement of coding habits by an non-programmer is always harmful to programmer.

                        FTFY

                        D 1 Reply Last reply
                        0
                        • R Rob Philpott

                          I don't think they're allowed either, which is fine by me as I HATE them. First thing I always do is CTRL+M+P to expand them away, you know so I can see the code.

                          Regards, Rob Philpott.

                          0 Offline
                          0 Offline
                          0x3c0
                          wrote on last edited by
                          #37

                          You're right, but it was just a suggestion. Here's another: what about writing the comments to the console, or creating a local string variable which contains the comments for that function?

                          OSDev :)

                          1 Reply Last reply
                          0
                          • R Rob Graham

                            Abhi Lahare wrote:

                            Micromanagement of coding habits by an non-programmer is always harmful to programmer.

                            FTFY

                            D Offline
                            D Offline
                            Dan Neely
                            wrote on last edited by
                            #38

                            Disagree. When you have to deal with an idiot you micromanaging is the only way to contain the damage they can do.

                            3x12=36 2x12=24 1x12=12 0x12=18

                            1 Reply Last reply
                            0
                            • T Tim Deveaux

                              // introduce the point with a mixture of metaphor and // colloquialism, seeking to avoid the pedantic. I would be very agile if I were you - agile enough to get out of the way of the train wreck about to happen. Undocumented code is unmaintainable code, and it will someday return to bite you in the arse. // cite example One of my first assignments in the post-college working world was to port old applications from obsolete minicomputers to new ones. Constructs like DATA 1,123.4521,42Q,.003241563, -.01000342701, .0000128546 READ A, B, C CALL 201(A,B,C READ X, Y, Z I= 9.8 + X J= 9.8 + Y K= 9.8 + Z CALL 142(I,J,K) // supporting the point with a segue into relevant anecdote were all too common. In fact, something very like this led me to my first professional faux pas. I bitched about the awful code to my department head at great length, describing in detail the obvious deficiencies of the idiot who wrote the original program, including the likelihood that he met only one of his parents, if that many. He read the printout, agreed with me, hung his head low and admitted that he'd written it ten years before. :doh: // recognize and rebut the alternate view I realize that modern languages are much more readable, and OOP techniques, structured programming, et al result in better organization, but one can't safely assume that the poor sap who one day might be expected to use or modify today's code will be familiar with the language or the framework on which it is based. Such an assumption is folly, and an invitation to failure. // and suggest alternate routes for those in disagreement. Well constructed comments that clearly describe the programmer's intent and assumptions are part of the product; neglecting them is sufficient cause for giving the programmer an opportunity to seek a new career path.

                              FTFY :)

                              R Offline
                              R Offline
                              Roger Wright
                              wrote on last edited by
                              #39

                              Thanks, Tim! :-D It's much more readable now. ;)

                              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                              1 Reply Last reply
                              0
                              • I Ian Shlasko

                                Yes, comments are good... But do you really think you can avoid stupidity and ignorance in the business world?

                                Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

                                R Offline
                                R Offline
                                realJSOP
                                wrote on last edited by
                                #40

                                Ian Shlasko wrote:

                                But do you really think you can avoid stupidity and ignorance in the business world?

                                That question is outside the scope of the original message. We're talking about development practices, not business models.

                                .45 ACP - because shooting twice is just silly
                                -----
                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                P 1 Reply Last reply
                                0
                                • I Ian Shlasko

                                  Geeky Proof that Agile is Bad, from a former Warcraft Addict: * The "Agile" process is all about... Wait for it... Agility! * Agility is a stat favored by rogues and hunters. * Therefore, "Agile" development is for woodsmen and brigands, which shouldn't be allowed anywhere near code.

                                  Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

                                  S Offline
                                  S Offline
                                  Steve Westbrook
                                  wrote on last edited by
                                  #41

                                  The reason it has to be "Agile" is that it can't take a hit.

                                  1 Reply Last reply
                                  0
                                  • R Rob Philpott

                                    Where I work presently, we are 'agile' if you will. Very disciplined agile. One rule the team has is that comments in code are not allowed (no, really). Code should be self describing, and if you need to comment something, you're better taking it and putting in its own method with a meaningful name. I'd be interested to hear what people's opionions on this are.

                                    Regards, Rob Philpott.

                                    I Offline
                                    I Offline
                                    i j russell
                                    wrote on last edited by
                                    #42

                                    The Agile Manifesto does not say "Thou shalt do no commenting". If you write code using descriptive naming and short methods, there should be less need to comment but there will always be situations where a comment may be appropriate.

                                    1 Reply Last reply
                                    0
                                    • I Ian Shlasko

                                      Yes, comments are good... But do you really think you can avoid stupidity and ignorance in the business world?

                                      Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

                                      P Offline
                                      P Offline
                                      Pierre Leclercq
                                      wrote on last edited by
                                      #43

                                      Ian Shlasko wrote:

                                      Yes, comments are good... But do you really think you can avoid stupidity and ignorance in the business world?

                                      Assuming so much stupidity around, then... can you avoid stupid comments? :) In this case, comments are definitely not needed...

                                      You can't turn lead into gold, unless you've built yourself a nuclear plant.

                                      1 Reply Last reply
                                      0
                                      • R realJSOP

                                        Ian Shlasko wrote:

                                        But do you really think you can avoid stupidity and ignorance in the business world?

                                        That question is outside the scope of the original message. We're talking about development practices, not business models.

                                        .45 ACP - because shooting twice is just silly
                                        -----
                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                        -----
                                        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                        P Offline
                                        P Offline
                                        Pierre Leclercq
                                        wrote on last edited by
                                        #44

                                        John Simmons / outlaw programmer wrote:

                                        That question is outside the scope of the original message. We're talking about development practices, not business models

                                        Nevermind... If stupidity were a resource, it would be the most universal and evenly spread resource... :)

                                        You can't turn lead into gold, unless you've built yourself a nuclear plant.

                                        1 Reply Last reply
                                        0
                                        • W wolfbinary

                                          At a previous job a consultant mentioned and then explained what agile was and then he declared that's what we'd been doing all along. He missed the part about defining what you're doing and then not changing that until sometime later as another cycle. Agile, as I've seen it, mostly keeps documentation of the system from happening and foresight of the product or system from taking place. When customers ask for documentation we didn't have much to say other than to sputter and then commit to making some later. It was never part of the project. Poorly written comments are just as bad as no comments. What the code is doing doesn't necessarily explain the why. Just my opinion though.

                                          P Offline
                                          P Offline
                                          Pierre Leclercq
                                          wrote on last edited by
                                          #45

                                          wolfbinary wrote:

                                          Poorly written comments are just as bad as no comments. What the code is doing doesn't necessarily explain the why. Just my opinion though

                                          Absolutely, and it also depends on the language used. Writing assembly language without comments is just nonsense. On the other hand, in a language like C#, it makes a lot of sense to spend a bit of time writing self explanatory code. Refactoring can help too keeping the code understandable. Writing comments has become one of many ways to help coping with code evolution.

                                          You can't turn lead into gold, unless you've built yourself a nuclear plant.

                                          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