----------------------------------------------------------------------- FAQ Topic - What books are recommended for javascript? -----------------------------------------------------------------------
Although many books have been reviewed, most are quite bad and cannot be recommended.
The following list of books been approved by some c.l.js regulars and has been reviewed and discussed on the list.
_"JavaScript: The Definitive Guide,"_ 5th Edition, By David Flanagan. ISBN: 0-596-10199-6
-- Postings such as this are automatically sent once a day. Their goal is to answer repeated questions, and to offer the content to the community for continuous evaluation/improvement. The complete comp.lang.javascript FAQ is at http://jibbering.com/faq/index.html. The FAQ workers are a group of volunteers. The sendings of these daily posts are proficiently hosted by http://www.pair.com.
> ----------------------------------------------------------------------- > FAQ Topic - What books are recommended for javascript? > -----------------------------------------------------------------------
> Although many books have been reviewed, most are quite bad and > cannot be recommended.
> The following list of books been approved by some c.l.js regulars > and has been reviewed and discussed on the list.
> _"JavaScript: The Definitive Guide,"_ 5th Edition, By David Flanagan. > ISBN: 0-596-10199-6
Crockford's book is worth mention. It has been "reviewed" and "discussed" on the group. It is a good book written by a thoughtful programmer sharing valuable insights.
> Crockford's book is worth mention. It has been "reviewed" and > "discussed" on the group. It is a good book written by a thoughtful > programmer sharing valuable insights.
I haven't read them, but I wondered how Crockford's books didn't stack up. What constitutes a review?
On Tue, 2 Dec 2008 at 21:42:10, in comp.lang.javascript, Peter Michaux wrote:
<snip>
>Crockford's book is worth mention. It has been "reviewed" and >"discussed" on the group. It is a good book written by a thoughtful >programmer sharing valuable insights.
It's been mentioned but not truly reviewed.
In my opinion the book is too opinionated to be called good. The author shows several signs that he doesn't understand enough about javascript and doesn't understand much about the mainstream OO languages.
Even if you don't agree with that you have to agree with what he says in the preface : "This is not a book for beginners".
Peter Michaux wrote: > On Dec 1, 4:00 pm, "FAQ server" <javascr...@dotinternet.be> wrote:
> Crockford's book is worth mention. It has been "reviewed" and > "discussed" on the group.
You should post up your review, too.
It is a good book written by a thoughtful
> programmer sharing valuable insights.
Although there are code examples, I do not feel that this book serves as a guide for how to program javascript.
It contains useful information, but would do better to mention specific issues with implementation bugs.
Doug advocates modifying built-ins' prototypes.
In particular, he declares Function.prototype.method.
Function.prototype.method = function (name, func) { if (!this.prototype[name]) { this.prototype[name] = func; }
}
The arguments against modifying built-ins' prototypes have been discussed. For example, it is often said that "don't modify what you don't own" or "others might not be familiar with your version of a method (for example, a toFixed method that returns a prepended +/- sign, or does rounding). Not mentioning such arguments seems biased. Instead, the arguments should be presented to the reader.
The book needs more technical review. Here's a little.
pg 39: Explanation of closures: The "bad" example uses the variable |i|, the "better" example uses the variable i, but in the body of the function, has |alert(e)|, instead of |alert(i)|. The changed variable prevents the example from showing that the explanation is correct.
The book mentions implementation problems with RegExps. If it is going to mention problems with implementations, it should be much more thorough about it. In particular, the form of using an identifier in a FunctionExpression results in JScript interpreting a function expression and a function declaration which applies to the example of the "function statement" (I have explained in previous threads why this is the wrong terminology).
The regular expression part has a mistake.
var parse_number = /^-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?$/i;
Matches all of: parse_number.exec('3.'); parse_number.exec('3.E3'); parse_number.exec('009.E0'); parse_number.exec('-0.3');
Pg 55. The explanation of "parts" is a good explanation of the essentially good part about javascript.
I agree that it is a pretty good book, but could be improved.
// No octal or hex numbers are allowed. function ok( str ) { var re = /^0$|^[-+]?(?:0\.\d+|[1-9]\d*(?:\.\d+)?)(?:e[-+]?\d+)?$/i return !!str.match(re)
}
var s Print('--- First, the bad.\n') var bad = '00|3.|3.2.5|3.E3|3e|3e3.2|009.E0|07|.8'.split('|') for each ( s in bad ) Print( s, ' ', ok(s), '\n' ) Print( '--- Now, the good.\n') var good = '0|-0.3|0|9|+3.14|2.72|44e-1|7.5e22'.split('|') for each (s in good) Print( s, ' ', ok(s), '\n' )