Crockford's JavaScript, The Good Parts (a book review).

B

beegee

I nearly bought it, perhaps I will now.  I expect it should have been
called ECMAScript: The Good Parts but got called JavaScript for the
same reason there's "Java" in "JavaScript".  :)

This is true. Crockford doesn't cover CSS and DOM and he also doesn't
cover FileSystemObject and other command line third-party library
objects. It is about pure ECMAscript and 150 pages is what he needs
to cover it pretty well.

The book is very helpful to me, clarifies many things I was fuzzy on.
It's the only book on any language I've bought this year. It's
comparable to the "The C Language" by Kernigan and Richie. You
couldn't actually write programs from that book either but when your
program 'sploded it was that book that I turned to to find out why.

Bob
 
L

lorlarz

lorlarz meinte:

[crap snipped]

Just stop reading books, which scope you can't or won't understand.
Resort to Resig's alternatives.

Gregor

--http://photo.gregorkofler.at::: Landschafts- und Reisefotografiehttp://web.gregorkofler.com ::: meine JS-Spielwiesehttp://www.image2d.com     ::: Bildagentur für den alpinen Raum

Frankly, I just thing you Crockford fanatics are lazy and just want
to
read 100 pages and think you know something. You could hardly make a
single decent
interactive JS program appear in a browser with what is in that book
(and perhaps
couldn't). Yet, somehow Crockford claims to cover the "best parts"!
What a joke.

How are you going to
effectively and efficiently change the user interface? Crcokford does
not
help even the slightest bit here, though this is a major issue (just
perhaps not
one pat enough for crabby Crockford's taste). About 10 good books
Crockford
shows no respect for are the only sources to learn anything about
this,
including any principles of good coding in this area. He disrespects
the
hard work of a decade of hard-working book writers -- all people I
read and
learned greatly from (though admittedly many of the books were in some
ways "bad"
and often read like encyclopedias). But, Crockford's book is bad
because it is so
incomplete and its examples covering only a small subset of the
practical functions
in Javascript. Really good books show really good programs (at least
some) and they
actually appear in your browser. Crockford has written just another
very bad book,
from this perspective. CSS/DOM: Do the Crockfordians forget is
exists or that
there are many good/bad practices in dealing in this area??

Crockford's book (to be useful) really assumes you know at least many
many
times as much about JavaScript than is in the book. Crockford's
abstract
examples do not deal with much of the JavaScript a JavaScript
programmer uses.
Places where we need to have principles and best practices clarified.
CSS/DOM

Crockford is good in his small limited area. I learned from him and I
value
that learning. But the conceit of Crockford and disparaging other
books, when '
he writes just one that is outrageous limited and incomplete makes me
think he is an
old foggie.
 
L

lorlarz

 *language*.




This is true.  Crockford doesn't cover CSS and DOM and he also doesn't
cover FileSystemObject and other command line third-party library
objects.  It is about pure ECMAscript and 150 pages is what he needs
to cover it pretty well.

The book is very helpful to me, clarifies many things I was fuzzy on.
It's the only book on any language I've bought this year.  It's
comparable to the "The C Language" by Kernigan and Richie.  You
couldn't actually write programs from that book either but when your
program 'sploded it was that book that I turned to to find out why.

Bob

I agree with you completely EXCEPT that the title and things Crockford
says
in the book belie the extremely limited scope and extremely incomplete
and
partial coverage of the great JavaScript language I have been
programming in
and producing full browser programs with for 10 years.

No scholar should show the disrespect for other needed resources
Crockford shows,
Perhaps, Newton late in life could say there was no physics before
him, after he
published several huge works. But, such a situation is rare and
Crockford with his
100-page book (many pages filled with weird simple useless 'diagrams')
is NOT a body
of work that puts him in this position. Yet, he is so "good" (in his
own mind)
he misleads people with at
least implicit claims that the "good parts" are all there. I wonder
if Crockford
can even manipulate the DOM or CSS. Really.
 
J

Joost Diepenmaat

Frankly, I just thing you Crockford fanatics are lazy and just want
to
read 100 pages and think you know something. You could hardly make a
single decent
interactive JS program appear in a browser with what is in that book
(and perhaps
couldn't). Yet, somehow Crockford claims to cover the "best parts"!
What a joke.

If you seriously think the "best parts" of javascript is the ability
of change a div's style you are really not the target audience of the
book.

Next time, leave the programming books to the programmers.
 
L

lorlarz

If you seriously think the "best parts" of javascript is the ability
of change a div's style you are really not the target audience of the
book.

Next time, leave the programming books to the programmers.

Are these programs?:

http://mynichecomputing.com/ReadIt/translateT.html

http://mynichecomputing.com/GuideInfoandPlanner/UniversalDD.htm

http://mynichecomputing.com/hierMenu/HierMenuBuilder3.htm
builds http://mynichecomputing.com/hierMenu/ (menu itself is by
Danny Goodman,
builder is my addon)

http://mynichecomputing.com/digitallearning/yourOwn.htm

http://mynichecomputing.com/linkGuider/

Yes, they are. Programs a person can actually run in a browser and
show
something and do something and that people can use. Where are
Crockford's??
I believe he has none. (By the way, I use a JS library only in one of
the
above programs).
 
L

lorlarz

If you seriously think the "best parts" of javascript is the ability
of change a div's style you are really not the target audience of the
book.

Next time, leave the programming books to the programmers.

If you seriously think there are not great issues relating to DOM and
CSS
setup and how to use them, all your programs must be used only by
nerds
doing calculations and nothing that is used by, for example, teachers
and
students and real people building and doing real things.

There are great questions about the best way to setup DOM and CSS and
interact
with the user (and actually making things happen -- it's called user
interaction)
and do it well. Apparently
Crockford has missed all these issues, devaluing and insulting all the
great
books showing good ideas and good practices in this area. If you
think that the
way to actually create the changes and interactivity on a web site are
simple
clear and obvious or that there is only "one way", then you have not
built programs for people.
 
L

lorlarz

If you seriously think the "best parts" of javascript is the ability
of change a div's style you are really not the target audience of the
book.

Next time, leave the programming books to the programmers.

Not only hsve I been making JavaScript Programs for ten years. I am
a
Sun Certified Programmer for the Java 2 Platform (2000) and am a
Microsoft
Certified ASP.NET programmer.

Thus, I think I am a programmer. I also make programs people can see
and use.
Where are Douglas Crockford's?
 
J

Joost Diepenmaat

lorlarz said:
If you seriously think there are not great issues relating to DOM and
CSS
setup and how to use them, all your programs must be used only by
nerds
doing calculations and nothing that is used by, for example, teachers
and
students and real people building and doing real things.

There are great questions about the best way to setup DOM and CSS and
interact
with the user (and actually making things happen -- it's called user
interaction)
and do it well.

There are all kinds of questions that people seem to have about these
things, but the only interesting question is: "how do I make this
useful for the end-user" which isn't a programming question.

if your question is: how the hell do i make this work cross-browser
(boring, and still has more to do with searching through the
non-standard APIs for the top X browsers than actual programming - and
in the case of MS most of the non-standard APIs aren't even
exclusively JS APIs).

Also, any book answering question 2 will be out of date the moment
it's in the shops.
Apparently
Crockford has missed all these issues, devaluing and insulting all the
great
books showing good ideas and good practices in this area. If you
think that the
way to actually create the changes and interactivity on a web site are
simple
clear and obvious or that there is only "one way", then you have not
built programs for people.

As I said, those aren't programming problems.
 
L

lorlarz

lorlarz said:
Hey.  You really are being ridiculous.  The many many JavaScript
functions
for addressing and altering the DOM and addressing an altering CSS
are
_javascript_ functions.  

 [ blah blah blah ]
NOTHING HAPPENS WITHOUT SUCH FUNCTIONS, unless you
are
happy with alerts.  Really.  Get real.

I wasn't talking about browsers. Anyway, what makes you think alerts
are in the language?

regardless of the title of the book, it's about ecmascript:

http://www.ecma-international.org/publications/standards/Ecma-262.htm

alerts are not in the language. That is something in the browser.
Because
Crockford does not address anything that effect the UI, you would be
left
to alerts (something NOT in JS) because Crockford, the pompous ass,
does not
cover manipulating
UI. MY very point
 
L

lorlarz

There are all kinds of questions that people seem to have about these
things, but the only interesting question is: "how do I make this
useful for the end-user" which isn't a programming question.

if your question is: how the hell do i make this work cross-browser
(boring, and still has more to do with searching through the
non-standard APIs for the top X browsers than actual programming - and
in the case of MS most of the non-standard APIs aren't even
exclusively JS APIs).

Also, any book answering question 2 will be out of date the moment
it's in the shops.


As I said, those aren't programming problems.

There are as many choices and questions of good programming practices
and how to be efficient and have reusable or modular code in the CSS/
DOM area
as there are in the functional area covered by Crockford. Probably
many more
big issues. Only the other
books I listed with great examples to learn from can teach you this.

Actually, I believe Crockford dealt by far with the easiest questions.
The man
may not have the ability to deal in the challenging area of using JS
to effectively
build and change the UI. It's probably harder and perhaps too hard
for
Crockford (but he gives you all you need to process and turn out
numbers, perhaps).
Some people cannot take on challenging areas, because so much less is
so much less
pat.
 
E

Evertjan.

Joost Diepenmaat wrote on 19 aug 2008 in comp.lang.javascript:
There are all kinds of questions that people seem to have about these
things, but the only interesting question is: "how do I make this
useful for the end-user" which isn't a programming question.

No, there is more, Joost:

How do I programming for my hobby or work so much fun,
that sitting in front of the telly, or going farming is not more fun.

Programming can be done in style, with maximum compactness, with special
whit or etc., all transparent to the end-user, but necessary for your
enjoyment.

I find that to be far more interesting than the end-user.
 
L

lorlarz

There are all kinds of questions that people seem to have about these
things, but the only interesting question is: "how do I make this
useful for the end-user" which isn't a programming question.

if your question is: how the hell do i make this work cross-browser
(boring, and still has more to do with searching through the
non-standard APIs for the top X browsers than actual programming - and
in the case of MS most of the non-standard APIs aren't even
exclusively JS APIs).

Also, any book answering question 2 will be out of date the moment
it's in the shops.


As I said, those aren't programming problems.

Let's see how you do with your attitude. What have you actually
produced
for the Internet? Is there anything with a visible interface that
people
can interact with ? That's the test. Yep. Give a list of links like
I have.

Perhaps you are unfamiliar with issues because you haven't made
anything (?)
and simply do not appreciate the whole area and programming practices
here.
 
L

lorlarz

lorlarz meinte:
[snip]
Fortunately, I have read about 20 good JavaScript books (and contrary
to
Crockford there ARE good books) and what made them good was excellent
examples of manipulating CSS and the DOM.

Interesting. I haven't read another book than Crockford's and still can
write decent JS manipulating the DOM.
[snip]

Gregor

--http://photo.gregorkofler.at::: Landschafts- und Reisefotografiehttp://web.gregorkofler.com ::: meine JS-Spielwiesehttp://www.image2d.com     ::: Bildagentur für den alpinen Raum

Please put the program that manipulates the DOM using only what is
in Crockford's book up on the Internet. Give us the address. Let's
see that program which changes the DOM in interaction with the user.
I do not think you are telling the truth, since there is nothing in
Crockford's book about it, whether directly manipulating the DOM or
via
CSS.
 
P

Peter Michaux

[snip]

There is no "complete" book available to learn browser scripting.

I agree. You must read several books, preferable loaded with working
examples. Nothing like that in Crockford, so what he offers is
something
else. Style advice and principles of good coding, and that is all.
Very little,
esp. since dealing with things that AFFECT the UI is a huge topic area
not
dealt with at all by him.

He is not writing about UI *on* *purpose*!

[snip]
JavaScript doesn't have any UI so it is a good thing he didn't cover
it then.

Indeed JS has no UI of its own. What I meant of course is that
Crockford
covers NONE of the functions that interact with and change the visible
components
of the DOM (that which changes the UI for the user in response to
interaction, or
as time passes)

He doesn't discuss those things because they are *out* *of* *scope*
for his book.

Leaving out coverage of good uses of functions that manipulate CSS and
DOM
is a huge incompleteness to any presentation of JavaScript.

No it isn't. If a book is to discuss JavaScript in specific it should
*not* discuss CSS and/or the DOM.

It is not
like
there are not better and worse ways to do things here. For example,
one
big issue is CSS vs DOM manipulation, which both can accomplish the
same thing.
How to do thing correctly with good combinations of DOM features and
CSS and
then using the related functions is a HUGE area where we need to
develop good
practice.

Sounds like you should be writing "Browser Scripting: The Good Parts"
because no one has set out to do that yet.

I am being to doubt tha Crockford ever deals with anything people see
in a
browser, this extreme larger oversight is so tremedous.

It was not an oversight.

My point is: Even as a book that is trying to present just some best
practices
and principles for doing things, this book does less than half a job.

The book sets out to discuss the parts of the JavaScript language
which Crockford thinks are the good parts. That is a good idea for a
book.

The book, claiming to cover the 'good parts' of JavaScript is really
so misleading

I don't think so.
in making that claim as to be fraudulent.

I don't think so.

You seem to either desperately want the book to be something it wasn't
intended to be or your money back. I don't understand your motivation.

Crockford claims he does
twice a job
than what he actually does (and probably much less). The DOM
manipulation vs
CSS issue and best practices and principles to use here would fill 300
pages
(being just the same sort of practices and principles subset book that
Crockford's
is).

Crockford's description of what he is offering is so inaccurate as to
be delusional.

I didn't find it to be inaccurate. I'm somewhat dumbfounded that you
do find it inaccurate and are so angry and disappointed about that
misunderstanding.

By the way, I am no JS library lover. I do all raw and from scratch
in most of
my programs. SO I DO KNOW OF WHAT I SPEAK.

Good for you.

Peter
 
O

optimistx

lorlarz wrote:
....
Please put the program that manipulates the DOM using only what is
in Crockford's book up on the Internet. Give us the address. Let's
see that program which changes the DOM in interaction with the user.
I do not think you are telling the truth, since there is nothing in
Crockford's book about it, whether directly manipulating the DOM or
via
CSS.

Assume Crockford had considered for- statement and the object literal the
'good parts of javascript' in his opinion.

Then he wrote a book of those. Why would we complain? 'Good book, but wrong
topic!' ?
 
D

Dr J R Stockton

In comp.lang.javascript message <55ec33dc-ef70-4ef1-a102-5ac18a04d4b4@s5
0g2000hsb.googlegroups.com>, Tue, 19 Aug 2008 07:23:32, lorlarz
Not only hsve I been making JavaScript Programs for ten years. I am
a
Sun Certified Programmer for the Java 2 Platform (2000) and am a
Microsoft
Certified ASP.NET programmer.

Please give URLs for some of your work, so that we may assess its
quality and (maybe) learn from it.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 
L

lorlarz

In comp.lang.javascript message <468580d0-796d-46bb-b179-0cae2c710c8c@26
g2000hsk.googlegroups.com>, Mon, 18 Aug 2008 13:47:56, lorlarz


                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
That's clearly not a necessary condition; it may not even be sufficient.


Because JavaScript is independent of CSS and the browser DOM.

Javascript is NOT independent of the DOM and CSS _if_ you look at many
of the
functiions
in the language ARE and what they are FOR. There are many functions
for walking
the DOM, creating DOM elements, adding those elements dynamically to
the page
and another whole large set of functions also _in the language known
as
JavaScript_ for manipulating CSS and thus dynamically affecting the
page that way.

In the sense YOU speak, JavaScript is INDEPENDENT OF EVERYTHING. See
how
little sense that makes? Some day when YOU, like me, start making
actual
full-blown Javascript applications and stop being script kiddies, you
will
appreciate this point. People: start making Javascript Applications!!

And, finally (with respect to your material quoted below):
Javascript's MAIN use is for use in the web browsers (check your
history,
if you are unclear about this). The language was in NO WAY designed
to be
independent of the DOM, etc. ECMA standards NOTWITHSTANDING.
 
J

Joost Diepenmaat

[ reformatted for better reading ]
Javascript is NOT independent of the DOM and CSS _if_ you look at
many of the functiions in the language ARE and what they are FOR.
There are many functions for walking the DOM, creating DOM elements,
adding those elements dynamically to the page and another whole
large set of functions also _in the language known as JavaScript_
for manipulating CSS and thus dynamically affecting the page that
way.

Talk crap all you want. Those functions are NOT in the language. They
may or may not be provided by the host environment, if the host
environment is a browser, and feels like it.
In the sense YOU speak, JavaScript is INDEPENDENT OF EVERYTHING. See
how
little sense that makes?

It makes perfect sense. Just like the C language doesn't provide I/O.
Some day when YOU, like me, start making actual full-blown
Javascript applications and stop being script kiddies, you will
appreciate this point. People: start making Javascript
Applications!!

Like the "click a letter and a number" "application" you made? Please.
And, finally (with respect to your material quoted below):
Javascript's MAIN use is for use in the web browsers (check your
history, if you are unclear about this). The language was in NO WAY
designed to be independent of the DOM, etc. ECMA standards
NOTWITHSTANDING.

Designed or not, right now it definitely IS not bound to web browsers
specifically, and especially not to the DOM - or do you really tink
actionscript is marginal technology? Also check Netscape's own
server-side javascript initiative, which IIRC was created very soon
after netscape's browser-side javascript.
 
J

John G Harris

On Tue, 19 Aug 2008 at 07:23:32, in comp.lang.javascript, lorlarz wrote:

Thus, I think I am a programmer. I also make programs people can see
and use.
Where are Douglas Crockford's?

The algorithms in Knuth's famous books are written in a programming
language that won't run in any real computer. Are you complaining about
that as well ?

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top