// This is a comment
-
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"
-
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"
I'm too nice to do that.... The tigress is here :-D
-
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"
I took over the maintence for a vb app a few years back. When you exited out of the app it gave the error: "Error: Application Exit." What is the point? I can't even see the point of that error while debugging. I thought, ok maybe it was initiated from a child process or something... Nope, it was in the Click() of the exit button (it's been a while since I've done VB, but I think you all get the point of where this was initiated from). Users had been complaining about that error for 2 years to the previous developer, but he said it was due to his "advanced error handling" (those were his exact words)... I comment out that one line and Poof.. problem solved. My code isn't buggy. Those are all fleatures.
-
I took over the maintence for a vb app a few years back. When you exited out of the app it gave the error: "Error: Application Exit." What is the point? I can't even see the point of that error while debugging. I thought, ok maybe it was initiated from a child process or something... Nope, it was in the Click() of the exit button (it's been a while since I've done VB, but I think you all get the point of where this was initiated from). Users had been complaining about that error for 2 years to the previous developer, but he said it was due to his "advanced error handling" (those were his exact words)... I comment out that one line and Poof.. problem solved. My code isn't buggy. Those are all fleatures.
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. -
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"
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.
-
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"
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.
-
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"
-
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.
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 -
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"
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
-
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
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...
-
I'm too nice to do that.... The tigress is here :-D
-
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
>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...
-
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"
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[^] -
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.Oh man, that's rich! :laugh: Jeremy Falcon
-
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"
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 -
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...
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:
-
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[^]The link www.merlin3d.com in your signature seems not work whereas www.presenter3d.com works perfectly.
-
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:
: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"
-
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
-
// 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 | doxygenAwesome. !! 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