Cover of JavaScript: The Definitive Guide

JavaScript: The Definitive Guide

David Flanagan
#534
59.8 score
16 mentions
8 threads
15 commenters
Score Breakdown
Component Scores — Weighted Analysis
Sentiment
38.6
Mixed
Substance
56.2
Substantive
Diversity
97.5
Extremely Diverse
Story Qual.
59.3
Good Stories
Discussions · 8 threads
devjab · hn↗

> Which is why they picked the name ... Is that really true though? As I understood it JavaScript was mainly adopted because Java was popular at the time. JavaScript originally shipped as LiveScript, and they changed it to JavaScript later. Here is a nice quote on it from Brendan Eich: “The name JavaScript was chosen when Java was hot, and we were doing LiveConnect to hook up JS to Java applets.” Here is one from David Flanagan: “JavaScript was originally developed under the name Mocha… It was renamed JavaScript in a co-marketing deal between Netscape and Sun Microsystems.”

telemachos · hn↗

This is tangential to the main thread, but the weirdness that is hoisting surely confuses a lot of people. (To clarify: hoisting seems to me to be more or worse than just "there's no block scoping.") Just now on my the subway ride home I came across this example from David Flanagan's JavaScript: The Definitive Guide: var scope = "global"; function f() { console.log(scope); // Prints "undefined", not "global" var scope = "local"; // Variable initialized here, but defined everywhere console.log(scope); // Prints "local" } I'm someone who uses Javascript…

christo · hn↗

I know there's some redundancy in this advice but I thought I'd mention it to support the great tips already here. Practice. Read and write a lot of code. You might try to work your way through set problems like Project Euler or the Ruby Quiz or other competitions. Learn the "laws of physics" of programming - some things are harder to do than others. all programming is an interplay between making a tiny, trivial and deterministic step on one hand and managing complexity through abstraction on the other. it's most instructive to try things for yourself - even if you fail - but on the other…

axod · hn↗

First of all, do NOT start by using a javascript library (prototype, jquery, etc). Learning a library isn't half as useful as learning the language. So, get a copy of O'Reily Definitive guide, Start working through that. Watch the Douglas Crockford lectures from Yahoo. Install firebug and start messing around. "Hrm I've read about the arguments.callee property. Lets play with that for a few minutes and see how it works" etc etc The main thing is just to explore, get down to the nuts and bolts, see how it all really works. Try things out, and see if they work or not.

TimTheTinker · hn↗

This was from 2002, when most JavaScript was authored and consumed as "JavaScripts" - little opaque snippets you could download from places like dynamicdrive.com and paste into a script tag to add some kind of "dynamic" effect to a page (hide/show content on click, for example). It was almost universally thought of as a toy language that wasn't even as good as VBScript. It took David Flanagan's JavaScript: The Definitive Guide and Douglas Crockford's JavaScript: The Good Parts for people to begin taking it seriously. Prior to that, any serious client-side code was authored as a Java applet…

edw519 · hn↗

"I want to code the site using PHP and a bit of Java-script, but my skills with these are not exactly up to the job yet." You must understand that you need to learn 2 separate things and you need to learn them well. For javascript on the client you need nothing other than the browser you already have and the Rhino book: http://www.amazon.com/JavaScript-Definitive-Guide-David-Flan... Learn what's in this book! Go through all the exercises and tutorials. Build something. You can augment the book with tutorials you find on-line (ex. Webmonkey). Then you can View Source on any web page…

miguelpais · hn↗

The book is very concise and probably one of the books with higher ratio of relevant content per page. It also teaches you the grammar of JavaScript in one of the most simple and unambiguous ways I ever seen in a book (railroad diagrams). On the other hand it was one of the shortest book I ever read in which I had to reread and go back more times. JavaScript can be a bit confusing at times and the book only says things once and in a succinct way. Everything was going fine until Prototypes and Constructors and the very bad 'new' operator, that somewhat surprisingly was used in the good…

tlrobinson · hn↗

I learned JavaScript from The Definitive Guide before The Good Parts came out, so maybe my opinion is skewed, but I don't think Good Parts covers enough material to be useful on it's own (Good Parts doesn't cover DOM APIs at all, for example). I can tell you Definitive Guide also sat next to my desk to serve as a reference for a long time, though most of the same material can be found on https://developer.mozilla.org/en/JavaScript http://www.w3schools.com/js/default.asp and many other websites.

keefe · hn↗

It sure would, I just don't think there's any reason to mess with low level stuff like XMLHttpRequest objects. For javascript itself, this book is always good : http://www.amazon.com/JavaScript-Definitive-Guide-David-Flan... If you haven't seen O'Reilly's safari yet, that's quite a nice program if you are still in school learning a variety of things.

CyberFonic · hn↗

Since you already know C, you also know most of JavaScript. The syntax is very similar. I would suggest loading up nodeJS and using it in REPL mode to work your way through the basics. printf = console.log() - without the formating :-( Then starts the hard part of getting a handle on DOM. I recommend David Flanagan's "Rhino book" and Douglas Crockford's articles which you may find at www.crockford.com. In my experience Chrome and Safari developer tools let you explore effectively. Although reading the W3.org standards documents does help clarify difficult points.

← Back to Index