| « Prev | Page 1 | Page 2 | Page 3 | Next » |
Re: The Shenanigans Handler
2009-09-30 09:02
•
by
St Mary's Flock of Storks
(unregistered)
|
|
Frist!
And I call shenanigans on this. |
|
The comment is converted at compile time to:
throw new ShenanigansException(); Where's the wtf? |
|
You should be happy that they had the ability to correctly spell "shenanigans". See: Paula Bean and Brillant.
|
|
Is ASP 95% of the programming market or just 500% of the fowled up code market?
|
|
Who are you people and how did you get access to my subversion repository...
|
|
I like this but I think they could improve it by writing to the event log so they can trace exactly when the shenanigans occurred.
|
|
on error resume next
try { ... } catch { (empty block to do nothing) } Interesting implementation of a long standing wtf pattern... |
I think you're guaranteed to be the odd man out if your name is Lucy. |
|
Your fellow developer probably figured that even if he takes care of all possible errors in a very robust way, his code would still run in an Adobe VM, so why bother?
I can't blame him. |
Ah - NOW I understand why it's called subversion ! |
Re: The Shenanigans Handler
2009-09-30 09:27
•
by
Wolfraider
(unregistered)
|
It's because he is related to a boy named Sue |
Re: The Shenanigans Handler
2009-09-30 09:28
•
by
highphilosopher
(unregistered)
|
HA the mudslinging begins!!!!! Down with Cold Fusion!!!!!! |
Re: The Shenanigans Handler
2009-09-30 09:30
•
by
Guybrush Threepwood
(unregistered)
|
|
I just finished a project in Flex, too. And I remember calling shenanigans more than twice.
|
|
Developers like Lucy aggravate me. Shipping is a feature! S/he is TRWTF
|
Re: The Shenanigans Handler
2009-09-30 09:35
•
by
TK
(unregistered)
|
Except that, in this context, "man" can refer to a male or female. |
|
Reminds me a bit of some of my first VB6 code ever:
if Foo = True then '... else if Foo = false then '... else MsgBox "Something's gone horribly wrong!" exit end if And I call shenanigans on having to submit this post 3 times. |
Re: The Shenanigans Handler
2009-09-30 09:40
•
by
OldHand
(unregistered)
|
Or a grammar nazi? (Really annoying that I can't cut&paste the CAPTCHA, I have to type the damn thing) |
Re: The Shenanigans Handler
2009-09-30 09:40
•
by
OutlawProgrammer
(unregistered)
|
|
Hey Farva what's the name of that error handling pattern you like with all the goofy shit on the walls and the mozzarella sticks?
|
Re: The Shenanigans Handler
2009-09-30 09:40
•
by
Crash Magnet
(unregistered)
|
Of course, FILE_NOT_FOUND |
Re: The Shenanigans Handler
2009-09-30 09:40
•
by
Shem Nanigans
(unregistered)
|
Well, you know, your previous attemps got stuck in the shenanigans handler in TDWTF webserver. No hard feelings. |
|
Wow, now that is some quality TDWTF.
I was unprepared for that, and let's just say I needed to grab a kleenex quick. |
|
I suspect "// shenanigans" is a DEVELOPMENT-time error handler.
I have something similar - "// crq" so I can do a quick grep and find where my code is not yet complete. So the real WTF would not be so much the programmer as the one who let non-production-ready code into the production environment (of course, these could easily be the same person). |
|
You don't even need to read that code to tell it's going to be hideous-- Just looking at the brace style is evidence enough.
|
|
You called?
|
|
Ah, a story oozing cynicism, bitterness and sarcasm. It feels as if I wrote it a long time ago and forgot about it...
|
Re: The Shenanigans Handler
2009-09-30 10:00
•
by
VooDoo288
(unregistered)
|
|
You mean Shenanigans???
Does that look like spit to you? |
Re: The Shenanigans Handler
2009-09-30 10:06
•
by
Will
(unregistered)
|
|
I was under the impression that "//FUCKO" was the industry standard?
|
Re: The Shenanigans Handler
2009-09-30 10:07
•
by
NameNotFoundException
(unregistered)
|
Ah! You must be that notorious duct tape guy. |
|
Young children sometimes latch upon a word they think is funny and repeat it over and over, laughing to themselves.
|
Re: The Shenanigans Handler
2009-09-30 10:13
•
by
Carl
(unregistered)
|
Because code like this is such a turn-on? Was it all those cuddly braces or do you just like saying Shenanigans Shenanigans Shenanigans? |
Re: The Shenanigans Handler
2009-09-30 10:17
•
by
Erasmus Darwin
|
That seems quite possible, and it does help mitigate the WTF factor, but there are still two issues beyond the WTF you mentioned about it leaking to production: 1) They could at least have it emit some sort of message in the interim so that the developers are aware that the unwritten error handling code would have kicked in. 2) In the example given, the accountType being neither "private" nor "shared" seems like the sort of thing that might be caused be a development error elsewhere. Otherwise some other developer may wind up going crazy because his commits are silently failing due to a typoed accountType of "pricate". |
It could have been worse; imagine if languages like this used lisp-style enclosures...
|
|
Basically looks like the developer targeted the 95% majority of the cases. The rest, do it later.
I'm not a fan of hugely informative error messages sent to the user. Most of the time the user can't do anything about it - no connections available, disk full, service not ready, etc. Too often, I see error messages returned to the user as the "resolution" to the problem. My preference is just return a boolean true/false to indicate success and design the code accordingly. As opposed to debug messages - more info is better! |
|
Why does everyone have to invent their own brand of C++? This is so like Java and C#, but just not completely. Why, oh why?
|
Re: The Shenanigans Handler
2009-09-30 10:34
•
by
Iain Collins
(unregistered)
|
Specific implementation aside I think incomplete error handling is extremely common and entirely forgivable in some environments (i.e. depending on the type of software your writing, the environment it will be used in, how self contained it is, what the commercial pressures are, etc). However, it's best to to stick to commonly used tags like FIXME, TODO, DELETEME that are widely used and understood (and which some editors/IDE's/bug tracking systems use to automatically generate lists of tasks). The use of custom tags as needed is fine, but making it clear they are tags by the formatting, and documenting them (ideally along with the source in a plain text file) is the way to go. |
Re: The Shenanigans Handler
2009-09-30 10:37
•
by
Schmalls
(unregistered)
|
But our shenanigans are cheeky and fun. |
|
Awesome.
In honor of this post, all new functions I write today will return "shenanigans"; instead of their normal error codes. Course I'll have to go fix em all tomorrow... |
Re: The Shenanigans Handler
2009-09-30 10:43
•
by
Sellars
(unregistered)
|
Either that or a man named Jayne. (/me notices the Whedonites lurking) |
Re: The Shenanigans Handler
2009-09-30 10:52
•
by
@Deprecated
(unregistered)
|
Ummmm... I don't know what you use *your* kleenex for, but I am guessing it would not be used for the next Kimberly-Clark advertising promotion. Actually, looking at their site, maybe they will! http://www.kleenex.com/NA/Default.aspx Slogan: "Kleenex(r) Tissues: It Feels Good to Feel" Featuring the "stop and feel corner" Great, now I'm gonna get fired or something. |
"odd man out" is an idiom, you don't have to change the gender just because the subject isn't male. It should also be noted than one of the definitions of "man" is "A human regardless of sex or age; a person." |
|
I can't believe nobody pointed out the real WTF: a senior developer named Lucy?!? I call shenanigans!
|
Re: The Shenanigans Handler
2009-09-30 10:56
•
by
Captain O'Hagen
(unregistered)
|
*pistol-whips Everett for saying shenanigans* |
|
I can't say I'm that excited about today's submission. All we have here is a method with three unhandled paths of execution and it's pretty clear that the unhandled paths are outside the normal flow of execution anyway (not that it's any excuse). I see this crap every day and I bet most other readers here do too. As far as I can see, this was only featured because of the "shenanigans" comment. Wow, a funny(?) comment.
|
Re: The Shenanigans Handler
2009-09-30 11:13
•
by
SarahE
(unregistered)
|
"Jayne is a girl's name" "Well Jayne ain't a girl. She starts on that 'girl's name' thing, I'm a show her good an' all I got man parts." ... Applicable, considering the other discussion about tissue :D |
Re: The Shenanigans Handler
2009-09-30 11:15
•
by
pitchingchris
|
Its nowhere near 500% in anything derived from the chicken industry.. |
Re: The Shenanigans Handler
2009-09-30 11:16
•
by
foog
(unregistered)
|
|
I learned how unimportant robust error handling was when a "senior developer" corrected code like that by simply removing the unhandled paths of execution!
|
Re: The Shenanigans Handler
2009-09-30 11:29
•
by
John
(unregistered)
|
I still do that. PS Is this "Lucy" hawt? |
Re: The Shenanigans Handler
2009-09-30 11:32
•
by
Zapp Brannigan
(unregistered)
|
You never took Womyn's Studies in college did you? |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |