By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Please help us Oh Great Masters

P: n/a
I bet 50% of the posts I've read lately have had at least one bad thing
to say about every website or book dedicated to javascript.

There are clearly a few posters (you know who you are) who either are
or consider themselves to be the "comp.land.javascript elite". You guys
may be the brightest, most seasoned developers out there, and hats off
to you. You may not be, how the heck would I know. But...

Not to be too critical (which sounds a lot like "Not to interrupt..."
which means clearly, I am planning to interrupt.....) but I've seen a
whole lot of these "Javascript elite" telling us beginners/hobbyists
just how much all the Javascript information on the web sucks, it's not
right, don't buy book A, B or C 'cause they all suck, no-one out there
knows what they're doing, prototype (and every other javascript library
out there) is junk.....yada, yada, yada.

Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it? While this newgroup may
be a respository of good (or even great and also some sucky)
information, it's also one hell of a bad way to learn to program,
especially given that we've only got incorrect websites and sucky books
to get us started. Seriously, God forbid I came to this newgroup and
asked "How do I program in Javascript". I'd get some long four page
monologue on how this newgroups isn't to do people's work for
them....blah, blah, blah.

So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.

Sep 12 '06 #1
Share this Question
Share on Google+
32 Replies


P: n/a
Tom Cole wrote:
<snip>
Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it? While this newgroup
may be a respository of good (or even great and also some sucky)
information, it's also one hell of a bad way to learn to program,
As far as javascript programming is concerned it is. There is a
constant parade of questions, many of which can be addressed with small
self-contained scripts which will then be subject to critical peer
review, allowing issues raised to be addressed/correct and the results
to be exposed to another round of critical peer review. You can learn
every well and very quickly by participating in such an environment.
especially given that we've only got incorrect websites and sucky books
to get us started. Seriously, God forbid I came to this newgroup and
asked "How do I program in Javascript". I'd get some long four page
monologue on how this newgroups isn't to do people's work for
them....blah, blah, blah.
More likely you would get a response suggesting that an ability to
create a well formulated and specific question is a pre-requisite for
good programming.
So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.
If you know what you are doing wrong stoop doing it and do something
else, whatever it was that informed you what you were doing wrong
previously should enable you to identify whatever is wrong in what you
do next.

Richard.

Sep 12 '06 #2

P: n/a

Richard Cornford wrote:
Tom Cole wrote:
<snip>
Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it? While this newgroup
may be a respository of good (or even great and also some sucky)
information, it's also one hell of a bad way to learn to program,

As far as javascript programming is concerned it is. There is a
constant parade of questions, many of which can be addressed with small
self-contained scripts which will then be subject to critical peer
review, allowing issues raised to be addressed/correct and the results
to be exposed to another round of critical peer review. You can learn
every well and very quickly by participating in such an environment.
I agree, my question was more from the perspective of a complete
beginner. He/she can't learn the fundamentals here, it would take
forever. Specific questions, on the other, sure...

The problem is everytime I've seen a newbie reference a book or
website, someone tells them how much junk it is. So where do they get
the core knowledge from in order to actually have a specific question?
I don't see any evidence where the "experts" in this group are helping
one bit to solve the problem of bad material. They just point it out.
(It's like telling someone, don't step there, there's poop. But no-one
ever cleans it up).
>
especially given that we've only got incorrect websites and sucky books
to get us started. Seriously, God forbid I came to this newgroup and
asked "How do I program in Javascript". I'd get some long four page
monologue on how this newgroups isn't to do people's work for
them....blah, blah, blah.

More likely you would get a response suggesting that an ability to
create a well formulated and specific question is a pre-requisite for
good programming.
That is exactly the response I would expect to get (and just got, your
point taken). But I bet I can draw a puppy better than you.... :^)
>
So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.

If you know what you are doing wrong stoop doing it and do something
else, whatever it was that informed you what you were doing wrong
previously should enable you to identify whatever is wrong in what you
do next.
"I" am doing fine. I've been scripting since very early on. And while I
don't have full mastery of the advanced concepts, it's because I don't
want to. If it gets that "advance" I'd prefer to use a tool more
designed for the task (IMHO of course).

The "I" I was using here is more of a royal "we". "How do we (newbies)
learn to program in Javascript". Apparently we have already learned how
not to (having been repeatedly told so by the comp.lang.javascript
elite). See what I mean?

But...there are tons of newbie's that post questions and I see more
snippy on-liners that seem more designed to remind the newbie just how
stupid we "perceive" him to be than actually helping. Telling someone
that something is a bad idea, telling them why it's a bad idea, and
then not telling them how to do it right gets one nowhere. I saw a
question recently that asked "What three good javascript books would
you buy?". Fair enough question. I prefer to learn by reading whenever
possible. I bet I've got more CS books in my library than any other
genre. So what response do you think he got? "There aren't three good
books.". Now that's funny. I personally found that to be not as true as
the "elite" probably meant it to be, but I got his point. There's only
one problem, not a single "good" book title was given. Not one. Ha-ha.
While this may not be a great example, there are 1000 more just like it
in this group.

Blame it on the coffee. There was no creamer this morning.
>
Richard.
Sep 12 '06 #3

P: n/a
Tom Cole wrote:
<snip>
Telling someone that something is a bad idea,
telling them why it's a bad idea, and
then not telling them how to do it right gets one nowhere.
What are you asking for then? Telling people how to do things badly?
I saw a question recently that asked "What three good javascript
books would you buy?". Fair enough question. I prefer to learn by
reading whenever possible.
I also prefer to read paper books.
I bet I've got more CS books in my library than any other
genre.
I have never owned a CSS book.
So what response do you think he got? "There aren't three
good books.". Now that's funny.
It is unfortunate, but true. In a world where an average javascript
book is filled with false statements about javascript, significant
omissions and advice ranging from the poor to the suicidal the best
that has been managed is the identification of one book that qualifies
as least bad (by some margin). The result is that no second or third
recommendation is possible.
I personally found that to be not as true as
the "elite" probably meant it to be, but I got his point. There's only
one problem, not a single "good" book title was given. Not one. Ha-ha.
One assumes that someone starting to post to c.l.j. has read the FAQ,
and so the one recommendation that exists.
While this may not be a great example, there are 1000
more just like it in this group.
Out or 30,000 posts a year?

By and large well asked/formed questions (in well-formed posts) with
subjects that could not trivially be acquired using search engines will
get reasonable responses (subject to the people who can provide those
answers having the time to write them).

Richard.

Sep 12 '06 #4

P: n/a
Tom Cole wrote:
>>Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it?
One of the problems is, when someone has an advanced understanding of a
topic, there is usually little desire to go back and write beginner-level
instructions. When you can write about more interesting topics like
closures, memory leaks, oo techniques, etc, why would you want to instead
spend time writing about how to include a js file on a page and field
questions from people at that level?

I think the best advice is to go buy "javascript: The Defintive Guide" and
use it as a resource until you understand javascript to the level that it
can teach you. At that point, you'll probably know enough to find the
resources on the web that will be most helpful.

I'm not saying I qualify as a "guru" in your definition, but I have tried to
write up some best practices and other information to help people step up a
bit in javascript:
http://www.javascripttoolbox.com/bestpractices/
and listed some key resources everyone should use:
http://www.javascripttoolbox.com/resources/
and tried to provide a "search portal" that only searches known-good web
sites and newsgroup authors for answers:
http://www.javascripttoolbox.com/search/

And really, in the end, most questions aren't really about javascript, but
about the DOM or different DOM behaviors in browsers. Javascript as a
language is not often the cause of problems.
I don't see any evidence where the "experts" in this group are helping
one bit to solve the problem of bad material. They just point it out.
I wouldn't say the experts aren't helping one bit. Look at the resources
attached to the FAQ. They are excellent write-ups of different topics and
extremely relevant.

But I do agree that much of the time spent here telling people that they are
wrong or trying to cater to the clueless could be much better spent writing
new articles, sharing robust code, and documenting browser quirks and
behaviors. It would be more benficial to all.
>>So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.
The problem of "elitism" in javascript is not unique. It is something that
happens in many technical discussion areas.
I made a post about this very topic a few years ago:
http://groups.google.com/group/comp....9c5756071c7e97
The "I" I was using here is more of a royal "we". "How do we (newbies)
learn to program in Javascript".
Don't put the pressure on the "experts". Instead, when "newbies" learn
things that they couldn't easily find, _they_ should also be writing up
their findings for people at their level who are looking to learn the things
that they just learned.
Blame it on the coffee. There was no creamer this morning.
This problem is addressed in section 54.6.5.3 of the FAQ, you idiot.

;)

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 12 '06 #5

P: n/a

Tom Cole wrote:
I bet 50% of the posts I've read lately have had at least one bad thing
to say about every website or book dedicated to javascript.

There are clearly a few posters (you know who you are) who either are
or consider themselves to be the "comp.land.javascript elite". You guys
may be the brightest, most seasoned developers out there, and hats off
to you. You may not be, how the heck would I know. But...

Not to be too critical (which sounds a lot like "Not to interrupt..."
which means clearly, I am planning to interrupt.....) but I've seen a
whole lot of these "Javascript elite" telling us beginners/hobbyists
just how much all the Javascript information on the web sucks, it's not
right, don't buy book A, B or C 'cause they all suck, no-one out there
knows what they're doing, prototype (and every other javascript library
out there) is junk.....yada, yada, yada.

Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it? While this newgroup may
be a respository of good (or even great and also some sucky)
information, it's also one hell of a bad way to learn to program,
especially given that we've only got incorrect websites and sucky books
to get us started. Seriously, God forbid I came to this newgroup and
asked "How do I program in Javascript". I'd get some long four page
monologue on how this newgroups isn't to do people's work for
them....blah, blah, blah.

So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.
I'm nowhere near elite at JavaScript, there are some real gurus out
there. Perhaps if I tell you what books I read that helped me, it would
help you.

First I picked up david flanagan's infamous (at least here!)
"javascript: The Definitive Guide"

A good move, but a extremely premature one for me. Couldn't grasp a
word, well, I could, but it made hard work of it with me.

So I picked up Thomas Powell's "The Complete Reference".

Not the best book on javascript, no way, but it is very good for
newbies like me. Explained concepts that flew straight over my head in
davids book.

After studying that, applying techniques etc, I was ready to move back
to David Flanagan's Book on JavaScript. (And realise what a great gem
it is, its basically as good as it gets.)

Sometimes the only way to "get good", is to commit errors! Well, more
importantly, the bit where you realise that that was a bad idea and to
move on to a better method.

Sep 12 '06 #6

P: n/a

Matt Kruse написав:
I think the best advice is to go buy "javascript: The Defintive Guide" and
use it as a resource until you understand javascript to the level that it
can teach you.
I also recommend "JavaScript Bible" bat Danny Goodman. I really like it
as a reference (it is a bit old but contain many info about
compatability with different browsers). It also contain many simple
explanations for newbies. On the disc you can find .pdf reference
prepared for printing.
To learn Regular Expressions I recommend the best book ever "Mastering
Regualr Expressions" by Jefferey Friedl.

Val Polyakh
http://trickyscripter.com

Sep 12 '06 #7

P: n/a
Hi,

Tom Cole wrote:
I bet 50% of the posts I've read lately have had at least one bad thing
to say about every website or book dedicated to javascript.

There are clearly a few posters (you know who you are) who either are
or consider themselves to be the "comp.land.javascript elite". You guys
may be the brightest, most seasoned developers out there, and hats off
to you. You may not be, how the heck would I know. But...
<snip>

As a long time poster to CLJ, I got to say that the general tone of some
of the answers sometimes bothers me too. That's the main reason why I
took a break from it for a while. I also post on Microsoft's ASP.NET
newsgroup, and have been wondering why the tone is very different there.
My guess is that most posters on the ASP.NET group are professional
software engineers, while many posters here are hobby programmers.
JavaScript doesn't request any IDE to be written, and can be executed in
browsers, which every PC (or almost) has at least one instance of
installed. Debuggers are free, and even without any debugger, one can
still write code and test it using alerts and the likes. As a
consequence, the average level of posted code is by far not as good for
JavaScript as it is for C# or other more "professional" languages. This
could explain why there is some feeling of anger at some questions asked
over and over again.

Generally, people who post in the ASP.NET group ask structured and
informed questions, and do so after they tried to write code themselves.
Additionally, the examples available in MSDN or in other websites and
blogs are usually of very good quality. That's not the case for
JavaScript unfortunately. A big part of the replies given here is to
correct problems caused by erroneous code posted on the many, many
websites and "libraries" around. The very nature of JavaScript, with its
flexibility, its unique features makes it very easy to make mistakes.
Additionally, the many browsers, with their incompatibilities, make it
difficult to produce cross-browser compatible code.

The best advice one can give to a beginner is to buy a good paper book
(you know which one...) Paper books are reviewed by many persons before
being published (I was lucky to review the french translation of David
Flanagan's book a few years ago, a very long and rewarding work). The
average quality, though errors cannot be completely avoided, is better
than web-based "reference" sites. After that, it's very important to try
it for yourself ("you" as majesty ;-) and to try to understand what you
do before you post a question. Obviously, questions like "I want to do
something, can anyone tell me how" will be less welcomed than "I tried
this and have this error, but don't understand why".

Note that it's never been as easy to write good code and to debug it as
now. JavaScript is getting more popular every day with the hype around
AJAX. Good IDEs support you in writing good code (I am very partial to
Visual Studio 2005, but there are many others). Mozilla's documentation
is online again (http://developer.mozilla.org/en/docs/JavaScript). The
browsers are more compatible now than ever. IE7 will be a huge
improvement over IE6. Microsoft finally committed to distribute
libraries (ATLAS) which are fully tested on IE, Firefox, Safari and
later Opera. Also, more professional software developers are doing
JavaScript now because they want to do AJAX or DHTML effects. So there
is hope ;-)

I should really get back to writing code now ;-)

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 12 '06 #8

P: n/a
I am not a guru by any means. But I began life as a "creative artist,"
and I later taught myself how to also be a programmer (tho I did take a
few CS classes along the way).

I remember very well the frustration of being in the position where all
of my questions were "too trivial" for anyone to answer, or even to
find on Google (good luck finding out what an "array" is if you don't
already know, for example).

So anyway, your post struck a chord with me, and here are my thoughts.

First of all, here are a few pieces of specific advice for learning
JavaScript.

- If the browser throws an error, fix it, even if your program is doing
everything it is supposed to. Errors are indicative of sloppy
practices, which will bite you in the ass later, when you start writing
larger scripts.

- Check your code in at least IE and Firefox, even if you only need to
support one of the two. Cross-browser bugs can be indicative of latent
bugs that will emerge later on, as users do things you didn't expect
with your code :)

- Use a text editor that has both syntax highlighting and automatic
formatting. There are lots of good editors to choose from.

- Use Jesse Ruderman's JavaScript shell, which allows you to run JS
code and see the result, without having to toggle back and forth
between browser and text editor. It's great for trying out sample code
from a book. If you use Firefox, the shell comes as a bookmarklet as
well, and you can use it to work with the DOM of _any_ page, which
makes it an excellent debugging tool.
http://www.squarefree.com/shell/

- If you use Firefox, use Jennifer Madden's View Rendered Source Chart
extension. This allows you to view the _current_ DOM as HTML, which is
wildly useful for debugging. This extension has saved me hours of
debugging time, I can't recommend it highly enough.
http://jennifermadden.com/scripts/Vi...redSource.html

Tom Cole wrote:
I bet 50% of the posts I've read lately have had at least one bad thing
to say about every website or book dedicated to javascript.

There are clearly a few posters (you know who you are) who either are
or consider themselves to be the "comp.land.javascript elite". You guys
may be the brightest, most seasoned developers out there, and hats off
to you. You may not be, how the heck would I know. But...
One way to tell whether someone is worth listening to, is to look at
their old posts; by searching for their user name within the
comp.lang.javascript group. I do this quite a bit, especially when
taking advice about "cross-browser" issues.
Not to be too critical (which sounds a lot like "Not to interrupt..."
which means clearly, I am planning to interrupt.....) but I've seen a
whole lot of these "Javascript elite" telling us beginners/hobbyists
just how much all the Javascript information on the web sucks, it's not
right, don't buy book A, B or C 'cause they all suck, no-one out there
knows what they're doing, prototype (and every other javascript library
out there) is junk.....yada, yada, yada.
I myself have never found a JS book other than Flanagan that I would
consider paying for. However, the problem may be that you're asking
experts to recommend beginner-level books. Experts don't generally
actually use beginner-level books, so it might be worth your time to
ask some "newbies" or "intermediate programmers," which books _they_
consider worthwhile.
Why don't a few of you gurus start writing some information that is
correct, that shows the "proper" way to do it? While this newgroup may
be a respository of good (or even great and also some sucky)
information, it's also one hell of a bad way to learn to program,
especially given that we've only got incorrect websites and sucky books
to get us started. Seriously, God forbid I came to this newgroup and
asked "How do I program in Javascript". I'd get some long four page
monologue on how this newgroups isn't to do people's work for
them....blah, blah, blah.

So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.
I wish that someone had told me on the day I wrote my first script:
learning to program JavaScript is mostly about just learning to program
_at_all_. Learning to program in _any_ language, helps when
programming in _any_ language. Basic concepts apply to computer
languages everywhere. Some of these concepts include scope,
associative arrays, and data types and structures. For more on "how to
be a programmer," I really love this essay by ESR:

http://www.catb.org/~esr/faqs/hacker-howto.html#skills1

When you get a bit more advanced, it will be worth your time to look at
another programming language, called Scheme (and another called Lisp),
which is very similar to JavaScript. There is a great deal of
literature about learning to program in Scheme. Be warned that Scheme
has a very different-looking syntax from JS, however.

I hope this helps you out. Thanks for the good post, and thanks to
everyone else who responded as well.

Sep 12 '06 #9

P: n/a
On Tue, 12 Sep 2006 14:20:30 -0700, Noah Sussman wrote:
I remember very well the frustration of being in the position where all
of my questions were "too trivial" for anyone to answer, or even to find
on Google (good luck finding out what an "array" is if you don't already
know, for example).
That's where RTFM come in I'm afraid.

If you haven't read up on the basics of the systems and languages you're
working with then why should it be expected that someone is going to do
the work for you.

It amazes me how many times someone asks a question about doing something
that clearly violates the browser security scope or confuses client-side
with server-side scripting.

That's chapter one in any book on how webservers work. How can anyone
expect to write web applications without having any idea how the engine
they're writing them for works?

I'm not going to ask a mechanic how to change a pushrod in my car if I
don't know the basics of how an internal combustion engine works...
chances are I wouldn't know what a pushrod was.

Yes, there are some arrogant, tactless people on the net... but you have
to do the background work yourself. The frustration of those with
experience being asked remedial questions is just as valid as the
frustration of the person not getting their remedial question answered.

I am in no way a programming guru, that's why I RTFM.

--
The USA Patriot Act is the most unpatriotic act in American history.
Feingold-Obama '08 - Because the Constitution isn't history,
It's the law.

Sep 12 '06 #10

P: n/a
Ivan Marsh wrote:
On Tue, 12 Sep 2006 14:20:30 -0700, Noah Sussman wrote:
I remember very well the frustration of being in the position where all
of my questions were "too trivial" for anyone to answer, or even to find
on Google (good luck finding out what an "array" is if you don't already
know, for example).

That's where RTFM come in I'm afraid.

If you haven't read up on the basics of the systems and languages you're
working with then why should it be expected that someone is going to do
the work for you.

It amazes me how many times someone asks a question about doing something
that clearly violates the browser security scope or confuses client-side
with server-side scripting.

That's chapter one in any book on how webservers work. How can anyone
expect to write web applications without having any idea how the engine
they're writing them for works?

I'm not going to ask a mechanic how to change a pushrod in my car if I
don't know the basics of how an internal combustion engine works...
chances are I wouldn't know what a pushrod was.
I can relate to the confusion of people learning to program for the
web. At first it is difficult to see the division of responsibility
between

JavaScript | Flash
CSS
HTML
XML | JSON
HTTP
PHP | PERL | RUBY | PYTHON | C# | JAVA
SQL

Usually people learn all how to program for the web alone and motivated
by an idea for a particular website. They need to know much of the
above technology to realize that idea. That is a lot to learn just so
you can have a snappy site with a picture gallery and user comments.
Some pointers at the start (even to just the _appropriate_ faq) are
usually greatly appreciated.

Peter

Sep 12 '06 #11

P: n/a
Matt Kruse wrote:
>
I wouldn't say the experts aren't helping one bit. Look at the resources
attached to the FAQ. They are excellent write-ups of different topics and
extremely relevant.

But I do agree that much of the time spent here telling people that they are
wrong or trying to cater to the clueless could be much better spent writing
new articles, sharing robust code, and documenting browser quirks and
behaviors. It would be more benficial to all.
I completely agree but there is no way to demand volunteer work. I
think it is amazing how much energy people put into this group.

Perhaps if it was easier for the experts to collaborate in a respectful
way the collective knowledge could be organized more effectively than
newsgroup archives. Maybe a c.l.j. wiki.

Peter

Sep 12 '06 #12

P: n/a
JRS: In article <45**********@news.bluewin.ch>, dated Tue, 12 Sep 2006
21:46:28 remote, seen in news:comp.lang.javascript, Laurent Bugnion
<ga*********@bluewin.chposted :
>The best advice one can give to a beginner is to buy a good paper book
(you know which one...)
ISTM that there are (at least) two main classes of Javascript beginner :
those who are already moderately skilled at programming, and those who
are not.

The former are reasonably well served for Javascript (but not for the
DOM) by a book like the Pocket Flanagan - basically a list of operators,
functions, methods, and statements with some brief examples, such as can
also be found on the Web.

The latter expect to learn Javascript programming from a book, or
course, which purports to teach Javascript. What they don't understand
that they also need is to learn programming - that is to say, that which
applies equally to FORTRAN, Algol, Pascal, Delphi, C[++], Java,
Javascript, Basic, etc.

It includes the conversion of requirements to algorithms and the
expression of algorithms in terms of available operations (operators,
functions, methods, procedures, etc.), the modularisation of code ((
e.g. LZ(x) instead of repeatedly if (x<10) x='0'+x )), not repeating
calculation, layout, comment, legibility.

It most importantly includes testing after adding small pieces of code -
for newcomers, perhaps no more than one or two statements (particularly
easily in Javascript; quite unlike handing over a box of cards for the
twice-daily testing session). It is much more easy to find a single
error than to unscramble the effects of multiple errors. especially when
there is little new code.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk DOS 3.3, 6.20; Win98.
Web <URL:http://www.merlyn.demon.co.uk/- FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demon.co.uk/batfiles.htm- also batprogs.htm.
Sep 13 '06 #13

P: n/a
Tom Cole said the following on 9/12/2006 9:12 AM:
I saw a question recently that asked "What three good javascript books would
you buy?". Fair enough question. I prefer to learn by reading whenever
possible. I bet I've got more CS books in my library than any other
genre. So what response do you think he got? "There aren't three good
books.". Now that's funny.
As Richard pointed out, it may be funny to you but it is - sadly - true.
I personally found that to be not as true as the "elite" probably meant
it to be, but I got his point.
You don't have to refer to me as an "elite", you can call me by name.
And, there is a very specific reason you saw that response from me.
Aside from the fact that there aren't three good JS books out there.
There's only one problem, not a single "good" book title was given. Not one.
That wasn't the question that was asked

<quote>
What are the best three javascript books they own?
</quote>

To which my reply was:
<quote>
There aren't three good JS books to own to start with.
</quote>

Perhaps it would have satisfied you for me to have said "I don't own
three JS books"?

But even that aside, I noticed that *you* didn't bother to reply to the
question at all, not even to mention one book or site, yet you want to
bitch about my answer?

Besides, the next time someone makes a post that has the essence of "I
am making a pay site, will give you give me free answers so that I can
charge for those answers", I probably won't even be as nice as I was in
the post you are referring to.
While this may not be a great example, there are 1000 more just like it
in this group.
I doubt it as most people don't post here and ask for free advice that
they intend to turn around and sell. Or at least they aren't stupid
enough to openly admit it up front.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 13 '06 #14

P: n/a
Tom Cole wrote:
I bet 50% of the posts I've read lately have had at least one bad thing
to say about every website or book dedicated to javascript.
Probably included among the major reasons folks would have for
disliking most books and sites on the subject are...

* Timeliness : With the evolution of the technology , most
books and/or sites are sorta stale the moment they are created,
and unlike wine most do not age well.
( I have not updated my materials in a long time either )

* Browser-isims : Books and sites are often rife with browser specific
approaches and the individual author's bad habits (we all have them).

* Lousy Book : If one even ignores Timeliness and the author has
managed to avoid Browser-isims and their own bad habits. (small group
indeed) , then one is still faced with the structure and layout of the
book. Most often when I evaluate a book , my first step is to
open it from the back (index) and see if said index can actually take me
to answers. Another thing I look for is decent appendixes with
hopefully decent reference charts that can knudge my memory.
If the book makes it that far ( Hardly ever ) then I study the
content of a few chapters to see if it makes sense to me and that the
gems of knowledge are expressed in a concise way.
When I've needed a programming book, it often took hours at several
stores to find anything useful at all.

At one time I probably carried a hundred or more books, but these days
I think I keep maybe 3-4 books around with none of them being about
javascript.

<snip>
So, elite, "How do I learn to program in Javascript?". I already
(apparently) know how not to.
Well, RTFM is more than a single tome, and is actually more
reflective of basic research skills. Google is your friend,
as are basic sites like www.w3.org, w3schools.com (albeit a little IE
centric) , developer.mozilla.com (albeit mozilla centric),
www.quirksmode.org/ (browser agnostic)
Another good friend is the "view-source" function in your browser.

I personally develope using the Firefox browser, because I like it's
error reporting far more than IE's , although I try and code as
agnostically as possible.

I think one of the things that helped build my skills the most
was to create my own personal on-line manual for the topics I work with,
so that a problem once solved is available for reference in my own hand
, available to me anywhere and not likely to go away any sooner than
myself.

Sep 13 '06 #15

P: n/a

Randy Webb wrote:
Tom Cole said the following on 9/12/2006 9:12 AM:
I saw a question recently that asked "What three good javascript books would
you buy?". Fair enough question. I prefer to learn by reading whenever
possible. I bet I've got more CS books in my library than any other
genre. So what response do you think he got? "There aren't three good
books.". Now that's funny.

As Richard pointed out, it may be funny to you but it is - sadly - true.
I personally found that to be not as true as the "elite" probably meant
it to be, but I got his point.

You don't have to refer to me as an "elite", you can call me by name.
And, there is a very specific reason you saw that response from me.
Aside from the fact that there aren't three good JS books out there.
There's only one problem, not a single "good" book title was given. Not one.

That wasn't the question that was asked

<quote>
What are the best three javascript books they own?
</quote>

To which my reply was:
<quote>
There aren't three good JS books to own to start with.
</quote>

Perhaps it would have satisfied you for me to have said "I don't own
three JS books"?

But even that aside, I noticed that *you* didn't bother to reply to the
question at all, not even to mention one book or site, yet you want to
bitch about my answer?
I don't know enough about javascript to have posted an answer, that's
why I started another thread. The only javascript book I own was the
official Netscape Press publication "Javascript 1.2", which is about
worthless these days... I'm pretty sure you could thread a needle with
the amount of Javascript I know.
>
Besides, the next time someone makes a post that has the essence of "I
am making a pay site, will give you give me free answers so that I can
charge for those answers", I probably won't even be as nice as I was in
the post you are referring to.
While this may not be a great example, there are 1000 more just like it
in this group.

I doubt it as most people don't post here and ask for free advice that
they intend to turn around and sell. Or at least they aren't stupid
enough to openly admit it up front.
As I mentioned, it was a poor example. It was just the most recent at
the time. There were a other posts where, for example, a user was using
Prototype, to which several exclaimed "Foul". "Prototype is junk". So
is there a good javascript library out there to use? Why reinvent the
wheel? Or should all developers create their own toolkits from scratch?

Another person had referenced a site they used to learn about
javascript. Some others exclaimed "Foul". "That site doesn't know what
it's talking about.". So is there a good javascript tutorial site out
there? Examples (like pictures) speak 1000 words.

With regards to the book thing, I do remember seeing in a post that the
only book endorsed by xxxxx was David Flanagan's book. Fair enough on
that. I will have to get a copy to see just how much I don't know
(about javascript that is).
>
--
Randy
Chance Favors The Prepared Mind
One of the better taglines I've seen. How true. I must get more
prepared.
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Maybe this is a site I should frequent...

Sep 13 '06 #16

P: n/a
Hi,

drclue wrote:

<snip>
At one time I probably carried a hundred or more books, but these days
I think I keep maybe 3-4 books around with none of them being about
javascript.
I noticed that every time that I start with a new technology (means
about 2 or 3 times a year), I like to purchase a book about that
technology. More often than others, I end up with an O'Reilly book, but
it's not always the case. I choose the book based on comparison with
others, online reviews, advice from colleagues, etc... Of course I am
lucky, because my firm pays for the books, so it's easier. I like to
read the first few chapters of the book, and usually I start testing
immediately. In order to learn efficiently, I usually try to use the
said technology in a real project (professional or private one), so that
I have an added motivation. At one point in the process, I start looking
for answers more in the online documentation (including Google, NGs,
etc...) than in the book. That the moment where I usually stop reading
it, and where I consider that I know enough about the technology to use
it efficiently enough for the task I need it for.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 13 '06 #17

P: n/a
Tom Cole said the following on 9/13/2006 4:28 PM:
Randy Webb wrote:
>Tom Cole said the following on 9/12/2006 9:12 AM:
<snip>
>>While this may not be a great example, there are 1000 more just like it
in this group.
I doubt it as most people don't post here and ask for free advice that
they intend to turn around and sell. Or at least they aren't stupid
enough to openly admit it up front.

As I mentioned, it was a poor example. It was just the most recent at
the time.

There were a other posts where, for example, a user was using
Prototype, to which several exclaimed "Foul". "Prototype is junk".
Those are, for the most part, legitimate statements about that
particular library. The problems with it are numerous and well
documented in the archives of this group.

You don't see the same types of statements about the Yahoo! library though.

So is there a good javascript library out there to use? Why reinvent the
wheel? Or should all developers create their own toolkits from scratch?
Sure there are some good ones. Matt Kruse has some good ones. But
whether you use a library or not depends on what your intentions are.
And to know whether the library approach is a good one or not you have
to know enough to understand what the library does and doesn't do. To
import a 50K library to simply format a date is obscene overkill but if
you are doing a kazillion date modifications then it can come in handy.

Personally, I don't care for them. But that is a decision that every
person has to make for themselves. If you ask Matt, they are a great
idea, and if you ask Richard then they are always a bad idea.
Another person had referenced a site they used to learn about
javascript. Some others exclaimed "Foul". "That site doesn't know what
it's talking about.". So is there a good javascript tutorial site out
there? Examples (like pictures) speak 1000 words.
Of all the tutorial sites that I have looked at in my time posting here,
I can honestly say that I have not seen a "good one" that was totally
accurate but I don't believe one could ever possibly exist. You have to
stop and accept some flaws but when the flaws are as obvious as some of
the ones on the many tutorial sites on the web, you start frowning on them.

The first one I ever started with was HTMLGoodies when it was written by
Joe Burns (It has since been sold and has a new editor). Joe Burns was a
teacher first and as a teacher was good at it. Not very good at other
things but a good teacher. I haven't looked at it in depth in a long
time (I glanced at it briefly just now) so I can't say for sure whether
it is any good any more or not. One thing I did notice on the first page
is that it seems to have been updated for the recent family of browsers
so that is a good sign. When I first used it, it was during the NN/IE
browser wars.
With regards to the book thing, I do remember seeing in a post that the
only book endorsed by xxxxx was David Flanagan's book. Fair enough on
that. I will have to get a copy to see just how much I don't know
(about javascript that is).
Personally, I can't say anything about it as I have never seen it. The
two books that I have owned are The Javascript Bible 4th Edition by
Danny Goodman and book by a man named James Jaworski called "Mastering
Javascript and JScript". I don't have the second book anymore (it was
very NN4/IE4 oriented and about worthless now for anything other than
passive reading). The Javascript Bible is packed up in a box and I
haven't bothered to open it in about 4 years now. If I want to look up
something I use the three URL's I posted in the other thread.

I wouldn't recommend the Javascript Bible Fifth Edition now for no other
reason than it's 2 years out of print and if it has been 2 years since
it was printed then the material in it is at least 3 years old and in
reference to the Internet 3 years is eternity.
>--
Randy
Chance Favors The Prepared Mind

One of the better taglines I've seen. How true. I must get more
prepared.
It is from a Steven Seagal movie "Dark Territory" and is very fitting at
times.
>comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Maybe this is a site I should frequent...
If you are learning, both of those URL's are excellent resources.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 14 '06 #18

P: n/a
Randy Webb said the following on 9/14/2006 12:04 AM:
Tom Cole said the following on 9/13/2006 4:28 PM:
>Randy Webb wrote:
>>Tom Cole said the following on 9/12/2006 9:12 AM:
<snip>
>>Chance Favors The Prepared Mind

One of the better taglines I've seen. How true. I must get more
prepared.

It is from a Steven Seagal movie "Dark Territory" and is very fitting at
times.
Under Siege - Dark Territory
Is the full name of the movie. I shouldn't do certain things after
midnight, sheesh.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 14 '06 #19

P: n/a
Randy Webb wrote:
To import a 50K library to simply format a date is obscene overkill
Since my name is mentioned in the same paragraph as this I thought I'd point
out that *my* rather robust, general-purpose date
parsing/formatting/manipulating lib is < 8k.. Just FYI ;)

But your point is valid - including a 50k library just to use a single
function is not efficient. I've seen people use _only_ $() from
prototype.js, but include the whole lib. That is some serious over-kill!

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 14 '06 #20

P: n/a
Ray

Tom Cole wrote:
The problem is everytime I've seen a newbie reference a book or
website, someone tells them how much junk it is. So where do they get
I am by no means a JavaScript "elite", but I really love the book
Professional JavaScript for Web Developers:

http://www.wrox.com/WileyCDA/WroxTit...764579088.html

It clears up a lot of confusion for me--the chapter on OO is really
great.
The "I" I was using here is more of a royal "we". "How do we (newbies)
learn to program in Javascript". Apparently we have already learned how
not to (having been repeatedly told so by the comp.lang.javascript
elite). See what I mean?
I just found JavaScript (not found, forced to use more like) about 3
months ago. But I find that having a firm foundation in other
programming languages (in this case C++, Java, and Python) helps a lot
in picking up JS. Also then people with experience in other languages
are not prone to do weird things like storing Array in select's options
and call it a Vector.
But...there are tons of newbie's that post questions and I see more
snippy on-liners that seem more designed to remind the newbie just how
stupid we "perceive" him to be than actually helping. Telling someone
Maybe it was my luck, but the answers I got so far for my questions
were helpful.
that something is a bad idea, telling them why it's a bad idea, and
then not telling them how to do it right gets one nowhere. I saw a
question recently that asked "What three good javascript books would
you buy?".
Again I'd recommend the Wrox book above. May not be the most
theoretically precise, but gets the job done. And it maps JavaScript
using concepts that are already familiar to people with programming
background, so that's cool.
<snip>
>
Blame it on the coffee. There was no creamer this morning.

Richard.
Sep 14 '06 #21

P: n/a
Matt Kruse said the following on 9/14/2006 12:33 AM:
Randy Webb wrote:
>To import a 50K library to simply format a date is obscene overkill

Since my name is mentioned in the same paragraph as this I thought I'd point
out that *my* rather robust, general-purpose date
parsing/formatting/manipulating lib is < 8k.. Just FYI ;)
Fair enough. To be honest, I wasn't referring to the Date library but I
hadn't looked to see what size it was.
But your point is valid - including a 50k library just to use a single
function is not efficient. I've seen people use _only_ $() from
prototype.js, but include the whole lib. That is some serious over-kill!
Precisely :)

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 14 '06 #22

P: n/a
Laurent Bugnion wrote:
drclue wrote:
>At one time I probably carried a hundred or more books, but these days
I think I keep maybe 3-4 books around with none of them being about
javascript.

I noticed that every time that I start with a new technology (means
about 2 or 3 times a year), I like to purchase a book about that
technology. More often than others, I end up with an O'Reilly book, but
it's not always the case. I choose the book based on comparison with
others, online reviews, advice from colleagues, etc... Of course I am
lucky, because my firm pays for the books, so it's easier.
That does make it a little easier to acquire the books. I could get one
wild weekend going for the price of some of them texts :o
I like to read the first few chapters of the book, and usually I start testing
immediately. In order to learn efficiently, I usually try to use the
said technology in a real project (professional or private one), so that
I have an added motivation.
I most certainly agree with you on that! I think beyond simple
motivation, a real project is more likely to drag ones mind
through the important issues in a problem solving/learning mode
that one cannot get from passive reading.
At one point in the process, I start looking
for answers more in the online documentation (including Google, NGs,
etc...) than in the book. That the moment where I usually stop reading
it, and where I consider that I know enough about the technology to use
it efficiently enough for the task I need it for.
The *optimal method of learning* is the one
that gives the individual studying the knowledge and
understanding they sought.

I'm a bit biased as I program via satellite from
a remotely located 1967 school bus, and shelf space or
any other space is at a real premium :)
Sep 14 '06 #23

P: n/a
JRS: In article <ee********@news1.newsguy.com>, dated Wed, 13 Sep 2006
23:33:17 remote, seen in news:comp.lang.javascript, Matt Kruse
<ne********@mattkruse.composted :
>
Since my name is mentioned in the same paragraph as this I thought I'd point
out that *my* rather robust, general-purpose date
parsing/formatting/manipulating lib is < 8k.. Just FYI ;)
That's 40% of the size of the average *.htm file in my master root
directory. Ignoring those under 3000 bytes, which are mostly re-
directors, it's over 33%.

I/O handling of standard-format dates, independently of OS settings, can
probably be done in under 1K.

It's a good idea to read the newsgroup and its FAQ.
--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Sep 14 '06 #24

P: n/a
Dr John Stockton wrote:
>Since my name is mentioned in the same paragraph as this I thought
I'd point out that *my* rather robust, general-purpose date
parsing/formatting/manipulating lib is < 8k.. Just FYI ;)
That's 40% of the size of the average *.htm file in my master root
directory.
So? Your pages aren't exactly typical. They are plain and boring with very
little css, javascript, or images. Many _images_ are more than 8k, and they
most likely provide provide less value than javascript functionality. Plus,
8k of cached javascript that can be reused on multiple pages is not bad at
all.
I/O handling of standard-format dates, independently of OS settings,
can probably be done in under 1K.
If you just want to handle standard-format dates, you're probably right. But
that's not the point of my library. The point of my library is to be
flexible, so the same cached 8k of javascript can be used on many pages
which may even have different date-handling needs, and be reused in
different sites or applications where the specific need differs but the same
code with the same interface can still do the job.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 15 '06 #25

P: n/a

Ray wrote:
Tom Cole wrote:
The problem is everytime I've seen a newbie reference a book or
website, someone tells them how much junk it is. So where do they get

I am by no means a JavaScript "elite", but I really love the book
Professional JavaScript for Web Developers:

http://www.wrox.com/WileyCDA/WroxTit...764579088.html

It clears up a lot of confusion for me--the chapter on OO is really
great.
That's where I probably get the most confused with Javascript and where
I use the least of it's capabilities. I'm a Java developer, it's what
I've done since '95. But the prototyping style of OO used in javascript
just hasn't sunk in for me yet. I'm still use to the way natively OO
oriented systems to it.

I remember slightly dabbling in something similar with a version of
Pascal that taunted some OO capabilities way back in late 80's (I think
it was Borland TurboPascal 7.0.) which were really more of a custom
datatype than they were objects.

Maybe I'll check this book out as well. Anyone out there know how well
the Definitive Guide covers the OO aspects of Javascript?
>
The "I" I was using here is more of a royal "we". "How do we (newbies)
learn to program in Javascript". Apparently we have already learned how
not to (having been repeatedly told so by the comp.lang.javascript
elite). See what I mean?

I just found JavaScript (not found, forced to use more like) about 3
months ago. But I find that having a firm foundation in other
programming languages (in this case C++, Java, and Python) helps a lot
in picking up JS. Also then people with experience in other languages
are not prone to do weird things like storing Array in select's options
and call it a Vector.
But...there are tons of newbie's that post questions and I see more
snippy on-liners that seem more designed to remind the newbie just how
stupid we "perceive" him to be than actually helping. Telling someone

Maybe it was my luck, but the answers I got so far for my questions
were helpful.
that something is a bad idea, telling them why it's a bad idea, and
then not telling them how to do it right gets one nowhere. I saw a
question recently that asked "What three good javascript books would
you buy?".

Again I'd recommend the Wrox book above. May not be the most
theoretically precise, but gets the job done. And it maps JavaScript
using concepts that are already familiar to people with programming
background, so that's cool.
<snip>

Blame it on the coffee. There was no creamer this morning.
>
Richard.
Sep 15 '06 #26

P: n/a
JRS: In article <ee*********@news1.newsguy.com>, dated Thu, 14 Sep 2006
21:21:04 remote, seen in news:comp.lang.javascript, Matt Kruse
<ne********@mattkruse.composted :
>Dr John Stockton wrote:
>>Since my name is mentioned in the same paragraph as this I thought
I'd point out that *my* rather robust, general-purpose date
parsing/formatting/manipulating lib is < 8k.. Just FYI ;)
That's 40% of the size of the average *.htm file in my master root
directory.

So? Your pages aren't exactly typical. They are plain and boring with very
little css, javascript, or images. Many _images_ are more than 8k, and they
most likely provide provide less value than javascript functionality.
But I was referring to *.htm files, which do not contain images. Images
are in separate files (I have some elsewhere; but, except for js-
anclk.htm, the only ones in js-*.htm are digits). The existence of one
form of bloat does not justify the use of another.
Plus,
8k of cached javascript that can be reused on multiple pages is not bad at
all.
But not as good as 1K. Readers may not want to read multiple pages if
they are only interested in one topic.

>I/O handling of standard-format dates, independently of OS settings,
can probably be done in under 1K.

If you just want to handle standard-format dates, you're probably right. But
that's not the point of my library. The point of my library is to be
flexible, so the same cached 8k of javascript can be used on many pages
which may even have different date-handling needs, and be reused in
different sites or applications where the specific need differs but the same
code with the same interface can still do the job.
A date is a date. Only one form is needed for input (unless terminators
are omitted, or ordinal date or week number is used) and likewise, plus
day-of-week, for output. A little more if Easter is to be calculated.
Americans love standards - that's why they have so many local ones.
Ideally, every citizen would have his/her own.
--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Sep 15 '06 #27

P: n/a
Dr John Stockton wrote:
>Plus,
8k of cached javascript that can be reused on multiple pages is not
bad at all.
But not as good as 1K.
I disagree. The difference between an 8k include file and a 1k include file
is negligible. At a certain point, differences in file sizes become
irrelevant.
A date is a date. Only one form is needed for input (unless
terminators are omitted, or ordinal date or week number is used) and
likewise, plus day-of-week, for output.
Not true. If a site or webapp allows the user to select their favored date
format, the javascript must adapt if you are to check for valid dates,
insert calculated date values, etc. Rather than writing different code that
gets delivered depending on the selected format of the user, using a single
library to which the date format can be passed as an argument is certainly
preferred.
Americans love standards
and kittens.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 16 '06 #28

P: n/a
Ray

Tom Cole wrote:
That's where I probably get the most confused with Javascript and where
I use the least of it's capabilities. I'm a Java developer, it's what
I've done since '95. But the prototyping style of OO used in javascript
just hasn't sunk in for me yet. I'm still use to the way natively OO
oriented systems to it.
Ah, then definitely I'd recommend the book above. The author cleared up
everything for you, and explained step-by-step what's the big deal
about prototype, why one style and not another, and so on. I felt so
enlightened after reading that chapter :) ("oh, so *that* was the whole
thing about this prototype thing...")
I remember slightly dabbling in something similar with a version of
Pascal that taunted some OO capabilities way back in late 80's (I think
it was Borland TurboPascal 7.0.) which were really more of a custom
datatype than they were objects.
Yeah, same here :)
Maybe I'll check this book out as well. Anyone out there know how well
the Definitive Guide covers the OO aspects of Javascript?
I wanted to buy the Definitive Guide when I got thrown into programming
JS a few months back, however the latest edition hadn't come out yet so
I bought the book I recommended. I'd say it's good enough for my job
(I'm still mainly a Java developer, just that in my new job I gotta do
everything from DB table design all the way to JS and CSS for the
pages, so...)

Sep 16 '06 #29

P: n/a

Ray wrote:
Tom Cole wrote:
That's where I probably get the most confused with Javascript and where
I use the least of it's capabilities. I'm a Java developer, it's what
I've done since '95. But the prototyping style of OO used in javascript
just hasn't sunk in for me yet. I'm still use to the way natively OO
oriented systems to it.

Ah, then definitely I'd recommend the book above. The author cleared up
everything for you, and explained step-by-step what's the big deal
about prototype, why one style and not another, and so on. I felt so
enlightened after reading that chapter :) ("oh, so *that* was the whole
thing about this prototype thing...")
I remember slightly dabbling in something similar with a version of
Pascal that taunted some OO capabilities way back in late 80's (I think
it was Borland TurboPascal 7.0.) which were really more of a custom
datatype than they were objects.

Yeah, same here :)
Maybe I'll check this book out as well. Anyone out there know how well
the Definitive Guide covers the OO aspects of Javascript?

I wanted to buy the Definitive Guide when I got thrown into programming
JS a few months back, however the latest edition hadn't come out yet so
I bought the book I recommended. I'd say it's good enough for my job
(I'm still mainly a Java developer, just that in my new job I gotta do
everything from DB table design all the way to JS and CSS for the
pages, so...)
Sounds like similar paths. I had written a few new sites with some
really great functionality for our customers, vendors and employees,
all using J2EE. After browsing around the internet I really liked the
more fluid response of Ajax empowered sites so I started making some
modifications of the pages to perform the lookups and sorting etc.
using XmlHttpRequest.

Since I've spent some time with it (javascript that is) I've decided to
start my own "toolkit" to simplify and standardize the way I use
javascript (kind of like the dozens of custom tag libraries I've
written for the J2EE stuff). So now I'm trying to improve it (the
javascript toolkit that is) as I learn more about the language.

I think I'll be getting both books (The Definitive Guide and
Professional JavaScript for Web Developers). Thanks a bunch.

Sep 16 '06 #30

P: n/a
JRS: In article <ee********@news1.newsguy.com>, dated Fri, 15 Sep 2006
21:08:15 remote, seen in news:comp.lang.javascript, Matt Kruse
<ne********@mattkruse.composted :
>
>A date is a date. Only one form is needed for input (unless
terminators are omitted, or ordinal date or week number is used) and
likewise, plus day-of-week, for output.

Not true. If a site or webapp allows the user to select their favored date
format, the javascript must adapt if you are to check for valid dates,
insert calculated date values, etc.
Only one form is *needed*.

If you allow users to enter any form they like, what happens in a
Quebecois fireworks company that happens to employ a few Japanese and
Americans as well as indigenous staff, and sells into the UK for Bonfire
Night?

The locals will write, in the French manner, 05/11/06.
The Japanese will write, in a logical manner, 06/11/05.
The Americans will write, idiosyncratically, 11/05/06.

So you'll have to provide a selector for the format; and it may not be
correctly set.

More bloat - you must be paid by the yard of code.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Sep 16 '06 #31

P: n/a
Dr John Stockton wrote:
>Not true. If a site or webapp allows the user to select their
favored date format, the javascript must adapt if you are to check
for valid dates, insert calculated date values, etc.
Only one form is *needed*.
On a given page for a given user, perhaps. (Though not necessarily so)
If you allow users to enter any form they like, what happens in a
Quebecois fireworks company that happens to employ a few Japanese and
Americans as well as indigenous staff, and sells into the UK for
Bonfire Night?
What I was referring to was if the user has a "preferences" page, for
example, where they can choose their desired date format from a
pre-determined list. Let's say either yyyy-MM-dd or MM/dd/yyyy or
dd/MM/yyyy.

The preference would be used on the server-side to render dates in the
output, but should also be used to validate date input fields and to
populate input fields based on a calendar popup or some in-page
calculations. For this, the javascript used to parse, validate, and
manipulate dates must be sufficiently generic to handle multiple formats.
You could write code that only handles the specific formats presented as
options, but that would require re-writing the javascript if a new date
format is made available. Instead, a general-purpose library written from
the start to handle almost any date format would be preferrable, even if it
costs a few more k in code "bloat".
More bloat - you must be paid by the yard of code.
On the contrary, the concept is so fundamental that it's hard to believe
you've not encountered it in your own experience.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 18 '06 #32

P: n/a
Tom Cole said the following on 9/13/2006 4:28 PM:
>Chance Favors The Prepared Mind
Randy Webb wrote:
It is from a Steven Seagal movie "Dark Territory" and is very fitting at
times.
OT: And probably borrowed from Louis Pasteur:
"In the fields of observation chance favors only the prepared mind."
Lecture, University of Lille (December 7, 1854)
http://en.wikiquote.org/wiki/Louis_Pasteur

Sep 18 '06 #33

This discussion thread is closed

Replies have been disabled for this discussion.