From: David Mark on
On Jul 20, 3:55 pm, William Wallace <wbravehea...(a)googlemail.com>
wrote:
> On Jul 20, 9:19 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
>
> > Good.  In many cases feature detection is all that is needed.  Feature
> > testing comes in to play when features exist but are known to be buggy
> > in some cases (this is where the libraries typically regress back to
> > browser sniffing).  Taken to an ultra-paranoid extreme you could
> > assume this about all features.  But of course, not all features are
> > easily testable.  It's an imperfect world, but with experience and
> > good practice, you can approach perfection rather than flirting with
> > disaster.
>
> Had to snip a lot of great info. Saved and absorbed.

Glad I could help.

> Dude, write a
> book, I'll buy a copy.

I get a lot of that. I have been working on a book on-again and off-
again for years. The trouble is that there is not a lot of motivation
as I can make a lot more money writing code than writing about
code. ;)

I suppose if some savvy publisher advanced me, oh, 50K or so, I'd get
right on it. As it is, the one I talked to was in a completely
different neighborhood (one that I prefer to avoid, at least after
dark). :)

> It seems that there are no good books.

You are learning fast. But the publishers see "good books" as books
that will sell the most copies. The representatives I dealt with were
of the opinion that "everyone" is really excited about "these
libraries" (e.g. jQuery). They sent me an outline of one to look at
(and review) and I asked them if it was going to be a children's book
and indicated that the only sort of jQuery book I would consider
writing would be of the contrarian view. I think that and my high
asking price turned them off, but I do still hear from them from time
to time. Maybe some day they will realize that somebody has to take a
chance and publish something fresh. I mean, in five or ten years, who
is going to care about jQuery puff pieces?

> You
> could get Thomas to proof-read it. LOL - that would be fun :)

I think Thomas would make an excellent technical editor for a book on
JS. But fun? :)
From: Thomas 'PointedEars' Lahn on
William Wallace wrote:

> On Jul 20, 5:00 pm, Erwin Moller
>> You can also do it like this:
>>
>> <body onLoad="whatever();" onUnLoad="whatever2();">
>>
>> Why do you want to use addEventListener ?
>> If you give more context, the good people in here can give you better
>> advise.
>
> I'm doing everything from an included JS file,

Don't do that, then.

> [...] I find that on this group, the less context given the better. [...]

Are you *really* *really* *very* sure about that?

<http://catb.org/esr/faqs/smart-questions.html#beprecise>


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Hans-Georg Michna on
A general problem with books on actual JavaScript usage is that
things age so quickly. After a few years every book is outdated.

That limits sales.

Hans-Georg
From: David Mark on
On Jul 21, 1:58 am, Hans-Georg Michna <hans-
georgNoEmailPle...(a)michna.com> wrote:
> A general problem with books on actual JavaScript usage is that
> things age so quickly. After a few years every book is outdated.
>

Oh I don't know. JS has been pretty static for over a decade. The
DOM implementations add new features, but I'm still using a lot of
cross-browser code from the turn of the century (most of it originally
written with IE5/NN6 in mind). It's not the browsers, it's the book
authors (who don't understand browsers).

And lately the major browsers have converged to become nearly
indistinguishable (save for added proprietary features). It's the ill-
advised designs of most "cross-browser" libraries that make everything
so hard. That's why they too have very short shelf lives.
From: Erwin Moller on
William Wallace schreef:
> Had to snip a lot of great info. Saved and absorbed. Dude, write a
> book, I'll buy a copy.

I second that.
It is annoying to browse through books/websites that contain
misinformation, bad practices, etc.
It is hard to become good at JavaScript/DOM without investing huge
amounts of time into it.

So: Go Mark! Not for the money, do it for the Karma!

Regards,
Erwin Moller


--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare