Test for null or undefined?

D

David Mark

I'll pass. Better things to do.


I'm unclear about what exactly it intends to do.


I don't use it. I'm pretty sure I said that.


Set or get DOM properties/node attributes, I presume. Apparently it
doesn't do this well, which is one of the reasons I don't use it. That
and the fact that I have never found a need for it.
[snip]

Very interesting.

http://markmail.org/message/ldgy4rawlddcisyy

It starts out:

"I took a look at the 'attr' function today and here are my comments."

So you have gone over this code, apparently in response to my
criticism posted in the fall of 2007. Unfortunately, your analysis
was myopic in that it focused only on the browser sniffing. Again, we
are not talking about an expansive piece of code. So, your claims of
helping this effort aren't confidence inducing.

Here's part of one of the responses, which defended the browser
sniffing:

"This one is easy to answer: consistent behaviour. Suppose I develop
in Firefox, only to find out during testing that it doesn't work in
IE. Due to the nature of this feature, I might have to redesign my
approach to the problem. Lots of lost time, for the dubious gain that
it works for no-IE use cases. If it cannot be made to work at one
place, it should fail everywhere. A consistency layer is not only
about emulating missing or broken functionality."

So other collaborators were inspecting this function back then as
well. Unfortunately, they were prone to techno-babble, rather than
debate.

Another threw in an anecdote about Sun Microsystems:

"Case study: Sun Microsystems de-facto in-house browser is Firefox.
Almost 100% of Sun employees have Firefox and use it as their primary
browser from what I hear."

Resig himself chimed in with this:

"I posted the following reply to comp.lang.javascript:"

Yeah, that was it. Just a self-congratulatory regurgitation of his
post to this group, which didn't address any problems, but did reveal
his inability to read for comprehension. IIRC, he quoted the typeof
xyz == 'array' blunder, but didn't seem to consider it a problem.

There was this endorsement from a clearly disturbed "XML centric"
developer. Gut-wrenching considering the topic at hand.

"I choose jQuery over other javascript libraries because of it's
ability to perform, the clarity of the docs, the talented community,
and most of all for it's elegance. I am an XML centric developer and
have always found the different treatment of 'The DOM' and 'any other
xml' very frustrating."

A vote of confidence:

"John I don't think I have smiled so much throughout such a long
thread in a very long time. Thanks for that. I know it must have been
tiring to justify (so well) all the reasons you have. Hopefully people
like the original complainer will just back off and leave ya alone for
a bit. You should post the replies to this somewhere on a blog so you
can refer back to it whenever someone complains like that again."

Oh brother. Don't think Resig will be posting *that* to a blog any
time soon. :)

This is clearly your "elegant" workaround for attr:

"Not stuck, just need to step out of jQuery for a ms. $('input#pwd')
[0].type = 'text';"

Another vote for browser sniffing:

"Feature-detect fails when a browser implements a feature, but
incorrectly. As a result, browser-specific workarounds are sometimes
necessary. Case closed.

Sent from my iPhone"

Send it back. I'll leave you with this self-referential time-wasting:

"Overall, I have to say I'm really impressed with the jQuery
Development team and the rest of us on the discussion list (if I can
say that in a way without complimenting myself). This thread had all
the right energy to snowball into a flame war / pissing contest and I
think you all have done a good job of keeping yourselves logical and
supportive."

And still completely in the dark. Good night.
 
D

David Mark

   ^^^^^^^^
Should have been "centred" (though maybe not s funny).



My recollection is that Resig did not explain/justify any of criticised
code, beyond implying that he knew what heat he was doing, and then
rapidly descending to the nonsensical position that nobody who had not
created their own general-purpose javascript library was qualified to
criticise his code.


<snip>

There have been more internal improvements than just that. Those bloody
silly isFunction and isArray methods are much changed, and some of the
method overloading has been taken down a notch so that it is more in
line with what realistically can be achieved in javascript.(and
re-documented so that it no longer asserts an ability to do the
impossible). There is even a move towards modularising the internal
structure, with the selector engine becoming a discrete component.

Of course the public API is still largely set in concrete, and likely to
stay that way, which pretty much precludes entire categories of initial
design mistakes ever being addressed. The dilemma of not wanting to pull
the rug out from under the feet of the people already using it. But
since in reality libraries do get releases in new versions that are not
back-compatible with previous versions there are opportunities at those
points do a major re-working of the API/general structure, though kangax
came close to expressing an alternative issue with doing that in:-

<URL:http://groups.google.com/group/prototype-core/msg/3904f48e1774cc75
 >

- where he wrote; "It's not clear what will be left of Prototype if it
was to change its
core way of doing things - ... ". That issue being the library's
identity; if you have been marketing an identity how far can things be
changed before its existing users start taking offence? Lasse may
suggest that these things will 'win' in the long run, but if they change
out of recognition before they 'win' would they have won at all?





It does seem that all the relative speed testing is carried out against
other general-purpose libraries. And against that benchmark 'concise'
comes down in JQuery's favour (for the time being). There doesn't seem
much interest in doing the comparisons on an absolute basis.


Presumably it is supposed to be short/small. But it is probably best to
regard the whole thing as pure marketing-speak.


Yes, I often read people promoting JQuery as 'whatever' and end up
thinking what on earth where you doing before that makes *this* look
simple, intuitive, intelligible, easy to maintain/debug, etc.?


An observation on these 'communities'; on:-

<URL:http://groups.google.com/group/jquery-en/>

I've already observed that culture. Interesting that on searching for
"attr(" and "jQuery" on Google, I stumbled across this on an IBM site:

http://www.ibm.com/developerworks/web/library/wa-jquery2/

On section waxes poetically about jQuery and attributes (or so the
author seems to think.)

"Before diving into these methods, let's look at what information
could be stored in page elements. Something as simple as a <p> may
only contain a CLASS or ID as information. Something like an <img> may
contain far more information, things like the "src", the "alt", the
"width", and the "height". Finally, something as complex as an <input
type="password"> may contain things like "defaultValue", "maxLength",
"readOnly", or "accessKey".

This diversity of potential variables has caused jQuery to create a
generalized function to access them. This function is the attr(name)
and is the generic way to access information from any page element.
Take a look at some examples to see how this works."

<img src="/images/space.gif" id="spacer" class="a b c" alt="blank">

// Calls to the attr() function will return the following
$("#spacer").attr("src"); // will return "/images/space.gif"
$("#spacer").attr("alt"); // will return "blank"

// Similarly, you can access the ID in the same way
$(img).each(function(){
$(this).attr("id"); // will return "spacer"
});

That last one is particularly insane.

// will change the maxLength on all password fields to 10 characters
$(":password").attr("maxLength", "10");

Will it? This one is a poser as it uses a property name for the first
argument and an attribute value for the second (the standard
incongruity is reversed.)

IIRC, the camel-case will bypass Resig's black list and it isn't one
of his "special" names either, so assuming an HTML DOM, attr will
attempt to set the maxLength property to "10." I suppose some agents
will allow that. Apparently the 100% safe and compatible alternative
of setting the property wasn't considered cool enough:

el.maxLength = 10;

Lots of similar articles to be found, all recommending similar
patterns. Most are quite recent and appear to have involved a lot of
work (if not thought.) What are these people taking?
 
M

Matt Kruse

You are so colossally ignorant.
[snip]
What a cop-out.

Why do you continue to invest so much time in these jQuery flame-wars?

You obviously don't use jQuery, so you shouldn't care about its
quality.

You surely don't recommend it to anyone, so you don't have to worry
about its improvements or roadmap or bug list, etc.

If you think it breaks web sites that you use, then
a) There are an awful lot of worse scripts out there that break sites
and I'd think you'd complain about them
b) Your approach to improving the broken web you use is quite
ineffective

If it just annoys the crap out of you that code exists and is used
that is not perfect or even logically sound, then you must be annoyed
by a _lot_ of things you see. I'd guess that some time spent with a
therapist would be more helpful than hours spent in jQuery
discussions.

And if it really just bugs you to the core that a person like John
Resig could get more attention, more popularity, more accolades, more
following, and more pats on the back than you - even though you view
yourself as far superior and more deserving of the praise - well, get
used to it.

So... what is it? Where does all this anger and annoyance come from?
Why do you continue this jQuery bashing repeatedly? Haven't you made
your point over and over and over? What do you hope to gain? You say
you have no desire to help improve such a flawed library as jQuery,
yet you repeatedly point out its short-comings. Why do you bother?

Matt Kruse
 
T

Thomas 'PointedEars' Lahn

Matt said:
You are so colossally ignorant.
[snip]
What a cop-out.

Why do you continue to invest so much time in these jQuery flame-wars?

You obviously don't use jQuery, so you shouldn't care about its
quality.

However David's style, your logic is flawed.


PointedEars
 
M

Matt Kruse

I wrote a reply to this, but apparently Google Groups puked on it, so
I'll summarize...

Let me make it clear to you.  That method is poorly designed and
executed and is completely unnecessary.  

So?

Matt Kruse
 
T

Thomas 'PointedEars' Lahn

Matt said:

The most compelling reason for analyzing and criticizing a piece of software
would be, of course, to provide a basis for a recommendation to others as to
why not to use it, and maybe as to why they should use something else
instead. However, evidently Davids comments and occasional rants did have a
positive effect on the thinking of jQuery developers (and John Resig in
particular).

It is therefore not logical of you to imply that he should better cease
these efforts. If anything, his efforts might be instrumental in changing
jQuery into something that can be truthfully recommended by other
knowledgeable developers one day; a fact that, I imagine, would be
appreciated by you the most.


PointedEars
 
M

Matt Kruse

The most compelling reason for analyzing and criticizing a piece of software
would be, of course, to provide a basis for a recommendation to others asto
why not to use it, and maybe as to why they should use something else
instead

I agree. But if that were truly his intention, then he is going about
it the wrong way because it's not working. Insulting those you are
trying to help will not accomplish the goal. Bashing the author of the
"bad" code will not help the cause. Being a jerk in public only makes
people _less_ interested in what he has to say.

Also, he rarely recommends better alternatives that are really helpful
to people. He just criticizes jQuery and points out the flaws. So I
don't think this "compelling reason" is what's behind his actions.
 However, evidently Davids comments and occasional rants did have a
positive effect on the thinking of jQuery developers (and John Resig in
particular).

Doubtful. Rather, I think the cooler heads who translated his rants
into something more useful had an impact. Discussion went on between
people who shared his technical observations but don't have his
negativity. There are other smart people in the world who know about
JS and are interested in jQuery, but aren't so vocal in public. He's
very vain to think that he was listened to so closely and that his
"contributions" actually mattered.
It is therefore not logical of you to imply that he should better cease
these efforts.  If anything, his efforts might be instrumental in changing
jQuery into something that can be truthfully recommended by other
knowledgeable developers one day;

And yet he has repeatedly said that he has no interest in helping to
improve the library, or ANY library. So I would think that he would
have no interest in pointing out jQuery's flaws, in the hopes that it
would fail miserably and prove his point.
a fact that, I imagine, would be
appreciated by you the most.

Not at all. I currently have no problems with jQuery with what I use
it for, and if I did have problems I'm competent enough to fix them
myself. The things he rants about are not rocket science. Sometimes
I'm amazed that he pats himself on the back so much for recognizing
the obvious.

Matt Kruse
 
J

Jorge

D

David Mark

You are so colossally ignorant.
[snip]
What a cop-out.

Why do you continue to invest so much time in these jQuery flame-wars?

Nothing I have posted here can be considered a flame. And I can't
stand having to correct you over and over, year after year. Will you
shut up about jQuery now?
You obviously don't use jQuery, so you shouldn't care about its
quality.

You don't use the plague. Why should you care about it's eradication.
You surely don't recommend it to anyone, so you don't have to worry
about its improvements or roadmap or bug list, etc.

My information is provided to save people a lot of time by skipping
the jQuery portion of the learning curve. Same goes for any of those
libraries (e.g. Prototype, MooTools.) I'm writing a book on the
subject as well. What business is it of yours?
If you think it breaks web sites that you use, then

You can't see the forest for the trees.
 a) There are an awful lot of worse scripts out there that break sites

Worse in what way? And if you come in here recommending those, you'll
have to them too.
and I'd think you'd complain about them

I do. Every time they are mentioned.
 b) Your approach to improving the broken web you use is quite
ineffective

You seem alone in that assessment. If Resig and his bunch weren't so
slow to figure things out and do actual work (as opposed to putting up
rock star Websites), it would be even more effective.
If it just annoys the crap out of you that code exists and is used
that is not perfect or even logically sound, then you must be annoyed
by a _lot_ of things you see. I'd guess that some time spent with a
therapist would be more helpful than hours spent in jQuery
discussions.

I do weary of these "flame wars" with you. Never you mind what annoys
me, why it might annoy me or anything else about me. You've got
plenty of other things to worry about.
And if it really just bugs you to the core that a person like John
Resig could get more attention, more popularity, more accolades, more

LOL. Resig gets a lot more negative attention, that's for sure.
Popularity? Are you in high school? Have you seen his friends?
following, and more pats on the back than you - even though you view
yourself as far superior and more deserving of the praise - well, get
used to it.

The praise for what? Resig never got any praise for anything I did
and I never got blamed for any of his mistakes. What are you saying?
Everything is some sort of race with you.
So... what is it? Where does all this anger and annoyance come from?

Who says I am angry? Do you even know me?
Why do you continue this jQuery bashing repeatedly? Haven't you made

*You* asked me to review the piece of shit. Twice. Your reaction has
been similarly petulant both times. Don't bother making any further
requests for guidance.
your point over and over and over? What do you hope to gain? You say

Again, none of your business, pal.
you have no desire to help improve such a flawed library as jQuery,

No? Then why have I done it? I'd say I'm the only one exerting any
positive influence on it at all. Where would they be without me?
Likely listening to you swear up and down that jQuery is free of
browser sniffing (that's where they were in fall 2007, remember?)
yet you repeatedly point out its short-comings. Why do you bother?

Again.
 
D

David Mark

I agree. But if that were truly his intention, then he is going about
it the wrong way because it's not working.

Seems it is working spectacularly. If only you knew what "it" is.

What a babbling buffoon. You sound severely rattled.

[snip]
 
T

Thomas 'PointedEars' Lahn

Matt said:
I agree. But if that were truly his intention, then he is going about
it the wrong way because it's not working. Insulting those you are
trying to help will not accomplish the goal. Bashing the author of the
"bad" code will not help the cause. Being a jerk in public only makes
people _less_ interested in what he has to say.

It is a capital mistake to theorize before you have all the evidence.
It biases the judgment.
-- "Sherlock Holmes" in A. C. Doyle's "A Study in Scarlet"
Also, he rarely recommends better alternatives that are really helpful
to people.

But he does.
He just criticizes jQuery and points out the flaws.

And that is good so. Because nobody else appears to be inclined to do it
(no wonder given that source code), and the flaws need to be pointed out.
In fact, I have marked many of his so-called rants for later reference
because they will help me to avoid the observed mistakes when updating my
libraries.
So I don't think this "compelling reason" is what's behind his actions.

Non sequitur.
However, evidently Davids comments and occasional rants did have a
positive effect on the thinking of jQuery developers (and John Resig in
particular).

Doubtful. Rather, I think the cooler heads who translated his rants
into something more useful had an impact. [...]

See? Cause and effect.
And yet he has repeatedly said that he has no interest in helping to
improve the library,

Yet he has made a number of postings not only here but where those who are
interested in the "library" meet (virtually). That they are not listening
to what he is saying would be, evidently, as much as their fault as is his
when stepping over the line in doing that sometimes. But I can accept that
minor flaw in his argumentation as long as the arguments themselves are
sound, and I can see the outcome as overall helpful, which I do.
or ANY library.

No, he has (and others have) repeatedly pointed out that the problem lies
with the underlying concept of a general-purpose library, and I agree. You
should take the time to read the postings here more thoroughly.
So I would think that he would have no interest in pointing out jQuery's
flaws, in the hopes that it would fail miserably and prove his point.

jQuery has already failed to provide the solution it advertises to be. That
much should be obvious. That there are individuals who cling to using it,
who find all kinds of excuses for using it as if that was a matter of life
and death (well, given their position in the learning curve, it certainly
must look that way) does not matter.
Not at all. I currently have no problems with jQuery with what I use
it for, and if I did have problems I'm competent enough to fix them
myself. The things he rants about are not rocket science. Sometimes
I'm amazed that he pats himself on the back so much for recognizing
the obvious.

I'm afraid you miss the point here. You of all people would appreciate more
knowledgeable people recommending and using jQuery as a result of
improvement, wouldn't you? But that cannot be achieved if no improvements
are made, and it doesn't look as if those improvements would be coming from
the original author within a reasonable amount of time. Therefore, it does
not make sense if you try to block attempts at improvement right from the
start, however bad-worded, full-mouthed, misguided, or ultimately futile
because of largely ignorant readers they may seem.


PointedEars
 
T

Thomas 'PointedEars' Lahn

kangax said:
I would assume that Lasse, as someone working on Chromium (afaik),

I wouldn't know.
should know the intricacies of Javascript engines quite well and is
probably stating arguments rather than "wishfully thinking".

Of that particular ECMAScript implementation for sure. There is no such
thing as a "Javascript engine".
In any case, I just asked one of the WebKit reviewers - Cameron Zwarich
- whether an `arguments` object is created when an `arguments`
identifier is not present in a function body.

He said:

[10:48am] cpst:
kangax: if 'arguments' is mentioned in the body of the function, it
creates it

[10:49am] cpst:
kangax: otherwise it creates it the first time f.arguments is accessed

He pointed me to this particular optimization in a 37050 changeset -
<http://trac.webkit.org/changeset/37050>

He also mentioned that:

[10:57am] cpst:
V8 does something similar, you could find it in their source by
searching for arguments

I don't have time to search through V8, but have all the reasons to
trust him.

Thanks. So that would be JSCore and V8; about, say, 5% of the market? What
difference does it make for past ECMAScript implementations still in use,
and current, let alone future ones?
On a side note, hasn't somebody already demonstrate here the actual
performance tests and how functions without `arguments` (or rather those
using alternative means to access whatever would have been accessed via
`arguments`) do indeed execute faster?

If I knew, I would have replied differently. If it was Jorge, I couldn't
know, and his test cases and results would be most certainly flawed.


PointedEars
 
M

Matt Kruse

And I can't
stand having to correct you over and over, year after year.  Will you
shut up about jQuery now?

I'm not sure what you "correct" me about. I agree with most of your
technical critiques of the code. I agree with your conclusions about
its badly-designed API. I agree that John Resig seems like he's
learning as he goes and doesn't seem to have a solid fundamental
understanding of js or many years of js development experience. I
agree that jQuery could be greatly improved. I agree that it's hack-
ish.

We just seem to disagree on how to say it and what to do about it.
My information is provided to save people a lot of time by skipping
the jQuery portion of the learning curve.  Same goes for any of those
libraries (e.g. Prototype, MooTools.)

Yet you seem to ignore the reality that the majority of the web
development world seems to disagree with you. Do you think you and the
minority are "right" and everyone else is just stupid? Or do you think
perhaps that you can't see the forest through the trees? If all this
were just an exercise in logic and robust coding, you'd be writing the
Bible for it. But there's so much more to it than that.
 I'm writing a book on the
subject as well.  What business is it of yours?

I'm curious. Will it have ninjas?
If Resig and his bunch weren't so
slow to figure things out and do actual work (as opposed to putting up
rock star Websites), it would be even more effective.

He is clearly more interested in marketing and the jQuery brand than
he is about pure technical quality, and using that popularity to
support his travels, talks, books, etc. That's been obvious for a long
time. I don't blame him. Sounds fun.
I do weary of these "flame wars" with you.  

Me too, it quickly becomes boring. I wish we could direct this energy
into a more beneficial direction. For example, I understand your
points about attributes vs. properties and how the attr() function is
a mangled mess of the two. I'd like to learn more about some of the
specific problems that I may not have experience with, but that's
buried under pages of sarcastic comments and negative tone. Doesn't
seem helpful.

What I really wish is that we could branch jQuery, simplify the API,
re-state some goals, throw out the shit, and fix the things that are
broken. But in the end be left with something that would be
recognizable as a "re-invented" jQuery that competent developers
wouldn't be afraid of adopting, and novice js developers could adopt
without spending months or years learning everything they would need
to in order to produce something similar. Unfortunately, that will
never happen. So jQuery is still left is the next-best option for me
and many others.
The praise for what?  Resig never got any praise for anything I did
and I never got blamed for any of his mistakes.  What are you saying?

It seems to me that you're annoyed at the praise and attention that
John Resig seems to get (whether you like it or not, jQuery is
enormously succesfull), and you wish the world would just understand
that you have the better way. But people won't listen. *shrug* My
characterization may be way off. It doesn't much matter.
No?  Then why have I done it?

I don't believe you have.
 I'd say I'm the only one exerting any
positive influence on it at all.
Where would they be without me?

Delusions of grandeur. But that's okay, I guess.

Matt Kruse
 
M

Matt Kruse

So nothing.  Never mind.  I have no more time for you.

It was an honest question.

You have identified flaws in jQuery. But what does that mean to you?
Because it seems to mean different things to different people.

To me, it means:
a) The quality of the underlying code is suspect
b) I need to be careful if I choose to use this method
c) I may be able to help improve it for future versions

Finding flaws in a product (even severe ones) is not necessarily a
reason not to use it. I've used Windows for a decade, despite its huge
flaws. I've spent countless hours just trying to get the damn thing to
work right and not crash. But I still use it. Linux is technically
superior in so many ways. But I choose not to use it. Weird, isn't it?

My point is - you have identified problems in the jQuery code. And yet
it does seem to work for most cases, for most people. So what is your
point? That the whole library should be thrown out? If so, then what
do you suggest to replace it with? You don't seem to offer any
alternatives to the countless people currently using it, other than
"go do your homework and write your own reusable code from scratch,
it's the only correct way to do it!" Great! But completely
unrealistic, and that's why people continue to flock to libraries like
jQuery despite its technical problems.

Matt Kruse
 
J

Jorge

(...) If it was Jorge, I couldn't
know, and his test cases and results would be most certainly flawed.

Yes yes thanks, that's wisdom enough for today from Pointedears the
Enlightened One.
But now go back to studying and see if you are able to (finally) grasp
what's the deal with closures... jejeje
 
G

Garrett Smith

Thomas said:
However, that guy is notorious for not understanding what he's doing and
thinking otherwise.

I would avoid that, too, for the same reason. Using |arguments| prevents
an implementation from making an optimization.
That the arguments object is not created when not used is an unfounded
assumption, or rather wishful thinking on your part in order to support your
argument. The ECMAScript Specification, Edition 3 Final, widely implemented
as opposed to the ES 4+(!) dreaming, says otherwise.

An ECMAScript implementation guarantees behavior. (So much for debunking
an "unfounded assuption"). If a function body does not make a reference
to |arguments| or |eval|, an implementation could create an optimized
call for that function.

Implementations may make a static analysis of the function to determine
if an optimized call can be performed and perform such optimized call,
if the side effects of such call would not be observable (excluding the
improved performance time).

It has been demonstrated that implementations actually seem to do this.

However, it the question is to determine if a function foo:-

function foo(x){
alert(x === undefined);
}

- has been passed an argument, as in:-

foo(undefined)

- as opposed to -

foo()

- would be to check the arguments object.

10.1.3 guarantees that missing parameters get value |undefined|.

| If the caller supplies fewer parameter values than there are formal
| parameters, the extra formal parameters have value undefined.
So much for being helpful.

This has been discussed on here in detail before.

Garrett
 
D

David Mark

I'm not sure what you "correct" me about. I agree with most of your
technical critiques of the code. I agree with your conclusions about

Evidently, you don't understand the critiques at all, other than the
most obvious (e.g. browser sniffing.)
its badly-designed API. I agree that John Resig seems like he's
learning as he goes and doesn't seem to have a solid fundamental
understanding of js or many years of js development experience. I
agree that jQuery could be greatly improved. I agree that it's hack-
ish.

Yet you disagree that it should be avoided. (!)
We just seem to disagree on how to say it and what to do about it.

How to say what?
Yet you seem to ignore the reality that the majority of the web
development world seems to disagree with you.

Of course not. The majority of Web developers have no idea about
Javascript or browser scripting in general. This is news?
Do you think you and the
minority are "right" and everyone else is just stupid?

Ignorant would be more kind, but doesn't always apply.
Or do you think
perhaps that you can't see the forest through the trees? If all this

Have you noticed that every time I say something it pops up later in
one of your posts? A similar situation exists with the jQuery code,
but it takes years, rather than hours to reflect.
were just an exercise in logic and robust coding, you'd be writing the
Bible for it. But there's so much more to it than that.

Much more to what than what?
I'm curious. Will it have ninjas?

How many Ninjas does it take to create an XHR object or set opacity?
He is clearly more interested in marketing and the jQuery brand than
he is about pure technical quality, and using that popularity to
support his travels, talks, books, etc. That's been obvious for a long
time. I don't blame him. Sounds fun.

So he sells worthless books, perpetuating his fanciful ideas about
browser scripting, lots of neophytes buy in to them, spreading junk
code from one corner of the Web to the next and you don't blame him a
bit. Who do you blame?
Me too, it quickly becomes boring. I wish we could direct this energy
into a more beneficial direction. For example, I understand your
points about attributes vs. properties and how the attr() function is
a mangled mess of the two.
So?

I'd like to learn more about some of the
specific problems that I may not have experience with, but that's
buried under pages of sarcastic comments and negative tone.

You are so easily distracted? What are you, a baby?
Doesn't
seem helpful.

There's an overused sentiment.
What I really wish is that we could branch jQuery, simplify the API,

Branch jQuery? Why fix something that is "not broken?"
re-state some goals, throw out the shit, and fix the things that are
broken.

So you admit it is broken?
But in the end be left with something that would be
recognizable as a "re-invented" jQuery that competent developers
wouldn't be afraid of adopting, and novice js developers could adopt
without spending months or years learning everything they would need
to in order to produce something similar.

And therein lies the flaw in your thinking.
Unfortunately, that will
never happen. So jQuery is still left is the next-best option for me
and many others.

Next-best option for what and for whom? After all of this, you are
still going to use jQuery?
It seems to me that you're annoyed at the praise and attention that
John Resig seems to get (whether you like it or not, jQuery is
enormously succesfull), and you wish the world would just understand

No, it is a colossal failure. It would be less of a colossal failure
if less people had rushed to adopt it.
that you have the better way. But people won't listen. *shrug*

LOL. The people that matter are listening. You just aren't a member
of that club.
My
characterization may be way off. It doesn't much matter.

Nothing matters does it?
I don't believe you have.

And I don't much care what you believe.
Delusions of grandeur. But that's okay, I guess.

You are the last guy who should crack about delusions. :)
 
D

David Mark

It was an honest question.

You have identified flaws in jQuery. But what does that mean to you?

It means:

1. It is broken.
2. The people charged with fixing it are incapable.
3. It complicates, rather than simplifies
Because it seems to mean different things to different people.

To quote John Resig: "broke is broke."
To me, it means:
 a) The quality of the underlying code is suspect

LOL. It's been booked, printed and sentenced to life (three strikes
and all.)
 b) I need to be careful if I choose to use this method

You are just inconceivably thick. Do you normally need to "be
careful" when setting DOM properties?

http://jquery.open2space.com/node/13

http://mindforks.blogspot.com/2008/11/using-attr-for-aria-in-jquery-ui.html

http://www.nabble.com/attr("href")-giving-full-path-instead-of-relative-in-IE-td22704487s27240.html

http://www.ibm.com/developerworks/web/library/wa-jquery2/

It's too late. Those jackasses should have taken care when they
*wrote* the code. Would have prevented others from writing about
their nonsense as if it were the greatest thing since sliced bread.
 c) I may be able to help improve it for future versions

What does that mean to a developer who needs to deploy a site
*today*? That they might be able to upgrade the whole interdependent
mess at some point in the future? Considering the lag with the plug-
ins and widgets (which you yourself have compared to the plague), that
sounds like a very hard way to go.
Finding flaws in a product (even severe ones) is not necessarily a
reason not to use it. I've used Windows for a decade, despite its huge

I don't care how long you have been using Windows. Windows vs. Mac
bears no resemblance to jQuery vs. common sense.
flaws. I've spent countless hours just trying to get the damn thing to
work right and not crash. But I still use it.

What's the definition of insanity?
Linux is technically
superior in so many ways. But I choose not to use it. Weird, isn't it?

Not really. But then I know you.
My point is - you have identified problems in the jQuery code. And yet
it does seem to work for most cases, for most people.

Software that does seem to work for most cases, for most people is not
to be recommended. Especially if you don't know *which* people or
cases. Certainly the Web would be last place for such code.
So what is your
point? That the whole library should be thrown out?

For the love of God, yes.
If so, then what
do you suggest to replace it with? You don't seem to offer any
alternatives to the countless people currently using it, other than

There was a time in history when countless people had the plague.
What should they have replaced that with?
"go do your homework and write your own reusable code from scratch,

Not the "write everything from scratch" argument again. Are you
kidding?
it's the only correct way to do it!" Great! But completely
unrealistic, and that's why people continue to flock to libraries like
jQuery despite its technical problems.

Flock is definitely the right word. You better watch out, there may
be dogs about.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top