To fix, or not to fix ...



  • Sanitized a bit, but everything else as-is: 


    /**
     * returns true if [field] indicates that this is a [type] as per [spec]
     * 
     * @return true if [field] indicates that this is a [type] as per [spec],
     *         false otherwise
     *
     * NOTE: THIS MEATHOD IS NOT YET IMPLEMENTED AND ALWAYS RETURNS TRUE!!!
     * END NOTE
     */
    public boolean isType() 
    { 
      // FIX THIS
      return false;
    }

    So ... has it been fixed ... or not?

    Edit: Yes, this method is referenced.



  •  I'm not sure which one is worse:  The fact that the intended behavior of the method has not been implemented properly or that the "Not yet implemented" behavior was not implemented properly.



  • The latter. Having a placeholder isn't a WTF - unless the code has been checked in as complete, of course.

    Mind you, if any of the code that references this is passing unit tests, at least it shows which programmers need to be transferred to another part of the organisation where they can do less damage.

     

     



  • @zelmak said:

    * NOTE: THIS MEATHOD IS NOT YET IMPLEMENTED AND ALWAYS RETURNS TRUE!!!

    SHOUTYCAPS, bad spelling, and multiple exclamation marks. I pity you, because you clearly work with someone madder than SpectateSwamp.



  • Madder than Spectate Swamp?  The guy who thinks the torq screwdriver application he wrote is really a swiss army knife? 



  •  No, until it has been implemented properly it should return fileNotFound.

     



  • "THIS MEATHEAD IS NOT YET IMPLEMENTED" seems to be correctly describing the brain of the author of that code...



  • TRWTF is that it's Java and Java has checked exceptions.

    If it was C#, just put

        throw new NotImplementedException();



  • @Paddles said:

    The latter. Having a placeholder isn't a WTF - unless the code has been checked in as complete, of course.

    Mind you, if any of the code that references this is passing unit tests, at least it shows which programmers need to be transferred to another part of the organisation where they can do less damage.

     

    I'm not sure I agree with the "placeholder's aren't a WTF" sentiment. "Placeholder" API functions are an insidious type of latent failure, especially if that API is provided by a third party.  I'd prefer a slightly modified form of your statement, such as "placeholders can sometimes be a WTF" or maybe the more positive "palceholders don't necessarily have to be a WTF."



  • @Medezark said:

    Madder than Spectate Swamp?  The guy who thinks the torq screwdriver application he wrote is really a swiss army knife? 

    You give him too much credit.  A Torq screwdriver is actually useful...

     



  • @mott555 said:

    TRWTF is that it's Java and Java has checked both checked and unchecked exceptions.

    If it was C# Java, just put

        throw new NotImplementedException() UnsupportedOperationException();

     

     FTFY.



  • Is this a Shroedinger's function?


Log in to reply