• TheCPUWizard (unregistered)

    Now (without that code) set a break point that is triggered ONLY on the specific derived class when valid is false! With that code, it is trivial.

  • Jonathan (unregistered)

    Performance measured based on number of lines of code?

  • Jaloopa (unregistered)

    I caught a similar thing in code review recently. Someone had added an override to a validation method that went something like

    public override bool IsValid()
    {
        switch (someProperty)
        {
            case someValue:
                break;
        }
        return base.IsValid();
    }
    
  • some guy (unregistered)

    It might be there as proof that the base method can, in fact, be overridden. However, that is reaching, and dysfunction is the far more likely explanation.

  • (nodebb)

    It's amazing how many people simply cannot fathom conditional breakpoints.

  • retsep (unregistered)
    Comment held for moderation.
  • Deeseearr (unregistered)
    Comment held for moderation.
  • Brian (unregistered) in reply to WTFGuy
    Comment held for moderation.
  • Foo AKA Fooo (unregistered) in reply to WTFGuy

    Either that, or "set a breakpoint" to justify all kinds of stupid code has become a running gag/meme by now. I'm really not sure at that point ...

  • (nodebb)

    What this code ACTUALLY (TM) does is to ensure that, should some other linked library contain an isValid function, that this one takes precedence and guarantees the builtin isValid will be invoked. /s

Leave a comment on “A Base Nature”

Log In or post as a guest

Replying to comment #:

« Return to Article