Why?



  • public final class AbstractWidget {

         // nothing but concrete methods

    }

     


  • BINNED

    Maybe they were reading How to Write Unmaintainable Code and wanted to practice what they learned.



  • @snoofle said:

    public final class AbstractWidget {

         // nothing but concrete methods

    }

    Either a class is designed to be inherited from, or it is not. If it is not then it should be marked final. Granded the name containing "abstract" is a possible WTF, but the word does have multiple meanings, so the context would be needed.



  • @TheCPUWizard said:

    context would be needed
    There is no base class. There is no subclass (obviously not with final here, but there is no logical subclass either). It's not where it was once abstract and then became concrete: there was never a subclass or abstract method of any kind. It's just stupidly named.

    Of course, we have this all over the place:

       AbstractWidget aw = new AbstractWidget();

    And of course, in those cases where we reflect:

       Class abstractWidgetClass = Class.forName("path.to.AbstractWidget");
    AbstractWidget aw = abstractWidgetClass.newInstance();

    ...which befuddles our junior developers.



  • Just use JOptionPane ... :)



  • @PedanticCurmudgeon said:

    Maybe they were reading How to Write Unmaintainable Code and wanted to practice what they learned.
    I can't even figure out how to use that website. Maybe that's some kind of meta-joke?



  • @snoofle said:

    @TheCPUWizard said:

    context would be needed
    There is no base class. There is no subclass (obviously not with final here, but there is no logical subclass either). It's not where it was once abstract and then became concrete: there was never a subclass or abstract method of any kind. It's just stupidly named.

    Likely, but not definite based on the original post. Replace "Abstract" with "Theoretical" (one of the definitions), and the concept may apply as a concrete class that can not be derived from, and has no base class. Or perhaps (again with just the original posted information) there may be different elements for different types of art (Abstract, Portrait, Scenic, et. al.).



  • @TheCPUWizard said:

    @snoofle said:

    @TheCPUWizard said:

    context would be needed
    There is no base class. There is no subclass (obviously not with final here, but there is no logical subclass either). It's not where it was once abstract and then became concrete: there was never a subclass or abstract method of any kind. It's just stupidly named.

    Likely, but not definite based on the original post. Replace "Abstract" with "Theoretical" (one of the definitions), and the concept may apply as a concrete class that can not be derived from, and has no base class. Or perhaps (again with just the original posted information) there may be different elements for different types of art (Abstract, Portrait, Scenic, et. al.).

    I think you're giving snoffles off-shore colleagues too much credit.  Frankly, I'm surprised they spelt "Abstract" correctly, or that the class isn't filled with static methods.


  • @snoofle said:

    And of course, in those cases where we reflect:

       Class abstractWidgetClass = Class.forName("path.to.AbstractWidget");
    AbstractWidget aw = abstractWidgetClass.newInstance();

    ...which befuddles our junior developers.

     

    Why?

    Why oh why instanciate it via reflection if you're going to reference it by its actual type?

    snoofle,  you should hunt this guy down.

     



  • abstract: n. a summary of a text, scientific article, document, speech, etc.; epitome.

    So it's a widget that displays abstracts. Well, in a sane codebase it might be.



  • @snoofle said:

    It's just stupidly named.
     

    That.

    The stupidity leads to confusion and adds maintanence overhead.

    I despise this practise, and despise developers who can see no wrong in it at all ("but it WORKS!").



  • @Cassidy said:

    @snoofle said:

    It's just stupidly named.
     

    That.

    The stupidity leads to confusion and adds maintanence overhead.

    I despise this practise, and despise developers who can see no wrong in it at all ("but it WORKS!").

    Stupid naming is a problem, no argument there. But I maintain that simply because an identified has the word "abstract" in it, one can not assume a WTF. There have been many possible (but unlikely given Snoofle's environment) reasonable usages as has been pointed out.



  • Replace Abstract with Default or something similar and it makes sense.


  • ♿ (Parody)

    @TheCPUWizard said:

    Stupid naming is a problem, no argument there. But I maintain that simply because an identified has the word "abstract" in it, one can not assume a WTF. There have been many possible (but unlikely given Snoofle's environment) reasonable usages as has been pointed out.

    This is true in a general sense. But I am not going to even consider giving the benefit of the doubt to anyone who works with snoofle. Still, given the standard naming conventions, even a legitimate use should probably come up with a less ambiguous name.



  • @TheCPUWizard said:

    Stupid naming is a problem, no argument there. But I maintain that simply because an identified has the word "abstract" in it, one can not assume a WTF.
     

    Oookay... all WTFs are problems, but all problems aren't necessary WTFs?

    Gotcha!


  • BINNED

    @mott555 said:

    I can't even figure out how to use that website. Maybe that's some kind of meta-joke?

    Halfway down the page is a list of topics. Click one and start reading.



  • why not.



  • @Cassidy said:

    Oookay... all WTFs are problems, but all problems aren't necessary WTFs?

    Something is either perfect, or it has some type of problem. So if all problems were WTF's, and since nothing is perfect, that would lead to the conclusion that everything is a WTF.



  • @snoofle said:

    ...which befuddles our junior developers.

     

     Colour me befuddled.

     



  • @TheCPUWizard said:

    So if all problems were WTF's, and since nothing is perfect, that would lead to the conclusion that everything is a WTF.
     

    I can't disagree with your logic...  and I've gathered too much evidence supporting your hypothesis.

    You win.



  • Not really related, but when talking to a coworker today about files on network drives that are apparently mapped differently on my PC than my coworkers' PCs, I realized that I said this phrase out loud:

    "So, should I refer to S as T when talking to B?"



  • @PedanticCurmudgeon said:

    Maybe they were reading How to Write Unmaintainable Code and wanted to practice what they learned.

    That site definitely takes its own advice. Still, "use semicolons where syntactically able" is a good one.



  • @mott555 said:

    @PedanticCurmudgeon said:

    Maybe they were reading How to Write Unmaintainable Code and wanted to practice what they learned.
    I can't even figure out how to use that website. Maybe that's some kind of meta-joke?

    Here is the monlithic version of that site, it even contains a broken link to the above link!

     



  • @snoofle said:

    And of course, in those cases where we reflect:

       Class abstractWidgetClass = Class.forName("path.to.AbstractWidget");
    AbstractWidget aw = abstractWidgetClass.newInstance();

    ...which befuddles our junior developers.

    It befuddles me. I made a joke about reflection in another post of yours, and now it turns out that reflection is actually used – in the most depraved way imaginable.

     



  • @esoterik said:

    Here is the monlithic version of that site
     

    I've seen many pages "back in the day" using that monolithic format to blog rants an/or just to publish white papers on some topic.

    Strangely, that format works for me. Thanks for the link.

    Developer squirming will commence.



  • @Cassidy said:

    Strangely, that format works for me.
     

    You can use a style-editor addon to format it nicely.



  •  I tried, but that addon isn't compatible with my Firebird1.5 running under LudditeOS 0.8 (1998 release).

    WHY DO PEOPLE BREAK SHIT THAT WORKS OH GOD WHY DON'T THEY LEAVE IT ALOANNNNN



  • @Cassidy said:

     I tried, but that addon isn't compatible with my Firebird1.5 running under LudditeOS 0.8 (1998 release).

    WHY DO PEOPLE BREAK SHIT THAT WORKS OH GOD WHY DON'T THEY LEAVE IT ALOANNNNN

    Due to the forum we're on, I can't be sure if you're being sarcastic. Is the sky a nice shade of beige where you are?



  • @Ben L. said:

    Is the sky a nice shade of beige where you are?
     

    #sky
    {    
        color: veal;
    }

Log in to reply