Best Javadoc Ever!



  • From a college assignment ("documenting" an implementation of the Ackermann function)

    /** Ackermann function.
    * @param a: a >= 0
    * @param b: b >= 0
    * @return res: res == Ackermann(a,b)
    */



  • Well, what do you want them to say?  The Ackermann function is well defined.  I might have changed it to:

    @return res: res == A(a,b) Where A() is the Ackermann function. 





  • @niteice said:

    http://xkcd.com/c207.html

    I've done the "call your friend's cellphone" trick before. It usually doesn't work, because their phone has by that point died.

    I don't know why this would be considered unusual in any way.



  • @Volmarias said:

    @niteice said:
    http://xkcd.com/c207.html

    I've done the "call your friend's cellphone" trick before. It usually doesn't work, because their phone has by that point died.

    I don't know why this would be considered unusual in any way.

    My variation is, "I'm going out and I can't find my cellphone, I know I'll call it from the landline...".



  • @mallard said:

    My variation is, "I'm going out and I can't find my cellphone, I know I'll call it from the landline...".



    My landline is wireless too, so I've done it both ways, use whichever phone I can find to call the other
    one.



  • I'm not surprised, given that it appears no one has ever actually run the javadoc tool on this, much less examined the generated result. If someone had, they would be informed that the javadoc has syntax errors. The author would do well to take a few a minutes to read this page.

    • Never put a colon or hyphen after the variable. The standard doclet is already doing it.
    • Never put a variable name (or colon or hyphen) after @return.
    • All javadoc is HTML. Therefore, the greater-than character ">" is illegal. Use > instead. (For extra points, replace ">=" with "≥".)


  • @VGR said:

    I'm not surprised, given that it appears no one has ever actually run the javadoc tool on this, much less examined the generated result. If someone had, they would be informed that the javadoc has syntax errors. The author would do well to take a few a minutes to read this page.

    • Never put a colon or hyphen after the variable. The standard doclet is already doing it.
    • Never put a variable name (or colon or hyphen) after @return.
    • All javadoc is HTML. Therefore, the greater-than character ">" is illegal. Use > instead. (For extra points, replace ">=" with "≥".)

    Does anybody ever really run javadoc?  The javadocs are always out of date by the time you're ready to run 'em, anyway. 



  • @Volmarias said:

    @niteice said:
    http://xkcd.com/c207.html

    I've done the "call your friend's cellphone" trick before. It usually doesn't work, because their phone has by that point died.

    I don't know why this would be considered unusual in any way.

     

    Whenever I try that my phone is on silent. Foiled again



  • @mallard said:

    @Volmarias said:
    @niteice said:
    http://xkcd.com/c207.html

    I've done the "call your friend's cellphone" trick before. It usually doesn't work, because their phone has by that point died.

    I don't know why this would be considered unusual in any way.

    My variation is, "I'm going out and I can't find my cellphone, I know I'll call it from the landline...".

    I don't pay for landline service, but I will buzz my cell for a second or two in Skype.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.