Slashdot Mirror


Head First Java

honestpuck writes "Earlier this year I decided to learn Java. I'd spent some time using JavaScript without really getting my hands too dirty but I'd pushed it way to far and realized I needed a bigger hammer. Grabbing a copy of Learning Java, 2nd Edition from O'Reilly I started learning. First problem, I have to admit I've stayed away from object-oriented programming; after all, I've been writing software for nigh on twenty years without it - why make life hard? Sure, I understood the concepts and I'd done a little but never in a language so strongly committed to OO as Java." Read on for honestpuck's review of Head First Java, which he compares in style and content to Learning Java. Head First Java author Bert Bates, Kathy sierra pages 650 publisher O'Reilly rating 8 reviewer Tony Williams ISBN 0596004656 summary Good, offbeat Java tutorial with new approach to learning computer topics

The Good

Of course, you can't learn Java without a good understanding of object-oriented languages. I made fairly heavy going with 'Learning Java' until I decided to dive in head first. Head First Java, that is -- a new book from O'Reilly that has a totally different attitude to teaching than I've seen before in computer books. It also looks like this might be the start of a series from O'Reilly, the website an introduction seem to assume that there will be more 'Head First' titles and I hope so. The style is humorous, full of graphics, cartoons, puzzles, quizzes and crosswords. It reminds me of the textbooks that used to try and teach me geometry and algebra in high school or my daughter's elementary books on Roman and Greek history I purchased for her at the British Museum. The style didn't work to teach me much algebra and geometry, but I wasn't anywhere near as motivated. This time, it worked. In a couple of weeks I worked through the book and finally have Java skills where I can branch off and start coding the projects I had in mind (though something more advanced will be required soon.)

In the introduction the authors examine learning and explain why they designed the book as they did. To quote from one section: "Some of the Head First learning principles. Make it visual. Put the words within or near the graphics. Use a conversational and personalized style. Get the learner to think more deeply. Get -- and keep -- the reader's attention. Touch their emotions." They argue that our brain is tuned to novelty, and that their style provides the novelty to keep your brain turned on. They also provide ten tips for good learning. That's one thing that seems to set this book apart from most other computer books, they say they think of their reader as a learner and indeed that's the way you are treated by the book. You can start to get a feel for their ideas by visiting headfirst.oreilly.com, a site devoted to the series. You can also grab a couple of example chapters from the books web page, which also has the usual marketing info, table of contents and errata.

The Bad

When compared to Learning Java the coverage is not as good. Head First really only covers the basics, up to and including creating a GUI with SWING and then touches a number of others; Learning Java goes on to explore, with a fair depth, network programming, web programming, servlets, applets, Java Beans, XML and other topics that are only touched on briefly in Head First. If the style of learning does not suit you then this will be an incredibly irritating and useless book, I'd give it a try first, though. If it isn't for you then the style of Learning Java might be better.

Conclusion

When you get down to it, though, the only way to really decide on the worth of a tutorial is to decide how well it teaches. Head First Java excels at teaching. OK, I thought it was silly, I had a hard time making myself do the exercises, fill out the crosswords and solve the puzzles. Then I realized that I was thoroughly learning the topics as I went through the book. Learning Java was doing the same job, but the dry traditional method wasn't doing as well. Both books are well written, designed and constructed -- the style of Headfirst Java just made learning, well, easier.

It would seem to me that the 'Head First' approach is going to work wonderfully for the more 'beginner' topics, books for introducing you to a new style of programming, a new language or a radically different operating system or application. So if you're looking for a book to introduce you to Java then I can recommend Head First Java. Now if I could only find a book as good to introduce me to Common Lisp.

You can purchase Head First Java from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

19 of 327 comments (clear)

  1. I await a review of... by PHAEDRU5 · · Score: 5, Funny

    ..."Mr Bunny's First Cup o' Java"

    --
    668: Neighbour of the Beast
  2. Re:Misconception by Anonymous Coward · · Score: 5, Funny

    It is almost like somebody saying - I wanted to study cartography because I already know something about cars.

  3. Re:Misconception by M-2 · · Score: 4, Informative

    The current W3C approved release of it is, I believe, currently referred to as ECMAScript, in an attempt to separate the two. (The ECMA is a European governing body on standards, and I do not recall what it stands for at this time).

    I wouldn't mind seeing them separated like that - it would make more sense and minimize confusion, as well as the interleaving of books in bookstores. "Java... Javascript... hell, they must be the same thing!"

  4. Re:I'd like to take this oppertunity.. by pheared · · Score: 5, Insightful

    How can Java be slow? It's a language. Languages typically can not be quantified by speed.

    Implementations are a different story, however. What you mean to say is that in your non-benchmark toting experience, Sun's Java Runtime Environment, version 1.4.2 is slow. On this, I will agree.

    You might want to investigate the other implementations of the JRE out there. IBM has one that is reportedly quite good. (Well, one person has told me it was worth it.) There is also Blackdown.

    Regarding licensing, I also agree. It's muddy at best, and akin to selling your first born to Sun at worst. Depending on your vantage point, of course. ;)

  5. Try Thinking in Java 3rd Edition by nih · · Score: 4, Informative

    best book on java imo, and its free to try out
    http://mindview.net/Books/DownloadSites

    --
    I'm a rabbit startled by the headlights of life :(
  6. OOP for the procedural programmer by djrisk · · Score: 4, Informative
    I too had some problems w/understanding object-oriented programming. I was strong w/procedural languages, and your standard top-down programming style, but I struggled grasping the concepts of OOP.

    I found "The Object-Oriented Thought Process" to be a great jumping-off point in helping me familiarize myself with how to think in-terms of OOP.

    The intro to OOP chapters that are in most introductory books are OK, but they just didn't do enough for me.

  7. The best way to learn Java... by barcodez · · Score: 4, Informative

    if you want to learn a particular Java aspect look at Sun Java Tutorials. (they are excellent a free).
    If you want to leatn OO programming and Java I would suggest Think In Java (it's the best and it's free).

    --

    ----
  8. Re:I'd like to take this oppertunity.. by sahala · · Score: 5, Funny
    You, sir are 100% correct.

    I'm going to send a memo to the top 300 US companies (any index, take your pick) and inform them that all this time they were wrong about implementing business solutions in Java. Why? Because you (mallocchio) took the "oppertunity" to say that it "sux". Instead they should be using something light, like C, or maybe even assembly if they're hardcore enough. I mean, all these hundreds of corporations can't possibly be right. Their projects obviously have all failed because they used Java.

    I mean the only reason Java is popular in the enterprise world is because of Sun's wonderful marketing department. Those sneaky bastard marketers ... they got the best of us. I mean they totally did their jedi mind trick on me -- I'm gonna have to cut off my head now because it's now known after your esteemed declaration that "Java sux".

    P.S. I know you're trolling.

  9. Best Series For Learning Java by jyuter · · Score: 4, Interesting

    Has got to be the Core Java Series. Between the fundamentals and the advanced books, I haven't found anything as complete and as clear as this.

  10. Viewing at level 5 by 955301 · · Score: 4, Funny

    This is the first time I've tried to look at a story with 63 comments with my threshold set to 5, no comments showed up!

    Somehow I knew though, when the article starts with I decided to learn Java because Javascript wasn't good enough., that there would be trouble!

    Begun, the Javascript != Java flamewars have.

    --
    You are checking your backups, aren't you?
  11. Re:Java is bad for our industry by bmj · · Score: 4, Insightful

    The dot com years produced millions of Java "programmers" that did not how to do much beyond blindly mimicing the Sun "Pet Store" J2EE example without understanding the fundamental concepts that underpin the technology.

    How many other languages can you fill in the blank with? VB? C# (soon?)? Perl?

    Sure there are folks who "learned" Java and really don't understand it. And sure, most of them are out of work...but calling it a "glut" is a bit of an overstatement. Most of those people won't find work in the industry. And if you're good a programmer, and work for a good company, you're still making good money these days (at least where I live).

    There's a huge glut of programmers on the market with little or no experience using any other programming language other than Java.

    So what if that's the only language you know? If you're a good Java programmer, what's the problem? I know a couple guys who just graduated with degrees in computer engineering. They "learned" plenty of languages in 4 years, but they only know one language well enough to use it professionally -- either C or Java.

    --
    Whereof we cannot speak, thereof we must be silent. --Ludwig Wittgenstein
  12. it's inevitably necessary to have simpler books by 192939495969798999 · · Score: 4, Insightful

    I saw some 6-year old kids talking the other day. Kid 1: Have you seen my website lately? Kid 2: no. Kid 1: It has a new layout now. Kid 2: cool!
    It's only a matter of time before these kids will want to learn JAVA, and a basic, picture-laden book is sure to attract their attention quicker than a tome that they probably can't even lift.

    --
    stuff |
  13. Re:Misconception by sokeeffe · · Score: 5, Insightful

    No, he has not fallen under any misconception.

    His problem was that he found that he could not achieve what he wanted using a javascript (an arguably limited web-baed scripting language) and decided to move to another language with more powerful features.

  14. Re:I'd like to take this oppertunity.. by mydigitalself · · Score: 4, Informative

    well considering you opted for the coward route, how is anyone going to take you up on that one!

    plus, i entirely disagree with you, i have php applications that pull data from mysql faster than an equivalent java application.

    the JAVA advantages, for me, are:
    - OO through and through
    - scalability in the form of J2EE
    - well writen java is a pleasure to read and understand
    - cross-platform
    - fantastic package library and 3rd party packages
    - sun screwed up and gave it away!

  15. Them Java Coders by inertia187 · · Score: 4, Funny

    About them Java Coders,
    codin' here and there.
    Just like Gosling's Keynote said,
    Java's Everywhere!
    Them platform neutral Java Coders,
    runnin' hotspot mode.
    Keep them classes nice and neat,
    'til it turns bytecode.
    Multi-threaded Runnables,
    and Serialization,
    keeps those members all in line,
    avoiding race condition.
    How to be a Java Coder,
    here's thee easy way:
    Go to sun.com's web site
    and get the SDK.

    --
    A programmer is a machine for converting coffee into code.
  16. Re:Stay away from it..... by botzi · · Score: 4, Informative

    This is far, far, too far away from being the best book on Java.

    I'll even argue that this is not a good book at all. As always Mr. Eckel is going on and on with a 2-3 pages of reflections and a small piece of programming practices(everyone who've tried to read the C++ thinking, know for what I'me talking about), so my point is :

    1) The book will be confusing for a beginner programmer.

    2) It'll be useless for the most part to a person with some general programming culture.

    Anyway, the best book to start with java is "On to Java", I don't even remember the authors but it's everything: Short, explicit and well structured. A problem may be that it should be a bit outdated.......

    Of course, all one really need to start programming in Java is here

    --
    1. No sig. 2. ???? 3. Profit!!!
  17. OO techniques are seldom fully understood by boster · · Score: 5, Informative

    The majority of developers do NOT fully understand OO principles. There is a difference between learning the syntax and the basic features and understanding how to leverage them. Most OO developers can write and use simple classes, use inheritance and basic polymorphism. This is generally all that is taught in courses and language books. This is also sufficient to get most things done. :) However, most people this level of knowledge do not understand just how much more can be done. A good example of more powerful OO programming is in the Gang of Four book. The conceptual leap from procedural to basic OO programming is but the first step. I guess what I'm getting at is that once you're at this point where you're using basic OO techniques, then there's still a lot more you can learn (even if you know each and every language feature and its syntax). Just be aware of that and look into it someday.

    --
    Madness takes its toll. Exact change please.
  18. Writing Learning Java... by patniemeyer · · Score: 4, Interesting

    Hi, I'm Pat Niemeyer, the author of Learning Java. As I sat down this morning to begin work on the fifth edition of the book for Java 1.5 I was
    pleasantly surprised to see this item on Slashdot (my first stop of the day). So I thought I'd chime in with a little bit about what it's been like working on this book over the years and ask for you help in making it better.

    The short story is that trying to authoritatively cover a topic as broad as the Java language and libraries and to do so without simply producing a giant shelf-filling reference tome or dry as toast text book is a very difficult challenge. I think there are parts of the book that have met this challenge and parts that can be better in the future.

    Now, I consider myself to be a relatively funny and creative person (also sexy, and other adjectives as well) and I think if someone had asked me back in 1995 what my first book would have been like I might have imagined something a bit lighter and breezier than an 800 page book about a programming language. But I think that the Slashdot audience in particular will appreciate that despite its size and some obligatory coverage, this is a book written by someone who has a passion for software and architecture and that I have tried to pour my creativity and time into crafting elegant, insightful, and *minimalist* examples. I wrote this book for people who think and learn the way that I do and that may not appeal to everyone.

    I think the strongest parts of the book are in the most exciting and difficult areas of Java - topics such as advanced networking, multi-threaded
    programming, and XML. IMHO Learning Java's coverage of these topics is deeper than some single topic books in their entirety.

    The Java language is a moving target and one that gets more moving parts every day. The greatest challenge in writing about it now is not what to cover, but what to leave out. I have spent many many hours on the phone with my editor (Mike Loukides) over the years debating about what we need to include and what we need to cut. In recent editions which have included a CD in the jacket (yah, I know... book CDs are normally useless) I have started moving the old, less relevant material (such as some of the original AWT API stuff) to the CD.

    I have also experimented with the introductory tutorial chapter - trying to give a broad overview of the whole language in one chapter before diving into details. Some people may see that and be turned off. I hope they'll dig a little deeper.

    I am very interested in what Slashdot readers have to say about how to make the book better. Your comments would be very well timed right now as I am updating the book for Java 1.5 as we speak.

    I hope you'll check out my book if you need to learn (or learn more about) Java. If you have already mastered Java then I hope you'll buy a copy of my book and give it to a homeless person ;);)

    Thanks,
    Pat Niemeyer
    Author of Learning Java, O'Reilly & Associates and the BeanShell Java scripting language (www.beanshell.org).

  19. Re:EWD 696 by TheWanderingHermit · · Score: 5, Informative

    "The habit of using pictorial aids, like any habit, is very difficult to get rid of. If, however, we take any responsibility for the effectiveness of our thinking habits, we should try to get rid of the habit as quickly as possibile, for it is a bad habit, confusing and misleading up to the point of being paralysing."

    Anyone who would say that obviously has no knowledge of how people learn and how different people learn with different styles.

    As someone who spent 10 years with learning disabled and emotionally disturbed students, I can say one of the most effective teaching aids for ANYONE is finding out how they learn and presenting material in the style in which they absorb it the best. Since I worked with those who had the most difficulty learning, I had to learn as much as possible about how we ALL -- disabled, "normal", or gifted learn.

    In a nutshell, anyone who can make a statement like the one above is ignorant. It has the sound of someone who is so busy showing off how intelligent he or she is that he has yet to realize how little he knows about people.

    Perhaps it was written by someone who does well with the style of learning he describes because he spends all his time in books and on the web and has not yet learned how to deal with the real world yet.