Showing posts with label Epic Fail. Show all posts
Showing posts with label Epic Fail. Show all posts

Monday, August 30, 2010

Epic Fail: JavaDoc

/**
 * This is a Java class. It contains one or more
 * methods that perform certain functions.
 */
class Foo {
  /**
   * A function that takes two parameters and
   * calculates the result depending on these
   * parameters.
   *
   * @param a The first parameter, a String.
   * @param b The second parameter, an integer.
   * @returns the result (as double), depending
   *   on the input parameters.
   * @throws Exception if an exception occurred.
   */
  public double calculateResult(String a, int b)
      throws Exception {
    return ((double) (a.length()*b)) / 3.4;
  }

  /**
   * This is an inner class that contains two
   * public variables.
   */
  class InnerClass {
    /**
     * A public String variable named x.
     */
    public String x;

    /**
     * A public string variable named y.
     */
    public String y;
  }
}

Epic Fail: Error messages

me@mycomputer> spellcheck longdocument.txt
spellcheck: There is at least one spelling error in the document.

me@mycomputer> spellcheck longdocument.txt --detailed
spellcheck: There are exactly 3 spelling errors in the document.