Head First JavaScript

Head First JavaScript
Authors
Michael Morrison
ISBN
0596527748
Published
11 Jan 2008
Purchase online
amazon.com

So you're ready to make the leap from writing HTML and CSS web pages to creating dynamic web applications. You want to take your web skills to the next level. And you're finally ready to add "programmer" to the resume. It sounds like you're ready to learn the Web's hottest programming language: JavaScript. Head First JavaScript is your ticket to going beyond copying and pasting the code from someone else's web site, and writing your own interactive web pages.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Kristie Kachelmeyer said
This book is great for people who learn by doing...there are plenty of examples and activities in this book to help you learn

rsessler said
I knew a tiny bit of JavaScript going into this book, so I was a little worried it would be too elementary. And it does spend a fair amount of time covering programming basics, but it ended up being a good refresher in that regard. What really makes the book shine are the practical topics such as validating form data and debugging JavaScript. I also finally understand what the DOM is and how to use it.

Paul Welch said
I thought the J Phillips review said it all. My difference with Phillips is that I do appreciate the approach (as stated by Head First), annoying as it can be. As a satisfied customer of HF HTML/CSS, and after some frustrating attempts to learn PHP, I took what I thought was a logical step and ordered Head First Javascript and pre-ordered the soon to be released HF PHP/MYSQL. I found the first chapter fair, not good, but what might be expected with the HF method. In then I got to chapter two.

Phillips wrote:

"Another hugely important element of learning to program from a book is the act of following and typing examples on your own computer. You simply cannot expect to absorb the syntax, style and structure of programming without feeling it "under your own fingers" so to speak. This seems like a no-brainer. The problem with this book is, you're never actually sure when you're supposed to be entering code yourself, and the author gives you no clear indication of a hands-on "plot" to follow."

You know, it's almost understated. I went through chapter 2 several times wondering what the author wanted me to do. I started asking myself if I was some kind of idiot for not knowing what to do in a Head First book.

I'm sure you are looking beyond this sentence and thinking obsessive-compulsive. I can't stop myself.

Please, allow me to elaborate:

page 33: intro paragraph on storing data + funny picture
page 34: message = scripts store data + obnoxious Brain Power question
page 35: message = there are three data types
page 36-37: exercise / identify the data types
page 38-39: answers to exercise
page 40: message = constants stay the same, variables change
page 41: exercise / identify the constants and variables
page 42: answers to exercise
page 43: Fireside Chat /Variable's message = I vary; Constant's message = I'm consistent
page 44: message = a variable is a storage location with a unique name; create a variable with 'var'
page 45: message = initialize a variable with '='
page 46: message = create a constant with 'const'
page 47: message = you can change a constant where it is created + exercise "Identify the Constants and Variables!" (see page 41)
page 48: answers to exercise
page 49: There are no Dumb Questions (He does try) + Bullet Points
page 50: message = variable names are called identifiers
page 51: naming identifiers
page 52: naming variables (camelcase)

by the way we are at 20 pages)


page 53: exercise / more about naming variables
page 54: exercise answers
page 55: (think Etta James "At last...." what appears to be a terminal objective; could it be that we are going to learn how to create this script/form on page 55?
page 56: not yet..let's take a closer look at the actual form
page 57: okay, let's break down what calculations our script will need to perform
page 58: let's take a look at the form again....what! We are getting $NaN in our totals?? That's bad...very bad. Uhm...What's $NaN?
page 59: okay we got $NaN, that's bad. So, let's look at the code. My god! It's truncated. Anyway, our mission is to find out what is wrong with the code. why are we getting the mysterious $NaN? You could be like me at this point and:

(you'll have to open a beer to be really like me)

1. notice the blindingly obvious un-initialized constants
2. wonder if you are supposed to write out the code to experience the error for yourself
3. drift off for a few minutes
3. wonder if after doing Head First HTML/CSS and chapter 1 of Javascript if you should be expected to easily create the page
3. gaze upon other more interesting code: ie. What's that document.getElementbyId thing do?
4. try to create the code yourself, but ultimately say "f*ck it", download then open donuts.html, and initialize the constants
5. move onto page 60 with a real bad feeling about the book

page 60: ah...the answers to the exercise (the constants weren't initialized!)
page 61: uhmm once more with feeling 'Initialize' those constants
page 62: (Etta James 'At laaaast...') $Nan is not a number (thanks) + There are no dumb Questions
page 63: the form that you probably didn't create is not working properly. This is an odd problem. The customer ordered 9 donuts, but got "more". Why? While, Morrison doesn't tell you to go back and look at the code, I will do that anyway. I will try to answer the fuzzy problem. OK, while I know now, I couldn't for the life of me know then. Why should I have known?

page 64: oooohhh! Strings of text!!!
page 65: a quick and dirty guide to parseInt() and parseFloat() + message = relax
page 66: the question - Why are extra donuts being ordered? My answer: What was that document.getElementbyId thingy.
Page 67: exercise / fill in the missing code (wow! there are those document.getElementbyId thingies again) and make the number of donuts add up correctly
page 68: the answers and perhaps the real eye opener to this text. We are expected to use what we learned on page 65 to fill in the missing code which was -parselInt(document.getElementbyId("cakeDonuts").value-

Not only that, the answer to the problem is actually on page 67 between the directions and the cloze passage. So if you think the missing code is actually really missing and therefore not sitting before your face and you go looking elsewhere in the universe of your mind for the answer, you are wrong. And if you are thinking what is the point, what is document.getElementbyId, what is .value, relax, OK, think of Matt Damon ... got his image in your mind? It's not your fault. It's not your fault.

page 69: Bullet Points + Congratulations....for doing what?
page 70: new problem statement
page 71: well, what do you know! document.getElementbyId poorly explained in all its out-of-context glory. While I have been disappointed with and wondered what the point of the preceding 37 pages were, this is the first time I actually went huh?
page 72: validation; document.getElementbyId further explained; isNaN thrown in for good measure

(40 pages and still counting...written any code lately?)


page 73: JavaScript Magnets exercise: if/else, tossed into the picture
page 74: JavaScript Magnets exercise solution
page 75: message: You are great
page 76: There are no dumb questions (they keep getting stranger and stranger because dumb questions are supposed to be rather dumb, but now they are appearing complex due to the immense conceptual void created by the text)
page 77: problem statement (you need to allow users to use either 12 or 1 dozen; back to parseInt
page 78: p77 cont.
page 79: more of the last two pages, but you discover you have ADS
page 80: there's the crossword puzzle on page 81 (I wept, the end is near!)
page 81: crossword puzzle
page 82: answers to crossword puzzle
page 83: go ahead bend the page you retard.
page 84: I have to say that page 84 perfectly sums up Chapter 2 of Head First Javascript.

Morrison does not seem to have an understanding of enabling objectives. HF asks if you prefer a dinner conversation to a dry presentation of facts. OK, think 'My Dinner With Andre', and cut it with the dinner scene from 'Eraserhead'. Imagine how many times you will say, "What is this?" then double it. By the way, if you need a companion guide to this book try 4 short videos from an 18-year-old, for free, from uTube's JavaScriptTeacher. He will put HF Javascript to shame and its babble into some context.

I'm limited to one star.

mark said
If you are expecting the same detailed, coherent, basics-to-details approach that has been so successful in other Head First publications, forget it. It's as if this book's authorship was outsourced to someone who is unaware of what has made Head First one of the premier names in technical education. Poor overview of basic concepts, rambling examples, confusing diagrams, etc. I own at least five other Head First publications and this one it not even close to them. Spend you money elsewhere.

Michael J. Muprhy III said
This is a good "first book" on JavaScript. It's not nearly as good as the HF Java books, which clearly are the forte of the whole series. I have moved on to a more advanced JS book, but I felt this one really was a useful introduction that definitely made me feel better about wading in deeper. If you are looking for a decent kickboard and doggy paddle type of book that will keep you interested (and the rhino book can induce a coma), it's a good one. You'll get some DOM manipulation examples, basic form validation, and a handy introduction to object oriented JavaScript. I'm only giving it three stars because it's not one stop shopping, you will want to follow up with a more advanced book immediately after.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The trouble with programmers is that you can never tell what a programmer is doing until it's too late.” - Seymour Cray