• (disco)

    What's the bet that AbstractTrier uses try-catch blocks? Y'know, for ultimate :wtf:ery

  • (disco) in reply to RaceProUK

    But, but, then you can change the behaviour of all your catch blocks at the same time by just modifying that single class - genius!

  • (disco)

    your testing patterns prohibit the use of try/catch blocks

    And you would want your testing patters to do that ... why?

  • (disco) in reply to HardwareGeek

    In order to make a daily WTF article of course

  • (disco)

    I'd love to see the implementation of this, especially for methods using the implementations of ILooper and IConditional that can throw exceptions. If you must reinvent the wheel, at least it needs to be round, right?

  • (disco) in reply to Jerome_Viveiros
    Jerome_Viveiros:
    If you must reinvent the wheel, at least it needs to be round, right?

    Stop thinking inside the box. We already have round wheels, this one somehow extends into other dimensions, and doesn't roll in any of them

  • (disco)

    This codes brings me no satisfaction.

  • (disco)

    And if you have any sense at all, you'll now invoke something on IQuit.

  • (disco)

    Heh...and it looks like it took a few tries before @PaulaBean was satisfied that the topic was listed:

    [image]

    Filed Under: IListTopic,IBrillant

  • (disco)

    So, you know how a curious/confused dog will tilt its head sideways while looking at whatever is confusing it? I totally just did that, and I make no attempt at roleplaying as a canine.

  • (disco) in reply to mott555
    mott555:
    and I make no attempt at roleplaying as a canine.

    Shame ... there is totally place for a resident dog here ...

  • (disco)
    public class LinkinPark : ITried {
      try {
        soHard();
      } catch (Exception ignored) {
        //it doesn't even matter
      }
    }
    
  • (disco) in reply to Jerome_Viveiros
    Jerome_Viveiros:
    If you must reinvent the wheel, at least it needs to be **round**, right?
    If you reinvent it as a roller rather than a wheel (with all the accessory floo-flah about returning the rollers to the front of the vehicle), then you can use a circular-sided polygon (5 or 7 sides seems to work well, see e.g. British 50p coin) where the radius of curvature is picked to make the roller roll smoothly.
  • (disco) in reply to Jerome_Viveiros
    Jerome_Viveiros:
    If you must reinvent the wheel, at least it needs to be round, right?

    https://www.youtube.com/watch?v=QF7odK55gkI .

  • (disco)

    Yet more to chalk up to either:

    1. This guy is clueless about testing frameworks, because they all support testing for exceptions getting thrown when they should.
    2. This guy is used to doing self-grown stuff for everything, even if there is another tool out there that does it better.

    Either way, run for the hills!

  • (disco) in reply to Zowayix
    Zowayix:
    catch (Exception ignored) { //it doesn't even matter } }

    That should be a finally block. It says it right there in the lyrics:

    in the end it doesn't even matter

  • (disco) in reply to Luhmann
    Luhmann:
    Shame ... there is totally place for a resident dog here ...

    It looks like ITrier is available...

  • (disco) in reply to Zowayix
    Zowayix:
    public class LinkinPark : ITried { try { soHard(); } catch (Exception ignored) { //it doesn't even matter } }

    And he tries Oh my God, do I try I try all the time, In this institution


    Filed Under: HEYYEYAAEYAAAEYAEYAA

  • (disco) in reply to mott555
  • (disco) in reply to flabdablet

    Do you drive those in your little tiddler car?

  • (disco) in reply to Jaloopa

    I haven't driven that particular road in my little car, but I have driven local roads that are damn near as bad. I've also driven local tracks that saner men would probably hesitate to tackle in a four wheel drive. The little car's wheelbase is so short and so narrow that it's usually possible to find a way to tiptoe from rut to rut and hump to hump without suffering from its proportionately tiny ground clearance.

    It doesn't ford rivers well, though.

  • (disco) in reply to Zowayix

    public class LinkinPark : ITried { try { soHard(); } catch (Exception ignored) { //it doesn't even matter } }

    I've seen deterministic coding, but this is the first time I've seen nihilistic coding.

  • (disco)

    Let's see, he needs a few other things. IIfer, IRecurser, ISwitcher, ICaser, IWhiler, and IUntiler come to mind. Oh wait, forgot IGotoer.

  • (disco) in reply to CoyneTheDup
    CoyneTheDup:
    IUntiler
    An interface to remove tiles from a bathroom wall?
  • (disco) in reply to RaceProUK

    An interface to remove tiles from a bathroom wall?

    Remember, interfaces are abstract. It doesn't have to be a bathroom.

  • (disco) in reply to RaceProUK
    RaceProUK:
    An interface to remove tiles from a bathroom wall?

    Not to be confused with IUntiller, which re compacts prepared soil in gardens

  • (disco)

    I get why this was done. I hate it, but I get it.

    If you're trying to implement a section of the application in functional style, or you're trying to create a function/action/lambda that calls exception-throwing code, this would give you a clean wrapper to do so.

    The reason this type of mechanism is required in Java is that you can't dynamically declare/catch Exception types covariantly, meaning you have to manually implement the class once for each Exception you need to catch. Ew.

    I thought C#'s type system w.r.t. exceptions was smarter than that, though.

  • (disco) in reply to Fellshard
    Fellshard:
    I thought C#'s type system w.r.t. exceptions was smarter than that, though.
    It is
  • (disco) in reply to CoyneTheDup
    CoyneTheDup:
    Oh wait, forgot IGotoer.

    ICameFrom


    INB4 :giggity:

  • (disco) in reply to CoyneTheDup

    I think they also need an ISmacker which can slap silly developers.

  • (disco) in reply to boomzilla
    boomzilla:
    ICameFrom
    `ICame`, `ISaw`, `IKickedSomeAss`
  • (disco)
    where your testing patterns prohibit the use of try/catch blocks
    **WTF!** (note this says "patterns", and not "tooling"/"framework" etc...)

    Now if the topic was testing catch functionality when getting a testbed to throw the exception in the first place, we could have a good discussion [yeah, I keep forgetting where I am]

  • (disco) in reply to Steve_The_Cynic
    Steve_The_Cynic:
    If you reinvent it as a roller rather than a wheel (with all the accessory floo-flah about returning the rollers to the front of the vehicle), then you can use a circular-sided polygon (5 or 7 sides seems to work well, see e.g. British 50p coin) where the radius of curvature is picked to make the roller roll smoothly.

    Nonsense! Obviously, you make the roads roll instead.

  • (disco) in reply to RaceProUK
    RaceProUK:
    boomzilla:
    ICameFrom
    `ICame`, `ISaw`, `IKickedSomeAss`
    try {
        kickAss();
        chewBubblegum();
    }
    catch (BubblegumNotFoundException) {
    }
    
  • (disco) in reply to cconroy
    cconroy:
    catch (BubblegumNotFoundException)
    

    Wording suggests original material reference.

    I however do not agree with not attempting to kickAss(); anyway, regardless of bubblegum supply status.

  • (disco) in reply to Onyx
    try {
        chewBubblegum();
    }
    catch (BubblegumNotFoundException) {
    }
    finally {
        kickAss();
    }
    

    Better?

  • (disco) in reply to Fellshard
    Fellshard:
    I thought C#'s type system w.r.t. exceptions was smarter than that, though.

    It's WAY smarter than what you just described.

  • (disco) in reply to blakeyrat

    Someday they'll take me off of Java projects. Someday. :sob:

  • (disco) in reply to HardwareGeek
    HardwareGeek:
    And you would want your testing patters to do that ... why?

    Because you're the kind of idiot who doesn't trust the language and writes ILooper.

    Or the kind who "doesn't trust the database's transaction features" and writes his own quarter-assed transaction "manager".

  • (disco) in reply to cconroy
    cconroy:
    try { kickAss(); chewBubblegum(); } catch (BubblegumNotFoundException) { } catch (AssNotFoundException) { }

    FTFY

  • (disco) in reply to mott555
    mott555:
    I think they also need an ISmacker which can slap silly developers.
    public interface ISmacker
    {
        void Smack();
    }
    
    public class DefaultSmacker : ISmacker
    {
        public void Smack()
        {
            Logger.Log( "Naughty developer! Spank spank!" );
        }
    }
    
  • (disco) in reply to Zowayix
    Zowayix:
    public class LinkinPark : ITried { try { soHard(); } catch (Exception ignored) { //it doesn't even matter } }
    try 
    { 
        for (int i = 0; i < 4; i++) 
        {
            DrivinInMyCar();
            WatchinMyTV();
            RidinRoundTheWorld();
        }
    }
    catch (UselessInformationException e)
    {
        return new FileNotFoundException(e);
    }
    catch (InvalidCigarettesException e)
    {
        return new FileNotFoundException(e);
    }
    catch (ComeBackLaterNextWeekException e)
    {
        return new FileNotFoundException(e);
    }
    
  • (disco) in reply to Wesley_Long

    https://twitter.com/nihilist_arbys

  • (disco)

    This is still better than what my "Tech Lead" with 15 years experience once told me during a code review:

    The code is now quite stable, so you could remove these try because we no longer need to do any trial-and-error.

    On further "analysis", I found out that the team had never used exception handling before (or since, because I left the team shortly afterwards).

  • (disco) in reply to UchihaMadara
    UchihaMadara:
    On further "analysis", I found out that the team had never used exception handling before

    At least that saves you the hassle of dealing with checked exceptions.

  • (disco) in reply to flabdablet
    flabdablet:
    It doesn't ford rivers well, though.

    Citroen used to make small cars designed for awful French country roads, with air suspension that could get you across ploughed fields. There was a lever to raise the suspension still further for fords and big rocks. Also, when you parked, the car sank so low that it could not be wheelclamped. Unfortunately the hydraulic suspension was expensive to maintain, but it was fun to play with.

  • (disco) in reply to FrostCat
    FrostCat:
    Or the kind who "doesn't trust the database's transaction features" and writes his own quarter-assed transaction "manager".

    To be fair, it's only in the last 15 years that it has been really safe to write multiuser transaction code for some databases. There was one accounts system I remember that regularly got its knickers in a complete twist, even with only 4 simultaneous users, and it took the vendor a long time to fix.

  • (disco) in reply to kupfernigk

    Citroën still produces cars with hydropneumatic suspension. Regarding maintenance costs, not sure about the newer stuff, but no, not really. Not on a Xantia it wasn't. More expensive, that is.

  • (disco) in reply to kupfernigk
    kupfernigk:
    To be fair, it's only in the last 15 years that it has been really safe to write multiuser transaction code for some databases.

    In Progress databases it's been safe to do that for, I dunno, probably the entire existence of the commercial product. Certainly far longer than the time I saw someone do just that. I wasn't talking about Access.

  • (disco) in reply to kupfernigk
    kupfernigk:
    There was a lever to raise the suspension still further for fords and big rocks.

    That reminds me of something I saw once. Someone was driving a Ford 4WD pickup slowly along a rocky mountain road... a rut. I happened to be watching them when the front differential case of the pickup snagged a rock--abrupt stop! Thud! Back up and drive around.

    (I walked over and looked at the rock afterward...it was scratched but it was otherwise unaffected for the next million years.)

    It's useful to be able to raise the suspension, but something still has to connect to the center of the wheel.

Leave a comment on “And I Try, and I Try”

Log In or post as a guest

Replying to comment #:

« Return to Article