- 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
Lots of best practices to learn from here, including adhering to the contract.
Admin
"What? no, WAIT, we need you, stop, double pay, triple pay, honest ... !"
....
"An error occurred"
Admin
So...
Company hires developer lacking knowledge of best practices. Company hires contractor to assist developer, to save money. Company fires contractor to save money, with virtually no notice, regardless of how it impacts the project. Project blows up because of harmful but innocent mistake due to less-than-best-practices being followed. Contractor leaves when pay stops, regardless of emergency-du-jour. Company pays ten times what they saved by firing contractors in a) lost productivity, b) hiring them back at increased rates.
Sadly all too par for the course.
Admin
Reminds me of my favourite WTF implementation from a long, long time ago in a language that is now, fortunately, far, far away.
IF sensibly_named_function_that_may_return_an_error_code < 0 THEN ANSWER -1;
peppered all through our source code. Effectively identical to this WTF.
Admin
Ah yes the Catch... Anonymize...Rethrow pattern, why didn't this make it into the Gang of 4 again?
Admin
Well, at one time, it was the Gang of Five... and then the One Who Shall Not Be Named proposed this pattern.
At least his family could afford the bullet.
Admin
Interesting that there is overt RTTI to decide what new exception to throw rather than a separate catch block for each interesting type, ordered correctly.
Admin
HyperTalk?
Its descendants live on.
Admin
Ian's experience of wishing the best to John and leaving at 5 is one I've shared, though not under quite the same circumstances. Having worked as a contractor, that was actually one of the best "leverage" techniques. There were times that our "host" (or whatever the term is) company would hear us say, "... good luck with that," and in response we'd hear, "Oh, we'll just see about that ...." A few hours later, contracts were extended or over time approved.
Admin
There is of course a sort of fairly quick-ish way to do something about this, but it will be a solid morning's work: that is, to put (at the top of the catch block) a line that logs the exception to the database in its full glory, in every single class that implements this technique. Yeah, sure, that's a large number of edits to do, but muscle-memory coupled with Motorhead on the iPod takes care of that. After this debacle, John is not going to have much stock left to outbid you with.
Admin
... I meant of course "to the log file".
Admin
i can't help but think of that idiotic "verification" program i saw in an earlier story: if problem 1 occurs, says "error". if problem 2 occurs, say "error"...dozens of separate tests, with identical error messages on separate lines! completely missing the entire point of having tests!
Admin
I saw worse :
Admin
That's outrageous! Everyone knows that The Best Enterprise Practice is to chain exceptions, like this:
[IE: I added ", e" to the 2nd line, to chain the exceptions, so that the original exception is not lost.]
.
Admin
Wait... He broke the system at 4:59 and then walked out because his contract had ended.
People like this are why my professional indemnity insurance is expensive!
Admin
No, the other developer broke it all and expected the contractor to help fix it after his contract was up.
Admin
Yes that's right, that's exactly what happened.
Admin
With reading comprehension skills like that, it's a wonder you can spell "indemnity."