On Dec 13, 6:06 pm, John Resig <jere...@gmail.com> wrote:
> Just got word from Paul Irish that David Mark is refusing to provide
> an open license for his attribute test suite - in fact he's
> threatening legal action against me and the Software Freedom
> Conservancy if we should "cop[y] one word or the tiniest aspect of the
> design". Naturally, that branch with the test suite has been
> completely deleted.

David Mark is an ass. Unfortunately, he's an ass who has a very deep
understanding of js and makes very good observations about code
quality and robustness. Since I value critical looks and logic and
algorithms, and I use and develop for jQuery frequently, I find myself
in a position where both sides of the debate are valuable to me.
Trying to find the common ground sometimes proves frustrating.

> This attitude is why I refuse to read anything in comp.lang.javascript
> and every single time I even get a whiff of what goes on over there I
> completely regret it.

The group is growing increasingly irrelevant, but there are a number
of quality contributors who have very good understandings of the js
language. They can spot problems and identify potential issues better
than most. Although the environment is hostile and populated by many
guys I probably would not care to hang out with personally, sometimes
it's worthwhile to ignore all that and just focus on the objective
arguments being made. I can definitely sympathy with not wanting to
tread those waters, but that seems kind of like a "see no evil, hear
no evil" attitude.

> Matt, I definitely welcome your help or feedback to the jQuery
> project, but please provide your own test cases, test suites, and bug
> reports from now on - this goes for anyone else as well. As far as I'm
> concerned comp.lang.javascript is completely tainted and using any
> code or recommendations from them will be ignored.

Unfortunate, but understood.

> This is pretty amusing, actually - threatening legal action against
> others for using common-sense test cases is a sure-fire way to make
> sure that no one with any sense will read or use the contents in
> comp.lang.javascript again.

Some of the people there (David Mark especially) seem to have personal
issues with jQuery. Maybe jQuery stole their girlfriend in high school
or beat them up on the playground. I don't know. Their bias ends up
being a vendetta, and even if they have reasonable criticisms they end
up being lost in their diatribes. I don't understand the hostility.

> So it goes. If anyone that hasn't read the aforementioned thread/tests
> is interested in writing up some more-comprehensive attribute tests
> for us we'd definitely appreciate it.

I will take a look at this when I get a chance. I'm not going to copy
his code, but if there are any similarities then he can sue me.

I think one of the core problems is understanding what attr() is
intended to do. Clearly it is not just a get/setAttribute wrapper.
Clearly it is not just meant to access the properties of elements. It
is a mixture of several different ways to access "attributes" of an
element, and it apparently tries to pick the best approach and give
the user what they want. Calling height() instead of accessing
a .height property or doing getAttribute('height') may give some users
what they expect, but is it predictable? What if I really do want the
'height' property, and not the current computed value? How will I know
which I am going to get?

If my current markup has an 'xxx' attribute and jQuery successfully
gets the attribute value, but then later adds a xxx() method and
returns that value instead, upgrading jQuery will break my code. But
how could I have known that this would happen? Knowing what attr()
will do has become entirely unpredictable, and even writing test cases
becomes difficult because it's not clear what the method is _supposed_
to do.

As it is now, I always recommend that attr() be avoided in code, and
if someone uses it in code I am looking at, I tell them to remove it.
It's too fragile and the logic that it is intending to code is not
well documented, so we can't depend on it. Luckily, it's easily coded
around. Unfortunately, many plugins and examples use it quite a bit.

Since this single method is such a consistent base of attack on
jQuery's quality and robustness, and because it is used so often in
code, I think it would be a good idea to clarify what attr() is really
intended to do and put it into words. As it is now, I'm not sure
anyone can really concisely describe it.

Matt Kruse

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to