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. Thank the Lord for code comments

Thank the Lord for code comments

Scheduled Pinned Locked Moved The Lounge
24 Posts 15 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.
  • M Offline
    M Offline
    mattiek77
    wrote on last edited by
    #1

    because I never would have figured this out

    'this sets the engine type to singleline.
    engineType.Value = xxxxxxx.EngineEnumType.Singleline

    C C R P L 8 Replies Last reply
    0
    • M mattiek77

      because I never would have figured this out

      'this sets the engine type to singleline.
      engineType.Value = xxxxxxx.EngineEnumType.Singleline

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Yes, the one thing worse that no comments, is comments so bad that you get used to just not reading them.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      1 Reply Last reply
      0
      • M mattiek77

        because I never would have figured this out

        'this sets the engine type to singleline.
        engineType.Value = xxxxxxx.EngineEnumType.Singleline

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        'this sets the engine type to singleline.
        engineType.Value = xxxxxxx.EngineEnumType.Keyfinder

        :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        J P 2 Replies Last reply
        0
        • M mattiek77

          because I never would have figured this out

          'this sets the engine type to singleline.
          engineType.Value = xxxxxxx.EngineEnumType.Singleline

          R Offline
          R Offline
          R Giskard Reventlov
          wrote on last edited by
          #4

          At least you got a comment, however meaningless: most developers seem to think that code is self-commenting.

          me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

          S M 2 Replies Last reply
          0
          • C CPallini

            'this sets the engine type to singleline.
            engineType.Value = xxxxxxx.EngineEnumType.Keyfinder

            :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            J Offline
            J Offline
            JHizzle
            wrote on last edited by
            #5

            or

            'this sets the engine type to singleline.
            engineType.Value = xxxxxxx.EngineEnumType.Multiline

            1 Reply Last reply
            0
            • M mattiek77

              because I never would have figured this out

              'this sets the engine type to singleline.
              engineType.Value = xxxxxxx.EngineEnumType.Singleline

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Check to see if the developer used ndepends. There are measures in there that partially determine the amount of undocumented code per method (where the size of the method is taken into account), and this crap is the usual response rather than actually doing something about the size of the method.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              1 Reply Last reply
              0
              • R R Giskard Reventlov

                At least you got a comment, however meaningless: most developers seem to think that code is self-commenting.

                me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

                S Offline
                S Offline
                Single Step Debugger
                wrote on last edited by
                #7

                Guilty as charged, but at least my code is pretty much self-explaining.

                The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                R 1 Reply Last reply
                0
                • M mattiek77

                  because I never would have figured this out

                  'this sets the engine type to singleline.
                  engineType.Value = xxxxxxx.EngineEnumType.Singleline

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

                  // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                  // after completing the addition, the resultant value will be assigned to the variable.
                  // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                  // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                  // SEE ALSO: -- in both prefix and suffix forms
                  // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                  // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                  // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                  i++;

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

                  D P J L 4 Replies Last reply
                  0
                  • M mattiek77

                    because I never would have figured this out

                    'this sets the engine type to singleline.
                    engineType.Value = xxxxxxx.EngineEnumType.Singleline

                    D Offline
                    D Offline
                    Dave Parker
                    wrote on last edited by
                    #9

                    This sort of thing is why I hate my places policy on warnings-as-errors and comments required on every single class/method or they break the build combined with nearly all the comments being autogenerated using tools like ghostdoc. Personally I'd rather have no comments there at all compared to auto-generated ones.

                    L 1 Reply Last reply
                    0
                    • D Dave Parker

                      This sort of thing is why I hate my places policy on warnings-as-errors and comments required on every single class/method or they break the build combined with nearly all the comments being autogenerated using tools like ghostdoc. Personally I'd rather have no comments there at all compared to auto-generated ones.

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

                      That's why we have selective warn as error :) Here is my list of warnings that are marked as errors: 0067;0105;0108;0109;0114;0162;0168;0169;0219;0414;0429;0472;0642;0649;1717

                      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
                      • L leppie

                        // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                        // after completing the addition, the resultant value will be assigned to the variable.
                        // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                        // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                        // SEE ALSO: -- in both prefix and suffix forms
                        // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                        // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                        // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                        i++;

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

                        D Offline
                        D Offline
                        Dave Parker
                        wrote on last edited by
                        #11

                        lmao

                        1 Reply Last reply
                        0
                        • L leppie

                          // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                          // after completing the addition, the resultant value will be assigned to the variable.
                          // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                          // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                          // SEE ALSO: -- in both prefix and suffix forms
                          // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                          // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                          // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                          i++;

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

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #12

                          // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                          // after completing the addition, the resultant value will be assigned to the variable.
                          // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                          // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                          // SEE ALSO: -- in both prefix and suffix forms
                          // SEE ALSO: this statement is the equivalent of += 1;
                          // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                          // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                          // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                          i++;

                          You weren't very thorough.

                          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                          My blog | My articles | MoXAML PowerToys | Onyx

                          L 1 Reply Last reply
                          0
                          • R R Giskard Reventlov

                            At least you got a comment, however meaningless: most developers seem to think that code is self-commenting.

                            me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

                            M Offline
                            M Offline
                            mattiek77
                            wrote on last edited by
                            #13

                            Good code should be largely self commenting, if variable, method and object names are sensible.

                            1 Reply Last reply
                            0
                            • S Single Step Debugger

                              Guilty as charged, but at least my code is pretty much self-explaining.

                              The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                              R Offline
                              R Offline
                              R Giskard Reventlov
                              wrote on last edited by
                              #14

                              Deyan Georgiev wrote:

                              but at least my code is pretty much self-explaining.

                              No it isn't! (Well, maybe yours is - mine isn't so I always make sure I write something to help whomever comes next).

                              me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

                              A 1 Reply Last reply
                              0
                              • P Pete OHanlon

                                // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                                // after completing the addition, the resultant value will be assigned to the variable.
                                // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                                // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                                // SEE ALSO: -- in both prefix and suffix forms
                                // SEE ALSO: this statement is the equivalent of += 1;
                                // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                                // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                                // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                                i++;

                                You weren't very thorough.

                                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                My blog | My articles | MoXAML PowerToys | Onyx

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

                                // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                                // after completing the addition, the resultant value will be assigned to the variable.
                                // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                                // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                                // SEE ALSO: -- in both prefix and suffix forms
                                // SEE ALSO: this statement is the equivalent of += 1;
                                // SEE ALSO: this statement is also the equivalent of var = var + 1;
                                // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                                // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                                // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                                i++;

                                Neither were you :)

                                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
                                • M mattiek77

                                  because I never would have figured this out

                                  'this sets the engine type to singleline.
                                  engineType.Value = xxxxxxx.EngineEnumType.Singleline

                                  A Offline
                                  A Offline
                                  Amar Chaudhary
                                  wrote on last edited by
                                  #16

                                  Wow "Lord for code comments" working with "VB" :doh: Whats next ;P

                                  It is Good to be Important but! it is more Important to be Good

                                  M 1 Reply Last reply
                                  0
                                  • L leppie

                                    // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                                    // after completing the addition, the resultant value will be assigned to the variable.
                                    // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                                    // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                                    // SEE ALSO: -- in both prefix and suffix forms
                                    // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                                    // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                                    // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                                    i++;

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

                                    J Offline
                                    J Offline
                                    Judah Gabriel Himango
                                    wrote on last edited by
                                    #17

                                    -1, not enough xml

                                    Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
                                    Judah Himango

                                    L 1 Reply Last reply
                                    0
                                    • M mattiek77

                                      because I never would have figured this out

                                      'this sets the engine type to singleline.
                                      engineType.Value = xxxxxxx.EngineEnumType.Singleline

                                      W Offline
                                      W Offline
                                      WiGgLr
                                      wrote on last edited by
                                      #18

                                      I've seen something like this before:

                                      // today I had a chicken sandwich for lunch, mmmm chicken
                                      for (i = 0; i < 10; i++)
                                      ...

                                      1 Reply Last reply
                                      0
                                      • R R Giskard Reventlov

                                        Deyan Georgiev wrote:

                                        but at least my code is pretty much self-explaining.

                                        No it isn't! (Well, maybe yours is - mine isn't so I always make sure I write something to help whomever comes next).

                                        me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

                                        A Offline
                                        A Offline
                                        Alan Beasley
                                        wrote on last edited by
                                        #19

                                        digital man wrote:

                                        I always make sure I write something to help whomever comes next

                                        What like? - "Your in deep $hit, quit now!" :-D

                                        If I could code, I'd be dangerous... My Blog[^]

                                        1 Reply Last reply
                                        0
                                        • L leppie

                                          // prepare for code on next line, this will take the value of a variable of type System.Int32 and add 1 to it
                                          // after completing the addition, the resultant value will be assigned to the variable.
                                          // NOTE: a prefixed ++ indicates the increment will happen before the expression is executed
                                          // NOTE: a suffixed ++ indicates the increment will happen after the expression is executed
                                          // SEE ALSO: -- in both prefix and suffix forms
                                          // REMARK: the value will silently overflow if the variable's value is System.Int32.MaxValue.
                                          // REMARK (cont.): To have an exception throw on overflow, wrap code in checked { ... }.
                                          // ALSO NOTE: If the variable has not been initialized, the result is undefined.
                                          i++;

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

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

                                          Now if I had been drinking something I would have surely spewed it all over my monitor.

                                          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

                                          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