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.
  • 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
                        • J Judah Gabriel Himango

                          -1, not enough xml

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

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

                          I dont like the color ;P

                          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
                          • 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]

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #22

                            or

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

                            C 1 Reply Last reply
                            0
                            • P PIEBALDconsult

                              or

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

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

                              :-D

                              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]

                              1 Reply Last reply
                              0
                              • A Amar Chaudhary

                                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 Offline
                                M Offline
                                mattiek77
                                wrote on last edited by
                                #24

                                Hate VB with a passion, mainly because I find code and comment smell all over it. :((

                                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