• monkeyPushButton (unregistered) in reply to SarahE
    SarahE:
    Sellars:
    Wolfraider:
    ThePants999:
    it does leave me as the odd man out
    I think you're guaranteed to be the odd man out if your name is Lucy.
    It's because he is related to a boy named Sue
    Either that or a man named Jayne.

    (/me notices the Whedonites lurking)

    "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

    "He robbed from the rich And he gave to the poor Stood up to the man And he gave him what for Our love for him now Ain't hard to explain The Hero of Canton The man they call Jayne... "
  • Brace Face (unregistered) in reply to Zylon
    Zylon:
    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.

    I'm sorry, I don't see what's wrong with that brace style. Are you one of those people that prefer to put the opening brace on the same line as the if statement (Java-style)? I hate that... Or is it something else? Please elaborate.

  • Daryl (unregistered) in reply to TGV
    TGV:
    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?

    Actually AS3.0 is an implementation of the (till recently scrapped - Thanks Microsoft) ECMAScript standard. If the standard had passed you would have started seeing Javascript follow.

    Unfortunately, Adobe is now left with a proprietary scripting language to try and satisfy the demands of developers hungry for a "REAL" programming language.

    For example: No anonymous functions No generics/templates No built-in collection structures (hurray, arrays! - sigh -) No Typed Arrays either.

    Captcha: haero

  • Diogo Baeder (unregistered) in reply to Zylon
    Zylon:
    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.

    The brace style follows the style used by many C developers... did you notice something I didn't?

  • William (unregistered) in reply to Schmalls
    Schmalls:
    OutlawProgrammer:
    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?
    But our shenanigans are cheeky and fun.

    His shenanigans are cruel and tragic.

    Which wouldn't make them shenanigans, at all, really.

  • Andreas (unregistered)

    Steinbach's Guideline for Systems Programmers: Never check for an error condition you don't know how to handle.

    Probably my most adhered-to guideline.

  • John (unregistered)

    Seriously people stop talking about boring code stuff. I still want to know if "Lucy" is hawt. Could one of you post a description of her, her clothes etc so I cen decide.

    Don't give away her identity though - there are some creepy people on the internet.

  • (cs) in reply to Zylon
    Zylon:
    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.
    Die. Or at least go find another line of work. In my experience, the only people who care about bracing style that much are shitty programmers.
  • WORKING STORAGE (unregistered) in reply to campkev

    The real WTF is the break statement. If you truely want to sleep thru the night. Remove the break statement. It's only gonna create meaningless program fails and doesn't take into account that maybe the error isn't even relevent and really your user level security wan't needed.

  • (cs) in reply to Zylon
    Zylon:
    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.

    That's amazing! I've got the same brace style on my luggage!

  • Bim Job (unregistered) in reply to TGV
    TGV:
    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?
    Because, once somebody has failed at C++ (which covers 95% of people who get entry-level jobs at C++), they move on to C# and Java. Fine languages both, but they have this irritating stuff to do with boxing and unboxing and annotations and getters and setters and whatnot.

    It's much simpler to carry over the mad skillz you learnt off C++, which is to say the syntax, and hang the rest.

    95% of the residue who go down this path then fail at C# and/or Java.

    Since they didn't learn anything in the process, other than that 30-year-old convoluted syntax is king, it's clearly important to preserve the little that they've picked up in five years of abject failure.

    In the future, there will be one gcc to bind them all. It will only accept C++ syntax. The programmer will provide a switch to the flab between the AST and the back-end, such as --java.p94 or --cflat or --go_on__guess, and the appropriate language will be instantiated, before being knackered by C++ syntax and inadequate error messages/exceptions.

    Actually, I believe Apache have been doing this for some time. As usual, they're ahead of the hyperbolic curve...

  • John (unregistered) in reply to Bim Job
    Bim Job:
    TGV:
    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?
    Because, once somebody has failed at C++ (which covers 95% of people who get entry-level jobs at C++), they move on to C# and Java. Fine languages both, but they have this irritating stuff to do with boxing and unboxing and annotations and getters and setters and whatnot.

    It's much simpler to carry over the mad skillz you learnt off C++, which is to say the syntax, and hang the rest.

    95% of the residue who go down this path then fail at C# and/or Java.

    Since they didn't learn anything in the process, other than that 30-year-old convoluted syntax is king, it's clearly important to preserve the little that they've picked up in five years of abject failure.

    In the future, there will be one gcc to bind them all. It will only accept C++ syntax. The programmer will provide a switch to the flab between the AST and the back-end, such as --java.p94 or --cflat or --go_on__guess, and the appropriate language will be instantiated, before being knackered by C++ syntax and inadequate error messages/exceptions.

    Actually, I believe Apache have been doing this for some time. As usual, they're ahead of the hyperbolic curve...

    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.

  • Anonymous (unregistered) in reply to John
    John:
    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.
    Give it up man, it's unlikely enough that a woman exists in a high level developer position but an attractive woman in a high level developer position? You'd have to be a lottery player to think you can realise those odds.
  • Loopy (unregistered) in reply to TK
    TK:
    ThePants999:
    it does leave me as the odd man out
    I think you're guaranteed to be the odd man out if your name is Lucy.
    Except that, in this context, "man" can refer to a male or female.
    I didn't expect the context police.
  • Ouch! (unregistered) in reply to John
    John:
    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.
    There, hot enough for you?

    Now, I hope you're busy for the next few hours and leave us in peace.

  • John (unregistered) in reply to Anonymous
    Anonymous:
    John:
    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.
    Give it up man, it's unlikely enough that a woman exists in a high level developer position but an attractive woman in a high level developer position? You'd have to be a lottery player to think you can realise those odds.
    But I feel so sure this time!
  • Bim Job (unregistered) in reply to John
    John:
    Anonymous:
    John:
    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.
    Give it up man, it's unlikely enough that a woman exists in a high level developer position but an attractive woman in a high level developer position? You'd have to be a lottery player to think you can realise those odds.
    But I feel so sure this time!
    I've met her. I have the photos. As with every other woman I've ever met in the IT industry -- many of whom contribute to this site -- she is most definitely a hottie. I'd go so far as to add "and tottie."

    However, I have it on good authority that she's not interested in a spotty little herbert like you.

  • John (unregistered) in reply to Bim Job
    Bim Job:
    ...she's not interested in a spotty little herbert like you.

    Hey! I write advanced Machine Code for a living when I'm not mixing with the cool crowd in the achingly fashionable UK underground clubbing scene.

    I bet you're the spotty one!

  • MPFC (unregistered) in reply to monkeyPushButton
    monkeyPushButton:
    SarahE:
    Sellars:
    Wolfraider:
    ThePants999:
    it does leave me as the odd man out
    I think you're guaranteed to be the odd man out if your name is Lucy.
    It's because he is related to a boy named Sue
    Either that or a man named Jayne.

    (/me notices the Whedonites lurking)

    "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

    "He robbed from the rich And he gave to the poor Stood up to the man And he gave him what for Our love for him now Ain't hard to explain The Hero of Canton The man they call Jayne... "

    "He steals from the rich and gives to the poor, Mister Moore, Mister Moore..."

  • Jeff G (unregistered)

    So I have a serious question about this particular set of code.

    I certainly don't agree that all errors should just get thrown away. But there are a number of instances in my own code where I put a try catch block and don't actually catch anything. It's simply there so that if an exception is thrown, it doesn't go to the main error handler.

    The reason I don't catch it is because I don't actually care if an error is thrown, in these circumstances it doesn't affect final outcome, and just means that parts of the data set don't appear in the final result. The data handler that receives the data doesn't expect a complete dataset everytime, it's built with the understanding that no data can be guaranteed, and it handles that appropriately.

    In that case, is the empty catch block still a bad idea? What other methodology would handle this better?

    It may seem odd to ask a question like this on TDWTF, but as I've been reading it over the past years, I've come to learn that the people who read the comments here are generally VERY good programmers, and people I actually look up to in many cases.

    Any constructive critcism is welcomed of course.

  • RagnaroK (unregistered) in reply to Iain Collins
    Iain Collins:
    Who are you people and how did you get access to my Sourcesafe repository...

    FTFY

  • Bim Job (unregistered) in reply to Jeff G
    Jeff G:
    So I have a serious question about this particular set of code.

    I certainly don't agree that all errors should just get thrown away. But there are a number of instances in my own code where I put a try catch block and don't actually catch anything. It's simply there so that if an exception is thrown, it doesn't go to the main error handler.

    The reason I don't catch it is because I don't actually care if an error is thrown, in these circumstances it doesn't affect final outcome, and just means that parts of the data set don't appear in the final result. The data handler that receives the data doesn't expect a complete dataset everytime, it's built with the understanding that no data can be guaranteed, and it handles that appropriately.

    In that case, is the empty catch block still a bad idea? What other methodology would handle this better?

    It may seem odd to ask a question like this on TDWTF, but as I've been reading it over the past years, I've come to learn that the people who read the comments here are generally VERY good programmers, and people I actually look up to in many cases.

    Any constructive critcism is welcomed of course.

    Log it.

    Honestly.

    Not logging information relevant to the programming domain (as opposed to the application domain) is the single worst weakness I've seen in twenty years of server-side programming.

    And don't fuck around with a database, a la NetView or IBM or whatever. Log it in unambiguous language, with a time-stamp and an optional qualifier (comms, user input, database, whatever), and spool the stuff out to a single log file. Not one for each program or task or whatever. Just one.

    Log it. Log it. Log it.

    (Also: catch all exceptions at the main() level and log them there. If you weren't interested, or couldn't work out how to solve it, in the first place, and it didn't entirely screw up what you were doing? Log it.)

  • Nigel (unregistered)

    I like how if the account type is private, this.username = this._data.username, but if the account type is shared, then this.username = this._data.username;

    Quality code all around, really. (but then maybe the snippet is missing some detail that makes that ok)

  • (cs)
    Lucy:
    All possible error conditions are handled with the simple //shenanigans statement.

    ...which makes them not really shenanigans at all...

    (Evil shenanigans!)

  • Some Wonk (unregistered) in reply to Loopy
    Loopy:
    TK:
    ThePants999:
    it does leave me as the odd man out
    I think you're guaranteed to be the odd man out if your name is Lucy.
    Except that, in this context, "man" can refer to a male or female.
    I didn't expect the context police.
    NOBODY expects the context police!
  • (cs) in reply to Some Wonk
    Some Wonk:
    Loopy:
    TK:
    ThePants999:
    it does leave me as the odd man out
    I think you're guaranteed to be the odd man out if your name is Lucy.
    Except that, in this context, "man" can refer to a male or female.
    I didn't expect the context police.
    NOBODY expects the context police!
    I knew you were going to say that!
  • (cs) in reply to campkev
    campkev:
    Zylon:
    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.
    Die. Or at least go find another line of work. In my experience, the only people who care about bracing style that much are shitty programmers.
    And in my experience, humourless knobs such as yourself make *extremely* shitty programmers.
  • (cs) in reply to pitchingchris
    pitchingchris:
    JoPoser:
    Is ASP 95% of the programming market or just 500% of the fowled up code market?

    Its nowhere near 500% in anything derived from the chicken industry..

    "Chicken coding" is a coding methodology analagous to how they produce "mechanically reclaimed" chicken: you pressure-hose blast the ground-in scraps of blood, crap, fat and guts off the factory floor, pump it full of water and then blend it into a flavourless homogeneous paste in an industrial mincer.

    This is where chicken nuggets come from, and also 95% of all ASP code.

  • T.C (unregistered)

    The TRWTF is likely to be that Lucy is seen by management and other staff as being 'too slow and pedantic' while the other developer 'quickly gets the job done'. By the time it comes round to figuring out why the exception handling mechanism isn't working as it should Lucy will probably be handed the job of fixing it and told she needs to work faster this time cause there are deadlines to meet!

    It reminds of a company I use to work for that practiced 'Agile' development. Basically what it meant was they did everything as quickly as possible. Design? No time for that! We have a (impossible) deadline to meet! Want to test that important piece of functionality? Testing takes to long! We have a (now even more impossible) deadline to meet!

    As one of those developers that actually cares about those pesky things such as bugs and maintainability I was soon approached by the boss and told I needed to 'learn how to code better'. To add insult to injury, the boss got a 'senior' developer to 'mentor' me in the error of my ways.

    Thankfully I resigned as soon as I could - the project in question was delivered 3 months late and had a huge bug count.

  • Anon (unregistered) in reply to T.C
    T.C:
    Testing takes to long!

    Apparently putting the second o in too takes too long as well.

  • justsomedude (unregistered) in reply to Ouch!
    Ouch!:
    John:
    That's a witty and insightful comment. But I really only care about whether story contributor "Lucy" is a hottie. And you're just wasting bandwidth.
    There, hot enough for you?

    Now, I hope you're busy for the next few hours and leave us in peace.

    It was either luck from your location or you get Kudos and +1 interweb for not using the .com TLD for google images. The brilliant admins at my work filtered only .com, while all the others work just fine. I prefer .sc for no particular reason.

  • Boris (unregistered) in reply to lolwtf
    lolwtf:
    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.

    It's the extra space in ElseIf. That's horribly wrong. Might not even compile

  • Log Police (unregistered) in reply to Bim Job
    Bim Job:
    Jeff G:
    So I have a serious question about this particular set of code.

    I certainly don't agree that all errors should just get thrown away. But there are a number of instances in my own

    Log it.

    That's the single truest thing in this thread so far. I've only heard one plausible excuse for not logging an error, even if the system manages to recover by other means: that's when the code is running on a client machine where you don't have permissions to write to a log. That's it. For everything else, there's writing quickly logging to a file so that you can later tell what happened. It may be that you're disguising an easily resolved problem.

  • Herby (unregistered)

    Wasn't there a restaurant called Shenanigans? It had lots of WTF's. Just don't return the food if it isn't right!

  • Beaker (unregistered) in reply to D-Coder
    D-Coder:
    Zylon:
    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.

    That's amazing! I've got the same brace style on my luggage!

    Hey, hey! This is the Shenanigans thread. You take your Spaceballs reference elsewhere, like the security by oblivity threads.

  • TheChurchPolice (unregistered)

    I use two kinds of Shenanigans: Frankincense, Myrrh... Three kinds of Shenanigans: Frankincense, Myrrh, Sandalwood... Four kinds of Shenanigans: Frankincense...

  • (cs) in reply to lolwtf
    lolwtf:
    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.

    Ooo, fun with variants Try this : dim A, B A = True B = False if val( A ) = val( B ) then MsgBox("Shenanigans"); end if

  • Pia Sava (unregistered) in reply to @Deprecated

    Kleenex.com's choice of wording for the "Experience the release" menu smacks of all kinds of shenanigans as well.

  • (cs) in reply to Zylon
    Zylon:
    campkev:
    Zylon:
    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.
    Die. Or at least go find another line of work. In my experience, the only people who care about bracing style that much are shitty programmers.
    And in my experience, humourless knobs such as yourself make *extremely* shitty programmers.

    And in my further experience, people who waste time commenting on TDWTF forums are the shittiest programmers of all.

    </irony>
  • (cs)

    Thank you for the Kleenex link! I laughed myself a cramp. I recommend taking the survey. It's the best part. Share how you feel!

  • Duke of New York (unregistered)

    I'm enjoying the Return of Alex while it lasts.

  • Lol-ifornia. (unregistered) in reply to Zylon
    Zylon:
    campkev:
    Zylon:
    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.
    Die. Or at least go find another line of work. In my experience, the only people who care about bracing style that much are shitty programmers.
    And in my experience, humourless knobs such as yourself make *extremely* shitty programmers.

    The braces in the code are a bit excessive and personally I wouldn't code it like that, but I do space out things in a similar fashion. Why is that bad? It makes reading it 10x easier. I've had to debug partner's code when it's all squished into like 4 lines and it's terrible, not to mention hard on the eyes.

  • Lol-ifornia. (unregistered) in reply to Lol-ifornia.

    Unless we're not talking about the same thing in terms of "brace style"?

  • Level 2 (unregistered)

    A friend of mine once put this message in his program: "An unexpected error has occured. Hit any user to continue."

    Later he was called be a user who told him: "I tried it, but it didn't work."

  • For um t'ro ll (unregistered) in reply to Zylon
    Zylon:
    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.

    HVAT IS VRONG VITH BSD CODE STYLE!?

  • Patrick (unregistered)

    shenanigans could be a VB subroutine as such the syntax for the call would be correct. If a FORTRAN subroutine, the syntax would be 'call shenanigans' captcha : bene (gesserit?)

  • Alois (unregistered) in reply to Jens Fiederer

    Even if it's for development-time only, you must not commit this code !

    I use sometimes this kind of 'easy to find and replace comment' during dev but I never commit them...

  • Jasper (unregistered)

    The real WTF:

    Lucy writes:

    ... but it does leave me as the odd man out ...
  • Jasper (unregistered)

    The real real WTF is that I didn't read the comments before posting about the real WTF.... :-)

  • (cs) in reply to Lol-ifornia.
    Lol-ifornia.:
    The braces in the code are a bit excessive and personally I wouldn't code it like that, but I do space out things in a similar fashion. Why is that bad? It makes reading it 10x easier. I've had to debug partner's code when it's all squished into like 4 lines and it's terrible, not to mention hard on the eyes.

    What's more, a keyword-aware editor like SlickEdit can do some magic for you, automatically generating the braces, or showing you which braces pair up (assuming your indentation didn't already make that clear).

Leave a comment on “The Shenanigans Handler”

Log In or post as a guest

Replying to comment #:

« Return to Article