- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
In a unit test for a code path that is expected to fail, this seems like an acceptable comment?
Admin
To be fair, due to incompleteness there's always a need to fail gracefully on Turning machines and if that fails, then obviously there's a problem. And at some point, all you can due it to report a problem.
Admin
To err is human, to fail is failure.
Admin
At the moment I'm reviewing a control report where the underlying process is known to be robust, but the reporting logic is faulty and would therefore be expected to return false exceptions. The fact that the report hasn't reported failures on a process that hasn't failed is therefore a failure. Obvious innit!
Admin
COBOL Dilettante - your negative logic has me all tied up in NOTs.
Admin
So in this case, a failure to fail is "Worse Than Failure"?
Admin
Somehow, this story is bringing this to mind:
Admin
Sounds like the "gotta work as a team" and "you're fired" sequence from The IT Crowd.
Admin
I suppose the alternative message sent is "Task failed successfully"
Admin
So failure is an option?
Admin
"We never failed to fail, it was the easiest thing to do!"
Admin
It happens. Sometimes you purposely want an API call to fail. Sometimes the call can return a variable length array and by using the API call "incorrectly" it will return an error, but also return the size of array you need (the error might be "array too small").
Other times, it's to test whether something is functioning correctly or not. Supposedly Microsoft discovered during their DirectX development that video card makers were faking the results of a capability check to make it seem like their cards were better. Microsoft caught on and purposely sent an errorneous capability code for something that will never be used (they took a spare LAN card, noted it MAC, generated a GUID from it and then smashed the card). They then sent the video driver that GUID knowing it's fake, and a good driver will return an error, while a faking driver will return "Yes, I support this!". From that test Microsoft could tell if a card was lying and take appropriate measures.