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. One of the better code comments I've come across...

One of the better code comments I've come across...

Scheduled Pinned Locked Moved The Lounge
37 Posts 29 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.
  • P peterchen

    I viewed this post, expecting a genuinely helpful and encouraging comment, a shining gem of what I one day could find in the code I work on, and a brilliant example of commenting I can aspire to reflect in my own code. What I found was the typical "look at that bad comment" that you can get from many outlets. I recommend not to trust the titles of this poster blindly, and verify the contents before making any decision. Might not view again.

    FILETIME to time_t
    | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

    J Offline
    J Offline
    Johnny J
    wrote on last edited by
    #8

    Personally, with the app I'm currently working on, I would be happy if I could find ONE comment to post, good, encouraging, brilliant or otherwise... ;)

    I'm not heavy - I'm KIDNAP RESISTANT...
    -----
    Don't tell my folks I'm a computer programmer - They think I'm a piano player in a cat house...
    -----
    Da mihi sis crustum Etruscum cum omnibus in eo!
    -----
    Everybody is ignorant, only on different subjects - Will Rogers, September 7, 1924

    modified on Tuesday, March 1, 2011 10:01 AM

    1 Reply Last reply
    0
    • N NickPace

      Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

      -NP Never underestimate the creativity of the end-user.

      T Offline
      T Offline
      thatraja
      wrote on last edited by
      #9

      :-D Now I remember this funny article by Chris. Amusing article comments[^]

      thatraja


      **My Tip/Tricks
      My Dad had a Heart Attack on this day so don't...
      **

      OriginalGriffO C 2 Replies Last reply
      0
      • C CPallini

        OK, I was the original author and God is still studying it. :rolleyes:

        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]

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #10

        CPallini wrote:

        OK, I was the original author and God is still studying it.

        That's going to take him some time. (S)He's still trying to work out why on earth an (almost) elderly middle-aged Italian would take up running.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

        C 1 Reply Last reply
        0
        • P peterchen

          Not as discouraging as

          // temp workaround, fix before release! 15.3.2003

          FILETIME to time_t
          | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

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

          peterchen wrote:

          // temp workaround, fix before release! 15.3.2003

          That's in VS2010, under Insert > Rubber Stamps.

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

          1 Reply Last reply
          0
          • N NickPace

            Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

            -NP Never underestimate the creativity of the end-user.

            T Offline
            T Offline
            thatraja
            wrote on last edited by
            #12

            NickPace wrote:

            ENTER AT YOUR OWN RISK

            The Back Room? ;)

            thatraja


            **My Tip/Tricks
            My Dad had a Heart Attack on this day so don't...
            **

            1 Reply Last reply
            0
            • N NickPace

              Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

              -NP Never underestimate the creativity of the end-user.

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

              I've had to port code like that before. A week later a 1000+ line VBA function was 10 or 20 C# methods and free of copy/paste code and gotos. (It wasn't quite as bad as it sounds, since the gotos were only used to flatten indenting instead of something even worse. It's still nothing I'd like to repeat, especially since I became an 'expert' on it and the VBA app lived for some time afterward.)

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

              1 Reply Last reply
              0
              • C CPallini

                OK, I was the original author and God is still studying it. :rolleyes:

                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]

                G Offline
                G Offline
                Gregory Gadow
                wrote on last edited by
                #14

                That's because God is a LISP programmer. The Eternal Flame[^] Hear the song[^]

                1 Reply Last reply
                0
                • T thatraja

                  :-D Now I remember this funny article by Chris. Amusing article comments[^]

                  thatraja


                  **My Tip/Tricks
                  My Dad had a Heart Attack on this day so don't...
                  **

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

                  Thanks! I hadn't seen that... I just love the MS bug "Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords" http://support.microsoft.com/kb/q276304/[^] I think it's the way the minimum password length increased "from 17,145 to 18,770 with the installation of SP1" that gets me... :laugh:

                  Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

                  "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

                  T A 2 Replies Last reply
                  0
                  • P peterchen

                    Not as discouraging as

                    // temp workaround, fix before release! 15.3.2003

                    FILETIME to time_t
                    | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                    D Offline
                    D Offline
                    drummerboy0511
                    wrote on last edited by
                    #16

                    Scary... just a reminder to comment my code well :-D

                    1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      Thanks! I hadn't seen that... I just love the MS bug "Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords" http://support.microsoft.com/kb/q276304/[^] I think it's the way the minimum password length increased "from 17,145 to 18,770 with the installation of SP1" that gets me... :laugh:

                      Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

                      T Offline
                      T Offline
                      thatraja
                      wrote on last edited by
                      #17

                      OriginalGriff wrote:

                      Thanks! I hadn't seen that...

                      You welcome, BTW Also I found this one only on last month while surfing CP. Chris may update this then it will be massive funny collection. :)

                      thatraja


                      **My Tip/Tricks
                      My Dad had a Heart Attack on this day so don't...
                      **

                      1 Reply Last reply
                      0
                      • H Henry Minute

                        CPallini wrote:

                        OK, I was the original author and God is still studying it.

                        That's going to take him some time. (S)He's still trying to work out why on earth an (almost) elderly middle-aged Italian would take up running.

                        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

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

                        Henry Minute wrote:

                        (S)He's still trying to work out why on earth an (almost) elderly middle-aged Italian would take up running.

                        She(He)'s still trying to work out why on earth an (almost) elderly middle-aged Italian would take up running, vainly attempting to beat Henry's record. FFY. :)

                        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
                        • N NickPace

                          Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                          -NP Never underestimate the creativity of the end-user.

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

                          I found this about five years ago in some C++ code: // the code below is less broken than the code // above, but leave it commented out. The funny thing about it was that neither block of code was commented out.

                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                          -----
                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                          -----
                          "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

                          1 Reply Last reply
                          0
                          • N NickPace

                            Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                            -NP Never underestimate the creativity of the end-user.

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

                            If we don't see you again is there anyone you would like us to contact?

                            If you are cross-eyed and have dyslexia, can you read all right? http://www.hq4thmarinescomm.com[^] [My Site]

                            1 Reply Last reply
                            0
                            • P peterchen

                              Not as discouraging as

                              // temp workaround, fix before release! 15.3.2003

                              FILETIME to time_t
                              | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                              R Offline
                              R Offline
                              Ravi Sant
                              wrote on last edited by
                              #21

                              lol :laugh: this is amazing. The programmer who is in current state is bound to freeze on reading this!

                              1 Reply Last reply
                              0
                              • N NickPace

                                Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                                -NP Never underestimate the creativity of the end-user.

                                J Offline
                                J Offline
                                jwb51
                                wrote on last edited by
                                #22

                                Flashback to the movie Twister.... Looks like we're going in! :-D

                                1 Reply Last reply
                                0
                                • N NickPace

                                  Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                                  -NP Never underestimate the creativity of the end-user.

                                  U Offline
                                  U Offline
                                  User 4443121
                                  wrote on last edited by
                                  #23

                                  I found a comment in a legacy app that said "If you get this far, hold onto your pants."

                                  1 Reply Last reply
                                  0
                                  • N NickPace

                                    Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                                    -NP Never underestimate the creativity of the end-user.

                                    K Offline
                                    K Offline
                                    kungFuCrab
                                    wrote on last edited by
                                    #24

                                    //FIRE IN THE HOLE! I just could not believe it.

                                    1 Reply Last reply
                                    0
                                    • N NickPace

                                      Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                                      -NP Never underestimate the creativity of the end-user.

                                      F Offline
                                      F Offline
                                      Fabio Franco
                                      wrote on last edited by
                                      #25

                                      I've stumbled through code that was very well commented, but then further down in a a snippet of code, there it was:

                                      //Only God Knows...

                                      I guess the developer who commented that code, wasn't the one who first wrote it.

                                      1 Reply Last reply
                                      0
                                      • N NickPace

                                        Just came across this comment in another programmer's code: /* This method is a total disaster. It works, but stepping through it is a nightmare. The original * programmer and God are probably the only ones who understand it. ENTER AT YOUR OWN RISK!!! */ Gave me a much needed chuckle this morning. Unfortunately, I now need to enter this method to perform some maintenance. Wish me luck! :-D

                                        -NP Never underestimate the creativity of the end-user.

                                        P Offline
                                        P Offline
                                        patbob
                                        wrote on last edited by
                                        #26

                                        My favorite was the comment on a particularly nasty and spaghettified function ".. abandon hope all ye who enter here". Of course, I'm biased since I'm the one who put it there. :)

                                        patbob

                                        N 1 Reply Last reply
                                        0
                                        • P patbob

                                          My favorite was the comment on a particularly nasty and spaghettified function ".. abandon hope all ye who enter here". Of course, I'm biased since I'm the one who put it there. :)

                                          patbob

                                          N Offline
                                          N Offline
                                          NickPace
                                          wrote on last edited by
                                          #27

                                          That's the exact quote I have on the entrance to my cubicle. :laugh:

                                          -NP Never underestimate the creativity of the end-user.

                                          P 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