Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Head First JavaScript 76

stoolpigeon writes "Head First JavaScript is one of the latest entries in O'Reillys Head First series. Like the other Head First books, it takes a somewhat unique approach in conveying information. The stated intent of the series is to help readers learn and retain material by formatting it in a manner that assists in meeting those goals. This means that the book is full of graphics, exercises and humor. There is also a refreshing note on who will benefit from the book. I've pretty much always thought of these sections in books as entertaining, in that I get to see what new way a publisher has found to say, "Everyone should buy this book!". Head First Javascript actually does a decent job of describing who this book will help, and who it will not help. That alone had me intrigued right from the start." Read on for the rest of JR's review.
Head First JavaScript
author Michael Morrison
pages 615
publisher O'Reilly Media Inc.
rating 9/10
reviewer JR Peck
ISBN 0-596-52774-8
summary A Brain-Friendly Guide
Who is this book for? It is for someone looking to learn JavaScript, with access to a computer and a desire to learn the material through writing code and working through a variety of written exercises. The book begins with the very basics of scripting and as it states, is probably not going to be enjoyed by an experienced programmer who is looking for a JavaScript reference guide. There is a lot of white space, drawings, pictures and opportunities to do the exercises I mentioned as well as the answers to those exercises. For the experienced coder just looking for an api or methods and properties, this will probably feel like a bloated waste of time.

Someone like me on the other hand, who would like to take a JavaScript class but just doesn't have the time, this book was just what I needed. I have done some programming, so I did breeze through some portions of the book, but in others I didn't mind the review. I like having new information and ideas soak in over time. This book is paced just for that kind of learning. It is possible though for someone to be too new to the topic. Some understanding of html and css would really be helpful. Someone who doesn't have at least an idea of how those technologies work may struggle a bit. Though I would think a little time with google would provide everything necessary to be up to speed.

There is an 8 page introduction that explains the reasoning and methods behind the books approach. The "Read Me" portion gives some great insight into just what this book is like. It begins, "This is a learning experience, not a reference book." and follows that up with seven main points. To summarize them, the book teaches what someone needs to know to get up and running. It is not exhaustive, it does not go over the history of the language. There are many finer points not addressed. Using multiple browsers would be helpful to the reader working through the book. Skipping activities will greatly reduce the value of the experience. There is quite a bit of redundancy, it is on purpose and beneficial. The examples are as slim as possible to focus on what matters and finally, not all exercises have definitive answers. If any of that turns your stomach, this really may not be for you.

The format does pretty much make reading straight through the book without working the exercises a waste of time. This was my biggest challenge with the book. If I wanted to read it I needed a pencil, my laptop, free time and somewhere I could work through at least a whole exercise at a time. This wasn't something I could fit in 20 minutes a night before bed. The authors recommend making it the last thing read before bed, but the end of my days are too busy to fit an exercise in. I found that a lunch hour, or a quiet week-end afternoon were my best opportunities for learning.

When I found those times, the book was thoroughly enjoyable. The humor was corny at times but almost always funny. I even chuckled out loud more than once. The exercises are widely varied as are the interspersed scenarios and stories that accompany the examples. I downloaded the necessary images for examples from the books web site though I avoided using downloaded code. It caused more errors due to typos, but I felt like I did better typing in the examples myself. I enjoyed working the cross-word puzzles and reading the 'interviews' with various pieces of technology. The time invested was much greater than for any other tech book covering similar ground, but I felt like the return justified the added time.

The style and humor reminded me quite a bit of the Dietel and Dietel How to Program books. I think that the scope is similar as well, as far as beginning from the very basics and building with each chapter. Head First starts with a basic description of just what JavaScript is and what it adds in the form of interactivity and finishes with a chapter that gives a good introduction to Ajax. In between the reader learns about all the basics like variables, looping, user input, validation, control flow, functions, code reuse, objects, etc.

As a hobbyist I felt like this was a great introduction to JavaScript. I think it gave me a foundation to build on and the ability to use more of the materials freely available on the web. Sometimes there is just so much of that out there, that it is difficult to know where to start. One of my primary goals in reading this book was to put together a couple simple web apps for myself as well as to get a better understanding of using the DOM for some Firefox plugins I would like to write. This book met those needs.

I think it is good to mention though, one last time, this is not a no-nonsense reference manual. In fact there is lots of non-sense and it is actually quite a bit of fun. But if the idea of 2 or 3 pages of big pictures to get across a couple simple ideas about data types bothers you, don't spend the money on this book. It will just annoy you and you will probably feel ripped off. On the other hand, if you've picked up hefty programming manuals and found that you didn't make it a quarter of the way through, and didn't remember much of the quarter you did finish, this approach may be much more friendly and give you a taste of success. And what good is a more information dense book if you don't read it or learn from it?

The table of contents gives a short summary of each chapter and a breakdown by section. The section titles are good for finding a place you read or stopped but wont always help find a topic. They are often named with the name of the exercise, not the subject they address. The index is good though and will help quickly track down topics. Like many new O'Reilly books, this one comes with 45 days free access to the electronic version of the book on Safari. The books site, linked above, has the table of contents, index, code examples and the complete second chapter available for viewing and/or download.

You can purchase Head First JavaScript from Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Head First JavaScript

Comments Filter:
  • by Millennium ( 2451 ) on Wednesday March 26, 2008 @12:50PM (#22870788)
    Anyone who isn't willing to do whatever they need to do to learn good JavaScript isn't worthy of any programming/web design job. Even if that means using a book.
  • Maybe I'm wierd (Score:4, Insightful)

    by scubamage ( 727538 ) on Wednesday March 26, 2008 @01:05PM (#22870954)
    I love the head start books from a purely learning perspective. I've reccomended Head First Java and Head First Design Patterns to at least 5 people so far who are just getting their feet wet with programming, and if this book runs along a similar vein I can imagine it makes a great FIRST book. Obviously these aren't good reference books, but they make it easy and pretty fast to get the basic material across for people who don't like the lack of personality in traditional "Learning XXXXX" books. I may have to check this out.
  • Re:Not a fan (Score:4, Insightful)

    by moranar ( 632206 ) on Wednesday March 26, 2008 @01:06PM (#22870968) Homepage Journal
    Why try two of them? It's not like the style differs from one to the other. Plus, it's clearly stated in the first pages what the style will be (or you can infer it from the text anyway), and that the books are not meant as references like "Javascript, the definitive guide" is.

    Seeing how every O'Reilly book has a free chapter for download at the website, I don't think there's any excuse to feel ripped off, even when buying from a digital store, where it is harder to check the book (not that I imply this is your case).
  • Re:Not a fan (Score:4, Insightful)

    by DaveV1.0 ( 203135 ) on Wednesday March 26, 2008 @01:16PM (#22871078) Journal
    Different strokes for different folks.

    This is why I always advise people looking for a book on a computer topic to pick up two or three from different publishers and read a little bit of each one. That way they get a feel for the tone of the book and can choose the one that fits best with them.
  • by Mongoose Disciple ( 722373 ) on Wednesday March 26, 2008 @01:16PM (#22871094)
    I actually mostly like the Head First Design patterns book. There is a lot of noise there, but they do a pretty good job of explaining the patterns and illustrating cases in which you'd want to use them. Most of the developers I've worked with could benefit from it -- the only thing worse than a developer with no exposure to design patterns is one for whom a small selection of patterns is a hammer and everything looks like a nail.

    I have the Gang of Four book also as a reference manual, but it is just that. I would say that trying to read it straight through, to me, is like trying to read a dictionary, except I honestly consider a good dictionary to be much more approachable. It's a book I have handy because it's the definitive work, not because it's easy to read or the best way to learn the concepts.
  • by larry bagina ( 561269 ) on Wednesday March 26, 2008 @01:18PM (#22871114) Journal
    Javascript (and php, vb, etc) gets a bad rap from copy/paste "programmers". You could read the ecma specification and mozilla has adequate documentation, but using google as a tutor is a lot like digging through a septic tank in the hopes someone shit a quarter.

  • by mysqlrocks ( 783488 ) on Wednesday March 26, 2008 @01:22PM (#22871162) Homepage Journal

    Doing a course on design patterns last semester we were directed to the Head First Design Pattern books. I refused to open it as a matter of principle so I can't vouch for the quality. It's just impossible to concentrate with all that noise on the page.

    I used the HFDP book to teach a class on design patterns and it was a great resource. I'd recommend it over a dry text book any day. My take is that most people who dismiss the HF books are intellectual snobs who think if learning isn't painful it means you're not learning. The HF books are based on solid learning principles and, IMHO, they work.

  • don't buy it (Score:3, Insightful)

    by acidrain ( 35064 ) on Wednesday March 26, 2008 @02:58PM (#22872402)
    I have a copy of the previous version of this book and as a senior engineer I found it terrible. It's targeted at people who need to be coddled into thinking about simple technical things, and that coddling (read: stupid jokes and silly pictures) just gets really annoying when you are actually in the mood to read useful information. The JavaScript "nutshell" book is an amazing reference however, in that it gets right to the point and doesn't gloss over useful details. It is hard to believe they were printed by the same publisher.

To write good code is a worthy challenge, and a source of civilized delight. -- stolen and paraphrased from William Safire