Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

Review of The Java Tutorial, Third Edition

By Builder in Op-Ed
Sun Sep 08, 2002 at 05:34:02 PM EST
Tags: Books (all tags)

The Java Tutorial, 3rd Edition
ISBN: 0201703939
Publisher: Addison Wesley Authors: Mary Campione, Kathy Walrath, Alison Huml

One of my upcoming university modules is an introduction to Java and object-oriented programming. Because I've got a short year coming up I wanted to get a jump on my studies and I thought that by starting with Java I could save some time. To this end, I bought a copy of the above book and worked through it doing all of the exercises and answering all of the questions. This is similar to how I attacked C with the excellent The C Programming Language. I must honestly say that I have not gained anywhere near as good an understanding of Java through this process as I would have liked. After working through The C Programming Language I had a good grasp of the fundamentals and I was equipped to write programs. I am nowhere near this confident with Java.

This review covers the printed edition of this book. It is also available online at http://java.sun.com/docs/books/tutorial/. Many of the problems with the printed edition of the book do not appear in the online version. This is mostly because of the ability to easily link between sections or pages on the web, while trying to do this in dead-tree format means a lot of paging back and forth.

This book claims to be aimed at both new programmers, experienced object-orientated programmers and programmers experienced with procedural languages. I would not recommend this book for new programmers because of many of the problems that I will address below. While experienced programmers will be able to spot and deal with a lot of these issues, some of these problems will frustrate beginning programmers.

The first downside is that the tutorial is practically useless without Internet access. Many sections refer you to the Java API documentation on the Sun web site for further information. Not being able to refer to the web site will leave you confused in the coming sections of the book. All of the answers to the exercises are on the Sun web site so you need that access to validate your solutions. Don't even bother to try working through this book on the train!

Next, the book does not introduce concepts and build on them. Many of the better programming tomes that I have read introduce each concept and then build on those. Very seldom are you expected to use a method or function that you have never seen before as the solution to a chapter exercise. Several chapters have exercises where the main method or class required to solve them is only introduced 100+ pages further on. This problem is not limited to exercises but also to general information provided in each chapter. To fully understand the point being made, you often have to page further through the book, read a section and the come back to where you were. This is easier with the web version because this paging is accomplished by a single click. It is still distracting in both environments though and does break your train of study.

The exercises themselves are often vague and few clues are given as to how to go about solving the problem. This is not as big a problem for experienced programmers, but new programmers will find this very frustrating. An example of this are the exercises from the end of the Creating Classes section (page 203). They are as follows:

  • Write a class whose instances represent a playing card from a deck of cards.
  • Write a class whose instances represent a deck of cards
  • Write a small program to test your deck and card classes. The program can be as simple as creating a deck of cards and displaying its cards.

Besides just creating the classes, the solutions required several methods for interfacing with instances of objects created from these classes. These are never even hinted at. Another example of this problem is in the exercises for Managing Inheritance. The question is simply

  • Write an abstract class. Write at least two of its non-abstract subclasses.

The solution to this problem (which can be found here) says
Answer 2: If you tell us your solution, we'll post the best one.

The student is never presented with any clue as to whether or not their solution is valid. This lack of validation can be discouraging.

My last big problem with this book is the quality of the code in the examples. Many of the code samples that you are required to download and modify in the exercises contain poorly formatted code. These formatting problems include non-indentation between braces and other issues that will confuse a new programmer.

My personal verdict on this book is that it is not worth buying. I feel that most people would be far better off working through the online tutorial. The GBP30.99 that I spent on this book could have been better invested in one of the O'reilly books.


Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure


Related Links
o The C Programming Language
o http://jav a.sun.com/docs/books/tutorial/
o here
o Also by Builder

Display: Sort:
Review of The Java Tutorial, Third Edition | 66 comments (49 topical, 17 editorial, 0 hidden)
Sucker (2.61 / 13) (#3)
by bc on Sun Sep 08, 2002 at 08:03:48 AM EST

Computer books are a waste of fucking money. Any one you buy will end up rotting on the shelf, and if you want to learn something, you can't be arsed flipping from book to screen to keyboard. Fuck that.

Just get things on the web. Like Eckels' Thinking in Java, the premier Java learning aid bar none.

Don't spend money on computer books. It's a total waste of time and they go out of date anyway. Spend the money on booze, fags and amateur dramatics.

♥, bc.

If I learn anything... (none / 0) (#4)
by Builder on Sun Sep 08, 2002 at 08:06:37 AM EST

I always justify the cost of computer books based on learning something, anything. With The C Programming language, I learnt enought to write an Apache module and a disk space monitoring tool.

At GBP30.00 per book, I normally figure that if I can learn enough to save two hours time at work, the book has paid for itself. The idea is then to donate the books to various charity's. I use them to ramp up, and then use the web from there on to learn specifics.

Thanks to the pointer at Thinking in Java. I'll give that a look once I've got over my current loathing of this entire language :)

Be nice to your daemons
[ Parent ]
Learn by example (none / 0) (#10)
by j1mmy on Sun Sep 08, 2002 at 10:17:15 AM EST

I'll give that a look once I've got over my current loathing of this entire language

Don't loathe Java just yet. As a language, it's very usable. Wait until you try to do anything computationally intensive. Then you're going to hate Java.

[ Parent ]

University (none / 0) (#16)
by Builder on Sun Sep 08, 2002 at 10:42:52 AM EST

Learn by example is normally ok for my day to day work. That's how I learnt perl and all of the sysadmin skills that I had. But when you're trying to learn something for university that you will be examined on, you have to do the whole book larnin' thing...

Be nice to your daemons
[ Parent ]
Learn by example if you want to be a shitty coder (2.50 / 2) (#17)
by Carnage4Life on Sun Sep 08, 2002 at 11:01:42 AM EST

I wouldn't trust anyone who learned C++ by example or CORBA or compiler theory or operating system concepts or ...

I'm sure you get the picture.

[ Parent ]
Yup (4.00 / 1) (#38)
by j1mmy on Sun Sep 08, 2002 at 08:51:42 PM EST

It's interesting that you should mention C++. I learned that more or less by example, and though I've written plenty of working code in the past, it's always had bugs I could never really hunt down. The last few months, I've been reading the Guru of the Week series, all manner of other articles and writings on the language and my code has improved enormously. So I still think learning by example is a good way to start, provided you don't develop any bad habits before you really get into the theory.

[ Parent ]
Good natured punch in the face (3.00 / 2) (#48)
by ubu on Mon Sep 09, 2002 at 06:38:35 AM EST

This from the guy who claims we should prefer composition to inheritance, as though they were solutions in the same domain...


As good old software hats say - "You are in very safe hands, if you are using CVS !!!"
[ Parent ]
That's exactly the problem... (5.00 / 1) (#54)
by curien on Mon Sep 09, 2002 at 02:43:17 PM EST

Composition and inheritance are orthogonal. The problem is that the semantics of C++ make them much less so, and the syntax favors inheritance for proxy classes and such, even though composition is conceptually correct. If your situation meets the Liskov Substitution Principle, then composition simply is not an option, hence, in C++, one should favor composition over inheritance.

Murder your babies. -- R Mutt
[ Parent ]
Pace yourself and stop comparing to C (3.33 / 3) (#26)
by ubu on Sun Sep 08, 2002 at 01:52:49 PM EST

Truth told, Java represents both a language and an enormous platform, as bodrius pointed out. You can learn the Java Programming Language almost as quickly as you can learn the C Programming Language, but almost nobody wants to to learn the language without the platform. This is why, generally, all tutorials are quite extensive and elaborate.

Java is not a terribly interesting language, as a language. It's taught in Prog Lang 201 because it's relevant and salient, not because it's academically revolutionary. If you wanted to learn Java simply for the sake of the language, I don't know how you'd write even simple programs without reproducing the Platform, itself.

Accept that you're learning a whole platform (practically speaking, an entire operating system's worth of tools) and take the long view of things. At some point you'll look up and say, "Goddamn, this stuff is great. I'm never going back." At least, that's the idea.


As good old software hats say - "You are in very safe hands, if you are using CVS !!!"
[ Parent ]
To be brutally honest... (5.00 / 1) (#28)
by Builder on Sun Sep 08, 2002 at 02:20:23 PM EST

I don't really plan on using Java for much in the real world. I wouldn't be learning it if it wasn't a requirement for uni. Maybe that's not the best attitude to take, but for my work Java has very limited applications. I'm a sysadmin and things like perl, python and C suit my needs.

I understand what you're saying about the platform, and I'm trying to appreciate that, but in a lot of ways it is very overwhelming. The amount of digging that you have to do to find simple things is mind boggling.

If I was planning on using Java in the real world, I'd just run out and buy the Java cookbook and use that as my Big Pointer

Be nice to your daemons
[ Parent ]

I see (3.00 / 2) (#47)
by ubu on Mon Sep 09, 2002 at 06:35:57 AM EST

I know that there are a lot of reasons that people don't like Java, or prefer to use a scripting language. As a fairly accomplished Java developer, I look back and see that everything I've learned was well worth it, and that from my vantage point I would never go back to scripts.

Python was a godsend when it meant I didn't have to use C++ for tools and other things that wanted to be object-oriented. But today I can develop in Java as quickly as in any scripting language, and the resulting code is far less brittle, far more reusable, and far faster than anything I might have built in the languages you mentioned.

I realize you won't take the word of a stranger on it, but I assure you that becoming facile with Java will almost certainly make you give up your current languages forever. It really is better in almost every way.


As good old software hats say - "You are in very safe hands, if you are using CVS !!!"
[ Parent ]
sample java code (none / 0) (#64)
by wilton on Wed Sep 11, 2002 at 09:33:58 PM EST

I am keen to learn Java and understand why poeple say that is a 'better' language.
Where can I get sample Java CGI code, to look at. I would like to see something simple like a bit of code to receive a web form, validate email address, and then store in a database.

[ Parent ]
Java code (1.00 / 1) (#65)
by ubu on Thu Sep 12, 2002 at 11:38:12 AM EST

Most people don't use CGI directly through Java. Instead, they use the Java Servlets API, which handles that stuff for you. I'll provide an example:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

import example.FormValidationException;

public class FormServlet extends HttpServlet {
  public void doGet(HttpServletRequest req, HttpServlet Response res)
    throws IOException {

    String email = req.getParameter("email");
    try {
    } catch (FormValidationException e) {
      System.err.println("Form didn't validate: bad email address.");
    // Get other form fields here

    // Store in database here

    PrintWriter out = res.getWriter();
    out.println("<html><body><p>Thanks for submitting.</p></body></html>");
The Servlets API is nice, since it prevents brittle use of CGI directly. However, it's only the first step toward a real Web application. Using Java Server Pages to create output (think of it as a template system with server-side scriptlet support) is another good move. Moreover, I left out database access, even though it's simple enough, because eventually you'll want to move away from brittle JDBC calls -- which are functionally equivalent to DBI/DBD -- and toward a persistence layer like EJB 2.x.

The topic of building web applications in Java is a vast one, and encompasses many tools. I'll leave you to explore that on your own, but I can assure you that the Platform is quite large and well-supported -- and incidentally, rather more sophisticated, on the whole, than Perl and Python through CGI.


As good old software hats say - "You are in very safe hands, if you are using CVS !!!"
[ Parent ]
about languages (none / 0) (#52)
by jacob on Mon Sep 09, 2002 at 01:48:20 PM EST

Maybe that's not the best attitude to take, but for my work Java has very limited applications. I'm a sysadmin and things like perl, python and C suit my needs.

Are you saying that because you know how to program in every language ever and those three are the absolute best for you, or is it that those are just the only three languages you know? I've said before about programming languages that while it may be true that if all you have is a hammer every problem looks like a nail, it's also true that if you've never seen a hammer then pounding nails into boards with your bare forehead doesn't seem like an entirely unreasonable idea. In other words: learn the language, try to figure out what the developers were going for, try to find applications, and then judge in that order.

"it's not rocket science" right right insofar as rocket science is boring


[ Parent ]

Programming languages (none / 0) (#57)
by Builder on Mon Sep 09, 2002 at 03:37:11 PM EST

I've had exposure to and I'm relatively competent in a lot of langauges. Many of them just don't fit in with my day to day needs. Things like lisp, pascal, C++ all have their place, but their place is generally not in my day-to-day work. I'm familiar with these, but for most purposes they are the wrong tool for the job.

If I'm writing system scripts to archive logs, back things up or automate tasks I generally choose perl. If I'm writing CGI's or quick web apps I'll flip between perl and PHP, depending on my current opinion of the php project (far too many security holes in the module for my liking). If I need a module or a chunk of code that does expensive computations, then I drag out C.

That pretty much describes my day to day work. I will attack a problem from an OO perspective if it makes sense. I will write well documented elegant code if needed. I will write dirty hacks if we just need to munge some data now and aren't ever going to work on that data again. So I'm not the single hammer type person.
Be nice to your daemons
[ Parent ]

yes indeed (none / 0) (#44)
by piergi on Mon Sep 09, 2002 at 04:39:27 AM EST

this is so true...plus, if you decide not to program with M$ tools, you can ask the very people who wrote the tools, without buying the books.

[ Parent ]
Thinking in Java (5.00 / 3) (#6)
by snakey on Sun Sep 08, 2002 at 09:11:08 AM EST

For what it's worth, I was in the same position as you a few years ago, and I chose "Thinking in Java" by Bruce Eckel (downloadable online), which I found invaluable. As a reference, I use the API documentation almost exclusively, which is worth the long download. The "Java in a Nutshell" and "Java Examples in a Nutshell" books are also good.

API "Documentation"? HA. (4.00 / 1) (#9)
by jesushatesyou on Sun Sep 08, 2002 at 09:41:59 AM EST

I assume you are talking about the java api docs?

Because I found them to be an enormously useless set of documentation.

It is like they had some bizarre goal of making the Javadoc as small as possible, so they never mention anything twice or try to give an outline of what is going on overall, as opposed to the minutiae of specific functions. Because of the way it is divided into separate classes, it is very hard to get an overview of HOW you should be doing something, because the javadoc only ever tells you about the role of a specific class, but not about how everything works together.

They don't tell you HOW you should use anything. It is full of the specific functions and classes and return types and parameters but little which is actually useful to beginners.

When you are trying to figure out even basic stuff with the AWT it's like pulling teeth. They mention important, nay CRUCIAL, details in one class documentation but they neglect to mention them in any other ones which are just as relevant. And sometimes the documentation goes off on this bizarre tangent about some irrelevant detail, while ignoring the big picture completely.

Also, a few more examples wouldn't have gone amiss. In fact in a reference API documentatoin for a complicated modern programming language they are essential! Examples are few and and far between in the javadoc.

I think the javadoc is a third-rate excuse for an API documentation. I wouldn't care, but me and thousands of other CS students are forced to use it as the main reference for Java API classes, particularly the AWT.

[ Parent ]

Amen! (none / 0) (#14)
by Builder on Sun Sep 08, 2002 at 10:24:32 AM EST

You said that better than I ever could have! My biggest problem at the moment is knowing where to start. I'm building a shopping application as a way of implementing what I'm learning, but I spend my whole time trying to work out which class I should be using. Then often the choice of a class will limit what I can use elsewhere. Often I have to choose between two almost identical classes and work out what the differences are.
Be nice to your daemons
[ Parent ]
Yikes (none / 0) (#41)
by X3nocide on Sun Sep 08, 2002 at 10:46:21 PM EST

Building a shopping application as a method of making lessons concrete? Yikes, man. Sounds just a bit shy of building an Operating System to make sure I know how C works. Hurray for toy problems. I suppose if you were some master of the craft who just didn't know java that might fly if you're just making a "toy" shopping application (or maybe a full fledged site if you're masochistic) but for a novice coder, dealing with Collection classes while working with the http classes isn't quite... sane.

[ Parent ]
False claims (none / 0) (#43)
by Builder on Mon Sep 09, 2002 at 03:54:27 AM EST

At what point in my review did I ever claim to be sane? Sanity is not something I have time for right now.

Besides ... what's the worst that can happen? I've got to replace this shopping app on one of our sites anyway. I'll get a real coder to look it over before I make it live ;)
Be nice to your daemons
[ Parent ]

Java API Javadocs (4.00 / 1) (#21)
by Matrix on Sun Sep 08, 2002 at 11:42:27 AM EST

The official Sun Javadocs are horrible for learning the language or library. If you're using them for this, you're using them wrong. Its like being presented with a Unix command line and trying to learn the system by reading man pages - you just aren't going to be able to do it.

On the other hand, once you already know the language and libraries, its a great reference for checking exactly how things work.

But its by no means intended as an introduction to the language or library.

"...Pulling together is the aim of despotism and tyranny. Free men pull in all kinds of directions. It's the only way to make progress."
- Lord Vetinari, pg 312 of the Truth, a Discworld novel by Terry Pratchett
[ Parent ]

The SOLUTION (4.00 / 1) (#24)
by obsidian head on Sun Sep 08, 2002 at 01:39:25 PM EST

You're not the target audience for the javadocs.  Instead buy the Java Class Libraries books.  These are the most important documentation on Java for beginners/intermediate.

They come with patient discussions, diagrams, etc.  But in an elegant way.  Go to the bookstore and you'll see.

The problem with the online Javadocs is that they're a sparse ref for what an object should support.  It's best in conjunction with the sourcecode, which I dip into occasionally when I need to see a subsystem's characteristics.

[ Parent ]

oh YEAH !!! (none / 0) (#51)
by ceallach on Mon Sep 09, 2002 at 10:12:59 AM EST

I've been using these books since '97 and they are, bar none, the only useful Java reference books available. Meaningful, with examples, they discuss how and why to use each and every class.

Of course they are useless as a learning material, but tutorial books are one time reads anyways...

More smoke! The mirrors aren't working!!!
[ Parent ]

I find them immensly useful (none / 0) (#40)
by X3nocide on Sun Sep 08, 2002 at 10:40:25 PM EST

But not as a tutorial documentation. They're good for when you forget how a certain function should be used. They can also be helpful when used in conjunction with the source code to the API. What they aren't helpful in doing is explaining why you should use a Vector over a Hashtable or how to implement a simple data structure in Java. There are books out there; some have mentioned "Thinking in Java" as a good source. Personally I picked up Java from an excellent CIS Professor who wrote his own book as an introduction to many fundamentally important CS concepts (logical structures, objects). His text is available online, but it isn't the absolute best for teaching a language to a motivated learner; it falls into the trap of hurrying into GUI related systems to keep students "interested." Of course there may be concerns about the correlation between interested students and retention rates in the undergrad program, so I understand and accept.

[ Parent ]
True, but... (none / 0) (#42)
by jesushatesyou on Mon Sep 09, 2002 at 01:40:57 AM EST

I agree that you shouldn't use references as tutorials, but even as a reference I think the javadocs aren't as good as they could be... They focus too much on semantics and function and too little on explanation and overview. They are very, very dry. There is some crossreference between classes, but not enough. Reading the javadocs I always feel like I can't see the forest for the trees.

I'm probably dumb for trying to use the API javadocs to learn stuff, but the textbooks I've bought are pretty light weight (despite being fairly thick) - they don't contain much reference material, but have lots of tutorials and lots of computer sciencey-parts (scalability,algorithms, whatnot). There is LOTS they don't cover, but which I need to use for my projects, and which the javadocs don't tell you how to use. I suppose it comes down to how many books you want to buy...

I've bookmarked your professor's textbook; sounds like just what I need, particularly the GUI bits.

[ Parent ]

To be fair... (none / 0) (#60)
by X3nocide on Mon Sep 09, 2002 at 05:28:16 PM EST

These days GUI systems and class hierarchies aren't designed with hand tweaking in mind; honestly, (JFrame.getContentPanel()).add(new JLabel("What ugly code")) just doesn't fly with GUI design. People work better with visual systems that have management of object properties presented in a regimented and subdivided manner. Any professor that requires a lot of AWT work out of you without explaining this and how to use critical parts of the framework effectively isn't doing a good job teaching.

[ Parent ]
Missing the point (none / 0) (#50)
by ennui on Mon Sep 09, 2002 at 08:49:27 AM EST

Javadocs are generally not there to show you how to do something. Javadocs describe what things are, and how they behave, code examples and cookbooks are outside the scope of javadocs. There's plenty of tutorial-type things to show you how to do something.

Your AWT complaint is a good example. Basically, you're saying you want code spoonfed to you for every class, and your assertion that even "figuring out basic stuff" is like "pulling teeth" is another indication that you are the Problem, as figuring out basic stuff should be fairly easy by definintion.

"You can get a lot more done with a kind word and a gun, than with a kind word alone." -- Al Capone
[ Parent ]

Sounds to me... (5.00 / 1) (#7)
by Irobot on Sun Sep 08, 2002 at 09:23:55 AM EST

Based on the lines:
The solution to this problem (which can be found here) says
Answer 2: If you tell us your solution, we'll post the best one.
it sounds to me like they're attempting to apply the "release early, follow up with patches" for a book. Certainly not the best way to do things, especially in a "tutorial" book.

As far as including the APIs goes, it's almost understandable - the thickest computer book on my shelf is Java Master Reference, which is an encyclopedia of Java that weighs in at over 1500 pages. (Great book to have for both beginners and more advanced Java programmers, although it only covers up to 1.1 and doesn't make a very good tutorital.) Obviously, even if the API was included for a minimal set of classes, there are still issues with using classes that haven't been introduced in the text.


The one important thing I have learned over the years is the difference between taking one's work seriously and taking one's self seriously. The first is imperative and the second is disastrous. -- Margot Fonteyn

Release early... (5.00 / 1) (#11)
by Builder on Sun Sep 08, 2002 at 10:19:26 AM EST

I could understand a release early philosophy for 1st edition, but this is 3rd edition. There's been enough time.

I think the problem here is that the excersise is so vaugely worded that there is no way to provide a definitive solution.

Be nice to your daemons
[ Parent ]
There are better books (5.00 / 3) (#20)
by bodrius on Sun Sep 08, 2002 at 11:33:13 AM EST

This "tutorial" clearly has some glaring faults. I must confess I ignored it almost completely because some of those you mention:

"This book claims to be aimed at both new programmers, experienced object-orientated programmers and programmers experienced with procedural languages."

Beware of any book that makes this claim. 99.99% of the time they are completely unable to fulfill it. If they use the terms "definite reference" at any point as a description of their book, make that 100%.

"The first downside is that the tutorial is practically useless without Internet access. Many sections refer you to the Java API documentation on the Sun web site for further information. Not being able to refer to the web site will leave you confused in the coming sections of the book. All of the answers to the exercises are on the Sun web site so you need that access to validate your solutions. Don't even bother to try working through this book on the train!"

There's not much you can fault the book for here. Java is almost useless without the API documentation at hand, and the API documentation is almost useless unless in Javadoc-style hypertext form.

Java is not C. It's not a systems programming language whose power is mostly in the minimal core functionality. It's an object-oriented application programming language, whose power is in great part due to an extensive standard library and the core objects on which its built.

Most bad Java books I know duplicate the Javadocs in the text as a sorry excuse to charge for an extra 400 pages. If you really need a hard copy of the Javadocs, buy one, but the usual practice is to keep either an open Internet connection or a downloaded copy (or both) and check it as you work.

"Next, the book does not introduce concepts and build on them. Many of the better programming tomes that I have read introduce each concept and then build on those."

The most glaring fault of this and almost any other introductory book or "tutorial" I have read on any programming languages. In particular, this is why I almost instantly dropped the Dietel & Dietel "How to Program Java" book on Java my college required and picked a better book.

Any book that starts asking you to do something complex before you understand the basics, much less what you're doing, is an immediate failure as an introduction. Unfortunately, it seems some authors are worried that unless you get the readers to code some GUI at once on the screen they will not be motivated to learn, but then why would they have picked up the book in the first place?

"My last big problem with this book is the quality of the code in the examples ... These formatting problems include non-indentation between braces and other issues that will confuse a new programmer."

Worse than that, they will encourage new programmers to follow those bad habits. After all, it's in the book, and it will take them some time before they stop imitating the style of the book.

There are better introductory books out there, but the best recommendation I think has already been made, but I'll repeat it anyway: get "Thinking in Java" by Bruce Eckel, from his "Thinkin in *" series (C++, Python, now C# and who knows what else).

I downloaded that book "to start with", planning to buy some O'Reilly books and sell my cursed Dietel&Dietel, and it was the only reference I needed (besides the Javadocs) to learn Java as a language. I still keep it in my hard disk, along with "Thinking in C++" which I got as well to supplement my old C++ reference.

Note that these are good Introductory Books (TM), and while they do that job extremely well (IMO) they are not complete references or deal properly with advanced topics. They are not meant to.

You'll have to get some books on specific topics (threading, awt/swing, maybe jdbc, j2ee, etc) after you get a decent command on the language, and the O'Reilly books are a good supply of those, but I don't think their books are as good tutorial/introductions as these.

Freedom is the freedom to say 2+2=4, everything else follows...

Java is a system language (5.00 / 1) (#25)
by obsidian head on Sun Sep 08, 2002 at 01:45:44 PM EST

Java is not C. It's not a systems programming language whose power is mostly in the minimal core functionality. It's an object-oriented application programming language
Not true. Java the language is a systems language for the JVM, just as C is Unix's system language.

Jython and others are the application languages. Programming in Java is mind-deadening.

[ Parent ]

OT: Deitel & Deitel (5.00 / 2) (#29)
by fluffy grue on Sun Sep 08, 2002 at 02:32:20 PM EST

The D&D books all suck, horribly. All of the C/C++/Java courses at NMSU use Deitel & Deitel. All three books are basically the same; there's "C programming, with C++ and Java," "C++ programming, with C and Java," and "Java programming, with C and C++." The mixture of languages is just to boost the pagecount, the part specific to the language is short, inaccurate, and doesn't stick to ANSI standards, it doesn't make any logical progression between concepts and seems to just be a random mishmash of everything thrown together, and all of the code is basically the same between all of the books, only with, for example, printf replaced with cout or system.out.println. They never even really teach object-orientation except as a vague soup of terminology (oh, and of course they include lots of useless stuff on UML which only confuses matters even more).

Back before the Deitel & Deitel homogeny, cs.nmsu used A Book On C for C and Stroudstrup's text for C++, and all was good. The D&D books are just horrible, though, and there must have been some sort of political/financial collusion to cause the switch all around.
"Is a sentence fragment" is a sentence fragment.
"Is not a quine" is not a quine.

[ Hug Your Trikuare ]
[ Parent ]

Bullshit (5.00 / 1) (#36)
by medham on Sun Sep 08, 2002 at 08:37:56 PM EST

Eldritch Wizardry? Queen of the Demonweb Pits? The first DMG?

Back up this bullshit in the future.

The real 'medham' has userid 6831.
[ Parent ]

1st sent, 2nd para: homogeny/hegemony [NT] (none / 0) (#37)
by MTremodian on Sun Sep 08, 2002 at 08:45:13 PM EST

...speed overcomes the fear of death.
[ Parent ]
Not really (none / 0) (#39)
by fluffy grue on Sun Sep 08, 2002 at 08:56:22 PM EST

It's a state of everything being the same, and of having disparate things which are marked by a common descent. That is homogeny. I suppose that it could be argued that the department head and whoever else was involved in selecting the books are a hegemony, but Deitel and Deitel themselves are not a dictatorship, nor are the textbooks. :)
"Is a sentence fragment" is a sentence fragment.
"Is not a quine" is not a quine.

[ Hug Your Trikuare ]
[ Parent ]

True. (none / 0) (#53)
by farmgeek on Mon Sep 09, 2002 at 02:39:34 PM EST

I learned C ages ago, mostly through the manual that came with the Mix C Compiler, and then promptly forgot most of it when I quit using C.

Last semester I took a C++ introductory college course that used D&D's C++ book.

I distinctly remember having to page forward several chapters to find some piece of info to finish an assignment in the chpater we were in.

Very annoying, not to mention the hopelessness of ever trying to find something you had already read.

[ Parent ]

Lecturing from it is even worse (none / 0) (#56)
by fluffy grue on Mon Sep 09, 2002 at 03:02:37 PM EST

"I have a question... how do you (foo)?"

"That's pretty simple. If you turn to page... uh... just a second... um, no that's not it... hm, I can't find it in the index. Just a moment... ARGH, I'll just write it on the board."
"Is a sentence fragment" is a sentence fragment.
"Is not a quine" is not a quine.

[ Hug Your Trikuare ]
[ Parent ]

Thinking in Java (4.00 / 1) (#55)
by avdi on Mon Sep 09, 2002 at 02:53:04 PM EST

I beg to differ.  Everyone brings this book up in Java discussions, but I found it to be roundly awful for learning Java.  I think it's a rotten book unless you happen to be completely new to programming.  Yes, he explains a lot of the OO concepts well; but the book moves as slow as mollasses.  His pedantic examples aren't terribly applicable to the real world as I recall, and he seems compelled to print the entire source code to every example inline.  If one little change is made, the whole bloody listing has to be reprinted.  The repetition in some of these reaches absurdity at some points - "Let's write a container class for strings, whose code will take up pages and pages of this book. Now let's do it again, for every single &^@#ing type in the java language ".   Couple that with the enourmous fonts the book is written in , and you get a book that's much thicker than it should be.  The font actually makes the code less readable too, because so many lines have to be split to fit on the page.

I finally ground to a halt 2/3 of the way through this book.   Sometime later I picked up "The Java Programming Language" from Sun's press, and learned everything I needed to know in a couple weeks or less.   It's complete, straightforward, and to the point.  What's more, it doesn't waste any time on Java advocacy - it just presents the language, warts and all.

I would recommend Eckel to absolute beginners, either learning to program for the first time, or learning OO for the first time.  Anyone with a fair amount of experience with any other OO language will be bored stiff by it.

(For reference, other computer language books I favor are K&R, The C++ Programming Language by Stroustrup, Programming Perl, Programming Ruby, and Mark Pilgrim's fantastic Dive into Python (although David Beazley's Python Essential Reference is excellent as well)).

Now leave us, and take your fish with you. - Faramir
[ Parent ]

Introductory VS Reference Books (none / 0) (#58)
by bodrius on Mon Sep 09, 2002 at 04:32:40 PM EST

As I clarified at least once in my comment, the "Thinking in *" are good INTRODUCTORY books. They are meant to deal with the fundamentals, and to target beginners.

If you're an experienced programmer that's extremely comfortable with OO-concepts, those books are not for you. You may skip ahead to the advanced books and the reference books, as you can with any other OO language other than Java... it becomes a matter of sintax, for which you don't need a didactic book.

Reference, recipe-list and catalogues, or "Learning X for Y programmers" books work better in that way. Those are the books you'll be consulting frequently anyway.

On the other hand, don't be so quick to dismiss introductory books just because you're an experienced programmer. I wish I had learned C++ with the "Thinkin in C++" book, because I had some fundamentally bad approaches to OO programming due to my college's C++ book which I repaired after reading "Thinking in Java".

Going over good introductory books is always a good idea... if you find yourself saying "yeah, yeah, I know that" frequently and dropping the book soon, that's a good sign, and if you're a programmer it speaks well of the book too.

Freedom is the freedom to say 2+2=4, everything else follows...
[ Parent ]

Intro to Programming vs. Intro to Language (5.00 / 1) (#59)
by avdi on Mon Sep 09, 2002 at 04:48:27 PM EST

I guess I mistook your use of the word "introductory" to mean "introductionto language x" rather than "introduction to programming".  It's quite true that those are to very different genres, with completely different requirements.

And you're right that there are a lot of awful "Intro to programming with C++" books out there that are really "C Programming in C++".  I've heard good things about the recent Accelerated C++ by Andrew Koenig and Barbara Moo - it takes the novel approach of actually using all of Standard C++'s features in an integrated fashion from the very beginning, rather than shoving Templates and Exceptions into a tiny final chapter labelled "advanced features".

Now leave us, and take your fish with you. - Faramir
[ Parent ]

Product Reviews Category - SWOT (4.50 / 4) (#23)
by mortisimo on Sun Sep 08, 2002 at 12:56:38 PM EST

Maybe K5 should have a product review category. You could then link to a site that carries the reviewed product and offers an affiliate program. K5 could keep a list of referal IDs and the referal bonus could be donated to CMF as an extra source of income. Whether it is implemented in some automagical way by scoop or placed manually by the author or editor is irrelevant to me. Regardless of the tone of the review, a review is still advertising right? It is bringing awareness of a product or service to K5 users, so why not make a buck or two?

Consumer reports from the trenches?

As a general rule I avoid computer books with more than two authors. They are usually patched together poorly and often cover the same material twice or reference things not covered in the amalgamated version.

The most important reviews... (4.00 / 2) (#33)
by orangecutter on Sun Sep 08, 2002 at 04:56:28 PM EST

...are those that praise low-profile books or condemn high-profile ones. Natural selection takes care of the rest. This review is an example of the latter and is therefore valuable. Can I suggest Deitel and Deitel's Java How to Program (4th Edition) which takes things slowly but builds concepts slowly with tangible results usng Swing applications? Its downside is that it's slightly large, and you might prefer something that's shorter and more to the point.

Sort out your work problems by talking to others
That playing card code SUCKS!! (5.00 / 1) (#45)
by Rasman on Mon Sep 09, 2002 at 05:48:21 AM EST

First of all, who could order the static suit values such that Card.CLUBS > Card.DIAMONDS??

Also, why does value 13 (king) have a static variable but jack and queen don't? How stupid is that? All the other cards, except "ace", are pronounced the same as the number. So they wanted to have for loops from ACE to KING. I should still be able to:

Card yourBestBet = new Card(Card.QUEEN, Card.HEARTS);

I've written several card libraries in Java and whoever wrote these knows very little about playing cards. Sure, you can argue that their code "works", but any coder will tell you there's a lot of really crappy code that "works".

Brave. Daring. Fearless. Clippy - The Clothes Pin Stuntman
Alternative Review (none / 0) (#46)
by codemonkey_uk on Mon Sep 09, 2002 at 06:00:08 AM EST

The ACCU Review of the The Java Tutorial (1st Edition) was quite positive. Does the 3rd no longer come with the hypertext version on CD? One of your major complaints seemed to be access to it, and yet, as far as I remember, the book comes with it, and the SDK docs on CD.
"The most savage controversies are those about matters as to which there is no good evidence either way." - Bertrand Russell
I agree (none / 0) (#61)
by biggs on Tue Sep 10, 2002 at 12:54:40 PM EST

I havn't read the 3rd edition, but I tried learning java from the newbie perspective from this tutorial and was totally confused. Introducing Classes and objects from the conceptual perspective is to over-whealming for a newbie programmer who has a hard time taking things on faith. The newbie programmer will start to get confused about function scope variables and member variables... what they all mean and what they accomplish if everything is introduced at once.. no matter how well it's explained. The best path to learn programming is to start with learning the C basics under C++, then gradually get introduced to OOP through C++ because it forces you to think about what's going on more than java does... The best source for introducing OOP gradually is the freely available Bruce Eckel book thinking in C++, it shows you OOP-like C code... points out where it could be improved and shows a logical evolution to OOP. Once you know OOP in C++ the sun java tutorial is great for explaining how java works. I mean how mystical is the "this" pointer/reference and the heap/stack to a newbie programmer getting started in java? You shouldn't have to ever be like "well i don't really know what's going on but it seems to work..." when you program... And the sun java tutorial will make the newbie programmer feel that way.

"Rockin my 'hell I made it' wetsuit stitch so I can swim in elevators crazy wet through piss" -Cannibal Ox
Haven't we moved away from Java? (none / 0) (#62)
by egg troll on Tue Sep 10, 2002 at 01:46:30 PM EST

Everyone knows that Java's biggest liability is the fact that its extremely difficult to port. God forbid you need to have your Java application run on both a Macintosh and a Windows box.

However, Egg Troll has found a solution. As one of the most talented programmers around, we're sure you'll agree with our statement when we say that if portability and cross-platform uses are your goal, there's really only one language to choose from.

He's a bondage fan, a gastronome, a sensualist
Unparalleled for sinister lasciviousness.

I kind of agree... (none / 0) (#66)
by questionlp on Fri Sep 13, 2002 at 04:40:07 PM EST

I think Flash/Shockwave has taken over most of the flashy animation stuff that most people used Java applets for mostly because there are plugins available on the Mac and PC (though it could be better on the Unix side of things).

As far as corporate applications, web applications and "enterprise" development... I think Java is a great fit since most companies have already standardized on a set number of platforms (be it x86/Win32, SPARC/Solaris, PA-RISC/HP-UX, etc.) and both J2SE and J2EE have been made available for the key platforms, portability isn't that much of a problem (except for Linux and FreeBSD). Of course, many companies are looking using .NET instead of Java on the x86/Win32 platform.

Just my thoughts...
-- http://closedsrc.org
[ Parent ]

A good reference (none / 0) (#63)
by trimethyl on Tue Sep 10, 2002 at 09:03:55 PM EST

I found the online Java tutorial to be a good reference for one who has already learned the core of the Java Language. But it isn't for anyone new to programming, or even object oriented programming.

The Java Tutorial is more of a good API reference than anything else. It helps you learn to build useful applications in Java. But no, it doesn't teach you the language.

Review of The Java Tutorial, Third Edition | 66 comments (49 topical, 17 editorial, 0 hidden)
Display: Sort:


All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!