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. // This is a comment

// This is a comment

Scheduled Pinned Locked Moved The Lounge
comsysadmintutorialquestion
21 Posts 16 Posters 2 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.
  • T Todd C Wilson

    Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


    Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

    B Offline
    B Offline
    Ben Ashley
    wrote on last edited by
    #5

    Some years ago, after I had been at a new company for just over a week, I was asked to do some maintenance on the core part of their technology. In the guts, was a comment: // *** NOTE: this must be changed before release Suffice to say, this was 3 years after their product had been released.... When it comes to maths and me, the wheel's going but the hamster's dead.

    J 1 Reply Last reply
    0
    • T Todd C Wilson

      Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


      Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

      N Offline
      N Offline
      Navin
      wrote on last edited by
      #6

      Hehee. I my last job (not my current job!) I had the task of maintaining a GUI that interfaced to some FORTRAN :eek: code. Occasionally I'd have to poke into the FORTRAN to see what was goign on. I ran across a comment that said something like: C This is technically screwy! Gave me a lot of confidence in that algorithm. :-O If your nose runs and your feet smell, then you're built upside down.

      1 Reply Last reply
      0
      • T Todd C Wilson

        Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


        Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #7

        // bNewData is weird The worst thing is I'm fairly sure that *I* wrote it


        "Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
        sighist | Agile Programming | doxygen

        C 1 Reply Last reply
        0
        • B Ben Ashley

          Some years ago, after I had been at a new company for just over a week, I was asked to do some maintenance on the core part of their technology. In the guts, was a comment: // *** NOTE: this must be changed before release Suffice to say, this was 3 years after their product had been released.... When it comes to maths and me, the wheel's going but the hamster's dead.

          J Offline
          J Offline
          Jeremy Kimball
          wrote on last edited by
          #8

          I've actually had the situation arise where I was the key developer during a project startup, and inserted numerous comments in the prototype amounting to: // TODO: Replace this with functioning code. // TODO: Insert error checking code for blah blah blah ...and the like. Recently, I was asked to help out in the redesign of said product (It's been live and on the market for over a year now). Every one of those "Fix me" comments I put in were still there. :doh: Jeremy Kimball

          1 Reply Last reply
          0
          • T Todd C Wilson

            Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


            Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

            J Offline
            J Offline
            Jeremy Kimball
            wrote on last edited by
            #9

            Hehehe...better question: Has anyone ever left debugging code in accidentally during a release? I came DAMN close to doing just that. In the course of writing some new features for said application, I had a debugging block in a key function that was in essence my Last Ditch Error Trap: it popped up a message box that said, simply: "WTF?". If it wasn't for a colleague asking me to go over how that function worked, the message box would have made it to the release version. It had slipped by the entire testing staff :) Jeremy Kimball

            M L P 3 Replies Last reply
            0
            • J Jeremy Kimball

              Hehehe...better question: Has anyone ever left debugging code in accidentally during a release? I came DAMN close to doing just that. In the course of writing some new features for said application, I had a debugging block in a key function that was in essence my Last Ditch Error Trap: it popped up a message box that said, simply: "WTF?". If it wasn't for a colleague asking me to go over how that function worked, the message box would have made it to the release version. It had slipped by the entire testing staff :) Jeremy Kimball

              M Offline
              M Offline
              Member 96
              wrote on last edited by
              #10

              Jeremy Kimball wrote: Has anyone ever left debugging code in accidentally during a release? Yes:eek:, and I now religiously only put in debug code within #ifdef _DEBUG #endif even if it's something I'm just checking out for a minute becuase it's so easy to forget or get called away at a critical moment etc.


              Strangers passing in the street By chance two separate glances meet And I am you and what I see is me...

              R 1 Reply Last reply
              0
              • L Lost User

                I'm too nice to do that.... The tigress is here :-D

                P Offline
                P Offline
                peterchen
                wrote on last edited by
                #11

                Trollslayer wrote: that.... what? Share or comment? ;P


                "Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
                sighist | Agile Programming | doxygen

                1 Reply Last reply
                0
                • J Jeremy Kimball

                  Hehehe...better question: Has anyone ever left debugging code in accidentally during a release? I came DAMN close to doing just that. In the course of writing some new features for said application, I had a debugging block in a key function that was in essence my Last Ditch Error Trap: it popped up a message box that said, simply: "WTF?". If it wasn't for a colleague asking me to go over how that function worked, the message box would have made it to the release version. It had slipped by the entire testing staff :) Jeremy Kimball

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

                  >Has anyone ever left debugging code in accidentally during a release? Kind of. I always use _DEBUG. but I did leave the following in a debug version of an app that my testers were using: _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_CHECK_ALWAYS_DF|_CRTDBG_LEAK_CHECK_DF); I spent half a day wondering why the performance of said app was so crap. I removed the above line and it ran like the wind. Before I'd noticed, I'd added timing code and optimized lots of functions, so in the end it was a worthwhile exercise, but even so...


                  The Rob Blog

                  1 Reply Last reply
                  0
                  • T Todd C Wilson

                    Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


                    Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

                    7 Offline
                    7 Offline
                    73Zeppelin
                    wrote on last edited by
                    #13

                    I came across this in a solution engine I was working on... // Check for +'ve definiteness double U11 = m_pHessianMatrix->GetElement(0,0); double U22 = m_pHessianMatrix->M22Determinant(); // Please God, don't ever let this happen.... |^| <-- Praying hands. if ( U11 < 0 || U22 < 0 ) { TRACE ("BFGS update failed.\nHessian is NOT +'ve definite.\n"); AfxMessageBox ("BFGS update failed.\nHessian is NOT +'ve definite."); // Oh God NO!!! // Use steepest descent in this case...'cause we bloody well // have to do something if we get here... p = (*m_pGradientMatrix); p *= -1.0; } John Theal Physicist/Mathematical Programmer Digital Immersion Software Corporation Got CAD? http://www.presenter3d.com[^] http://www.merlin3d.com[^]

                    F 1 Reply Last reply
                    0
                    • A Adam Wimsatt

                      OH... Here is a comment from that same developer that he put into every single case statement (VB): case Else ' This shouldn't occur... ' It might be a good idea to raise an error here -- 1/23/1998 End Select My code isn't buggy. Those are all fleatures.

                      J Offline
                      J Offline
                      Jeremy Falcon
                      wrote on last edited by
                      #14

                      Oh man, that's rich! :laugh: Jeremy Falcon

                      1 Reply Last reply
                      0
                      • T Todd C Wilson

                        Ever run into a comment - or a set of them - that just brings your mental run to a complete and utter halt? The kind where you just go "uh uh uh uh" like a stalled car trying to get out of first gear? Example of a recent one: // cleanup any arguments that need cleanup Anyone else got some they've seen (or written!) that they'd love to share?


                        Todd C. Wilson (meme@nopcode.com) NOPcode.com Visual Face Lift: Skinning for apps Listen! Audio Server: Be the music "Flow with whatever may happen and let your mind be free:  Stay centered by accepting whatever you are doing.  This is the Way." - Chuang-Tzu "Zen in the Martial Arts"

                        R Offline
                        R Offline
                        Russell Robinson
                        wrote on last edited by
                        #15

                        I hope this brings a smile to someone.... /* * To create tool tips for position information. We use tracking tooltips * which we control directly because the standard CToolTipCtrl doesn't seem to * work reliably when the whole window is filled with rectangles that require * tool tips (sometimes they display, but mostly don't). There must be some * magic, undocumented, typically-Microsoft-braindamaged way of getting them to work; * doing it this way is hard work, more code, but it works reliably! */ void WorkingTimeslotCtrl::CreateToolTips(void) { // I really hate Microsoft if (hPositionTip != NULL) { ::DestroyWindow(hPositionTip); hPositionTip = NULL; } // Microsoft is just so bad INITCOMMONCONTROLSEX icex; // Load the tooltips class from the DLL. icex.dwSize = sizeof(icex); icex.dwICC = ICC_BAR_CLASSES; // I really must sell my shares in Microsoft if(!InitCommonControlsEx(&icex)) ..... (Author not disclosed). Russell Robinson (russellr@rootsoftware.com) Author of TTMaker (Advanced Timetabling Software) http://www.rootsoftware.com

                        1 Reply Last reply
                        0
                        • M Member 96

                          Jeremy Kimball wrote: Has anyone ever left debugging code in accidentally during a release? Yes:eek:, and I now religiously only put in debug code within #ifdef _DEBUG #endif even if it's something I'm just checking out for a minute becuase it's so easy to forget or get called away at a critical moment etc.


                          Strangers passing in the street By chance two separate glances meet And I am you and what I see is me...

                          R Offline
                          R Offline
                          Rutger Ellen
                          wrote on last edited by
                          #16

                          John Cardinal wrote: Yes, and I now religiously only put in debug code within #ifdef _DEBUG #endif unfortunately I've fixed a project where the customer was running on a debug build for about 1 1/2 years, after checking all the ifdefs I build a release version (I missed one it caused the weight to be multiplied by 10) and gave it to the customer he was quite impressed by the speed gain :cool:

                          D 1 Reply Last reply
                          0
                          • 7 73Zeppelin

                            I came across this in a solution engine I was working on... // Check for +'ve definiteness double U11 = m_pHessianMatrix->GetElement(0,0); double U22 = m_pHessianMatrix->M22Determinant(); // Please God, don't ever let this happen.... |^| <-- Praying hands. if ( U11 < 0 || U22 < 0 ) { TRACE ("BFGS update failed.\nHessian is NOT +'ve definite.\n"); AfxMessageBox ("BFGS update failed.\nHessian is NOT +'ve definite."); // Oh God NO!!! // Use steepest descent in this case...'cause we bloody well // have to do something if we get here... p = (*m_pGradientMatrix); p *= -1.0; } John Theal Physicist/Mathematical Programmer Digital Immersion Software Corporation Got CAD? http://www.presenter3d.com[^] http://www.merlin3d.com[^]

                            F Offline
                            F Offline
                            Francois Gasnier
                            wrote on last edited by
                            #17

                            The link www.merlin3d.com in your signature seems not work whereas www.presenter3d.com works perfectly.

                            7 1 Reply Last reply
                            0
                            • R Rutger Ellen

                              John Cardinal wrote: Yes, and I now religiously only put in debug code within #ifdef _DEBUG #endif unfortunately I've fixed a project where the customer was running on a debug build for about 1 1/2 years, after checking all the ifdefs I build a release version (I missed one it caused the weight to be multiplied by 10) and gave it to the customer he was quite impressed by the speed gain :cool:

                              D Offline
                              D Offline
                              David Wulff
                              wrote on last edited by
                              #18

                              :laugh:


                              David Wulff The Royal Woofle Museum

                              "I live very much in the real world, it's just not the same world shared by most other people"

                              1 Reply Last reply
                              0
                              • J Jeremy Kimball

                                Hehehe...better question: Has anyone ever left debugging code in accidentally during a release? I came DAMN close to doing just that. In the course of writing some new features for said application, I had a debugging block in a key function that was in essence my Last Ditch Error Trap: it popped up a message box that said, simply: "WTF?". If it wasn't for a colleague asking me to go over how that function worked, the message box would have made it to the release version. It had slipped by the entire testing staff :) Jeremy Kimball

                                P Offline
                                P Offline
                                ProffK
                                wrote on last edited by
                                #19

                                Yes, but nothing descriptive: Error x, Stop Statement encountered. The difference between a pessimist and an optimist is that while the pessimist is always a victim, the optimist is always a target. - Brady Kelly

                                1 Reply Last reply
                                0
                                • P peterchen

                                  // bNewData is weird The worst thing is I'm fairly sure that *I* wrote it


                                  "Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
                                  sighist | Agile Programming | doxygen

                                  C Offline
                                  C Offline
                                  ColinDavies
                                  wrote on last edited by
                                  #20

                                  Awesome. !! Regardz Colin J Davies

                                  *** WARNING *
                                  This could be addictive
                                  **The minion's version of "Catch :bob: "

                                  It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox

                                  1 Reply Last reply
                                  0
                                  • F Francois Gasnier

                                    The link www.merlin3d.com in your signature seems not work whereas www.presenter3d.com works perfectly.

                                    7 Offline
                                    7 Offline
                                    73Zeppelin
                                    wrote on last edited by
                                    #21

                                    Ah. Thanks. That's an old website and no longer in use. Seems I forgot to update my preferences here.... John Theal Physicist/Mathematical Programmer Digital Immersion Software Corporation Got CAD? http://www.presenter3d.com[^] http://www.merlin3d.com[^]

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


                                    • Login

                                    • Don't have an account? Register

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