|
That's why you should always surround this type of test code with a safety that requires some sort of deliberate configuration change to trigger. I wish I could have learned this before I managed to release an installer with test diagnostic dialogs embedded in it. While our QA team was never able to reproduce the steps needed to trigger things, the customers sure could.
|
|
|
|
|
rentzk wrote: the customers sure could
They are relatives of Murphy[^].
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
hmmm.... Murphy's in-Laws...
|
|
|
|
|
On the Plus side this was easy for me to fix.
|
|
|
|
|
Shouldn't you be telling this to a priest in a confessional booth?
Steve Wellens
|
|
|
|
|
Perhaps you've hit upon an idea for a new message board 'Coding Confession Box'
|
|
|
|
|
In most cases when see code that can catch an access violation your looking at a coding horror.
Steve
|
|
|
|
|
Actual the code for catching the access violations was pretty good, It logged a snap shot of the callstack to a file, then using witchcraft .map and .code files you could find and fix the problem back at base without having to reproduce the problem.
|
|
|
|
|
I had written some code many years ago (VAX Basic I think) and had asked a student programmer to tidy it up and annotate it. He came back a few hours later and said he was finished. I took a look and he had rearranged all the lines of code in alphabetical order ....
|
|
|
|
|
Ouch!
That sounds worse than dropping a old box of punch cards ...
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Look at the bright side.
Now you have an alphabeticaly ordered list of bugs.
I bug
|
|
|
|
|
If they had line numbers, that might not be so bad.
|
|
|
|
|
If I wanted to mess with my teacher that would be the way to do it...but I personally drew ASCII art with my source to mess with them
|
|
|
|
|
Did he sort it by hand or fed the code to some elegant sorting algorithm he invented
|
|
|
|
|
Are you kidding? He probably didn't know the meaning of the word invented and certainly didn't know what an algorithm was.
|
|
|
|
|
'-?Ibbdddeeeehiillnooooopssttuuuvwwy
oops, sorry, I mean:
I don't beleive you - who would be so stupid?
|
|
|
|
|
Impressive. I'm not sure if he'll make a good computer programmer but he sure as hell would make a good computer.
Steve
|
|
|
|
|
He may be the best bugger of the world
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
<br />
";".ToCharArray()<br />
'nuf said.
|
|
|
|
|
Did I mention that this was an argument to string.Split() which is defined to take (params char[])?
They could have simply typed:
';'
|
|
|
|
|
It would have been a gem if the code was something like this:
"argument1;argument2;argument3".Split(";".ToString());
I have no smart signature yet...
|
|
|
|
|
Derek Viljoen wrote: Did I mention that this was an argument to string.Split() which is defined to take (params char[])?
That was only introduced in .NET 3.5 IIRC.
I have written similar code ages back too.
|
|
|
|
|
Same here - and until today I still would have had I not seen your post and tried using a single char parameter.
Thanks
|
|
|
|
|
|
harold aptroot wrote: No, see here: http://msdn.microsoft.com/en-us/library/b873y76a%28VS.80%29.aspx[^]
Well, I can't say, the f***in page is stuck on C++
PS: IIRC C++ does not support .NET params .
Update:
IE to the rescue. I see it was there (in 2.0), maybe I am thinking of something else...
|
|
|
|