Eckel criticism

Discussion in 'Java' started by corky, Jun 29, 2008.

  1. corky

    corky Guest

    I have been reading Thinking in Java for a couple of weeks and I think Bruce
    mucked up the clarity of examples with the "simpletest" library. He has this
    goofy monitor object in his examples. Perhaps I will like it later...
    corky, Jun 29, 2008
    #1
    1. Advertising

  2. corky

    Stefan Ram Guest

    "corky" <> writes:
    >I have been reading Thinking in Java for a couple of weeks and
    >I think Bruce mucked up the clarity of examples with the
    >"simpletest" library. He has this goofy monitor object in his
    >examples. Perhaps I will like it later...


    You like Eckel criticism? »Alright now, let's go«¹
    (1: Quoted from »Ballroom Blitz« by Michael Chapman and Nicky Chinn.)

    Recently someone claimed that "Thinking in Java 3",
    contained this sentence:

    |If you're defining an anonymous inner class and want to use an
    |object that's defined outside the anonymous inner class, the
    |compiler requires that the argument reference be final, like
    |the argument to dest().

    Here, Eckel writes:

    »object that's defined«.

    Objects, however, are not "defined", they are /created/ at
    run-time. Names of reference variables are being /declared/
    in the source text, not "defined".

    http://java.sun.com/docs/books/jls/third_edition/html/statements.html#5920

    Then, he continues to write

    »argument reference be final«.

    This might intend to say that a reference parameter was
    declared with "final". "final" is not an attribute of a,
    /reference/, but of a variable.

    However, this is not about /arguments/ (the reference
    arguments do not have to be declared "final" here), but
    about /parameters/. The distinction between these two
    Java terms seems to be unknown to Eckel.

    parameter:

    http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.8.7

    arguments:

    http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12

    He also writes:

    »the compiler requires«.

    It might be the case that the compiler of Mr. Eckel indeed
    requires this, but he should teach a language instead of an
    implementation, so it might be preferable to write
    "the language specification requires«.

    Also, anonymous inner classes are not being /defined/ in
    Java, as Eckel writes at the beginning of the quotation, but
    they are being /declared/.

    Moreover, "anonymous" is an unnecessary restriction, because
    the assertion is valid for /all/ inner classes. Someone
    learning by this sentence thus needs to learn anew at another
    time that this is also valid for non-anonymous inner classes,
    or he might believe erroneously for an indetermined amount of
    time, that it is only valid for anonymous inner classes.

    Is there a way to improve the sentence? One attempt by me:

    A parameter to be used within an inner class of its method
    needs to be declared »final«.

    Even the Java Language Specification itself is easier to
    read than Eckel (and of course, much more correct):

    Any local variable, formal method parameter or exception
    handler parameter used but not declared in an inner class
    must be declared final.

    http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3

    All the reported faults have been found by me within a single
    sentence chosen at random (I did not read the book, but
    discovered the sentence in another posting, claiming to quote
    this sentence from "Thinking in Java".) If one extrapolates this
    error quotient to the whole TIJ, it gives a horrid impression.

    Some books might sell chiefly because the buyer wants to
    express agreement with their title. When one is learning a
    foreign language one does not want to think everything in
    English first and then painfully translate it word-by-word.
    So one might choose "Thinking in Java" instead of a
    garden-variety "Introduction to Java", because one longs for
    the promise given by its title, not suspecting that the author
    Eckel himself might be far from "thinking in Java".
    Stefan Ram, Jun 29, 2008
    #2
    1. Advertising

  3. corky

    Mark Space Guest

    corky wrote:
    > I have been reading Thinking in Java for a couple of weeks and I think Bruce
    > mucked up the clarity of examples with the "simpletest" library. He has this
    > goofy monitor object in his examples. Perhaps I will like it later...
    >
    >


    That's pretty much my impression of anything I've read by Mr. Eckel:
    goofy.

    For Java, I prefer _Learning Java_ by O'Reilly and the Javapassion
    website (run by a Sun researcher who gives free on-line courses in
    various aspects of Java and Java EE).

    <http://www.javapassion.com/javaintro/>
    Mark Space, Jun 29, 2008
    #3
  4. corky

    corky Guest

    "Mark Space" <> wrote in message
    news:R%Q9k.6548$...
    > corky wrote:
    >> I have been reading Thinking in Java for a couple of weeks and I think
    >> Bruce mucked up the clarity of examples with the "simpletest" library. He
    >> has this goofy monitor object in his examples. Perhaps I will like it
    >> later...

    >
    > That's pretty much my impression of anything I've read by Mr. Eckel:
    > goofy.
    >
    > For Java, I prefer _Learning Java_ by O'Reilly and the Javapassion website
    > (run by a Sun researcher who gives free on-line courses in various aspects
    > of Java and Java EE).
    >
    > <http://www.javapassion.com/javaintro/>


    Thanks, I am really suffering with the books I have found so far. I will
    refer to the O'Reilly for some help. This is a good language, but the
    details of OO can become painful on a beginner. Either the books are too
    froofy like Eckel or too lightweight(lets make an applet with dialogue
    boxes). I just want the language in plain english for a noob.
    corky, Jun 29, 2008
    #4
  5. corky

    Mark Space Guest

    corky wrote:
    > "Mark Space" <> wrote in message


    >> For Java, I prefer _Learning Java_ by O'Reilly and the Javapassion website
    >> (run by a Sun researcher who gives free on-line courses in various aspects
    >> of Java and Java EE).
    >>
    >> <http://www.javapassion.com/javaintro/>

    >
    > Thanks, I am really suffering with the books I have found so far. I will
    > refer to the O'Reilly for some help. This is a good language, but the
    > details of OO can become painful on a beginner. Either the books are too
    > froofy like Eckel or too lightweight(lets make an applet with dialogue
    > boxes). I just want the language in plain english for a noob.
    >
    >


    While waiting for more books to arrive, you could go through the lessons
    at the link I gave you. They are designed to be self-paced. The first
    ones are pretty basic but they'll get you started with the Netbeans IDE
    (a good IDE, imho) and also make sure you aren't missing any of the
    fundamentals.

    Also, the online Java tutorial that Sun provides is a decent place to
    start, although I've found it to be a little less tutorial and a little
    more reference.

    Sun's Java tutorial:

    http://java.sun.com/docs/books/tutorial/

    Eventually, you'll need to refer to the on-line Java doc for the parts
    of the API not covered in tutorials. Google for "java classname se 6"
    will almost always get you the the Java doc for the class named classname.
    Mark Space, Jun 29, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xah Lee
    Replies:
    62
    Views:
    1,562
  2. Marcello
    Replies:
    0
    Views:
    361
    Marcello
    Apr 28, 2006
  3. Xah Lee
    Replies:
    61
    Views:
    1,068
  4. Replies:
    0
    Views:
    407
  5. Xah Lee
    Replies:
    58
    Views:
    435
Loading...

Share This Page