From: Stefan Weiss on
On 01/03/10 23:50, lorlarz wrote:
> On Mar 1, 4:29 pm, Stefan Weiss <krewech...(a)gmail.com> wrote:
>> So, I don't see a problem with JQuery not passing JSLint. If you trust
>> the JQuery developers to write the code you're using, you might as well
>> trust them to decide which JSLint problems are worth fixing (as long as
>> they're aware of them, which they now are).
....
> I appreciate your assessment of jQuery.

I don't use jQuery, and I haven't seen enough of its code to give any
sort of assessment, positive or negative. I was only talking about the
JSLint results. I do appreciate the manner in which they were received
(prompt fix, no excuses, no hyperbole).

> I do have yet to
> see anyone, even the biggest critics, provide any information
> about anything really wrong with jQuery -- in the sense that
> something does not work (and when things like that come up,
> they tend to be minor an tend to be caught by the jQuery
> community itself).
>
> The ones with the incredibly negative opinions of jQuery
> have not, in my view, made a case. But I will be watching.

A lot of problematic passages in JQuery have been identified and posted
in this group, mostly by David Mark. They can be a little hard to find
among all the noise, but there definitely are problems. Matt Kruse
recently posted a short meta-list of common complaints. It is
unfortunate that the person who usually finds these problems and the
person who could fix them are currently not on talking terms.


--
stefan
From: David Mark on
lorlarz wrote:
> On Mar 1, 11:50 am, lorlarz <lorl...(a)gmail.com> wrote:
>> On Mar 1, 11:11 am, lorlarz <lorl...(a)gmail.com> wrote:
>>
>>
>>
>>
>>
>>> On Mar 1, 10:22 am, lorlarz <lorl...(a)gmail.com> wrote:
> [snip]
>
>
> You may be interested to know that in response to this JSLint barrage
> (which I have also contacted John Resig personally about), John
> has decided to make a couple of changes and is considering making
> a couple (or some) others.

Highly uninteresting as that's what he does. A couple of changes?!
He'll veto the rest as a waste of time.

> The following links, provided by J. Resig
> supposedly have something to do with 2 changes made so far:
>
> http://github.com/jquery/jquery/commit/a18f682012ae8e63f3b43b39375b3c5ce0a561e3
> http://github.com/jeresig/sizzle/commit/89dd2b35d51693f46b2043149243920b380ad474

He's only got 998 or so to go. :)

>
> He also said he has one thing to investigate and another he is unsure
> of.

So two more. And this will lead to another release, which will lead to
some small percentage of sites "upgrading" (and likely breaking), all
because he couldn't be bothered with QA for the first few years. Why
would anyone wait around for him to reach a suitable level of
proficiency? I don't think he'll ever get there.

> Also: It is also noteworthy that at least one of the errors cited
> by JSLint was seen as a real error _needing_ fixing.

I'm not shocked. They could have found it themselves. Who knows how
long it has been festering?

>
> John Resig encourages people to keep up on any changes by getting
> the most recent release always: http://code.jquery.com/jquery-nightly.js

I bet. But you can't re-download, re-test and re-deploy every freaking
day! Software is supposed to be tested by the authors _before_ it is
released.

>
> I shall not pass any judgement on any of this.
>

I shall. They suck at this stuff.
From: David Mark on
lorlarz wrote:
> On Mar 1, 4:29 pm, Stefan Weiss <krewech...(a)gmail.com> wrote:
>> On 01/03/10 20:22, lorlarz wrote:
>>
>>> On Mar 1, 12:45 pm, lorlarz <lorl...(a)gmail.com> wrote:
>>>> You may be interested to know that in response to this JSLint barrage
>>>> (which I have also contacted John Resig personally about), John
>>>> has decided to make a couple of changes and is considering making
>>>> a couple (or some) others. The following links, provided by J. Resig
>>>> supposedly have something to do with 2 changes made so far:
>>>> [snipped mangled link]
>>>> He also said he has one thing to investigate and another he is unsure
>>>> of.
>>>> Also: It is also noteworthy that at least one of the errors cited
>>>> by JSLint was seen as a real error _needing_ fixing.
>> That's just a missing semicolon. It's not an "error _needing_ fixing"
>> (in this case), and John Resig didn't say it was. It's good style to add
>> the semicolon even if it's not strictly required, that's all.
>>
>>>> John Resig encourages people to keep up on any changes by getting
>>>> the most recent release always:http://code.jquery.com/jquery-nightly.js
>>>> I shall not pass any judgement on any of this.
>>> P.S. John adds that he has also made this fix:
>>> http://github.com/jeresig/sizzle/commit/bba54187feed83914d9a83b4b74c5...
>>> Unfortunately, he will not participate here
>> I'm not surprised.
>>
>>> and has basically insisted
>>> that these issues be discussed in the following forum:
>>> http://forum.jquery.com/developing-jquery-core
>> Looks like the logical place for your report. Apparently Resig has
>> already fixed many of the minor issues you mentioned, and decided to
>> look into some others. I wouldn't worry too much if JSLint still comes
>> up with some "problems" after he's done; not everything it finds is
>> actually a problem.
>>
>> JSLint has always had its little idiosyncrasies. It doesn't check
>> syntax, it checks code style - and in the absence of official style
>> guidelines (like they are used in many companies and projects), you'll
>> have trouble getting any two developers to agree on a single set of
>> rules. JSLint uses the subset of JS that Crockford has defined in his
>> book as the "Good Parts", and a number of other rules which he considers
>> important.
>>
>> Unfortunately, not all of these rules make sense for everybody, and many
>> of them are hardcoded. The regex lints you posted are a good example:
>> JSLint will complain about something like /[ab-]/ ("Unescaped '-'"), but
>> there's nothing wrong or ambigous about it. Adding escapes where none
>> are necessary is, IMHO, the opposite of good style. There are many other
>> examples, like the inability to call functions in a line earlier than
>> their declaration, the inevitable warning if functions are created in a
>> loop, and more regex hysteria.
>>
>> To the best of my knowledge, there are no alternatives to JSLint, so we
>> have to take the good with the annoying, or do without a lint checker.
>> The JQuery team has decided to go with the latter option, which is
>> understandable, but it made them miss some of the issues you pointed
>> out. Personally, I usually just roll my eyes and change a few characters
>> to make JSLint happy, or use a wrapper script which lets me insert
>> inline comments to suppress JSLint output.
>>
>> So, I don't see a problem with JQuery not passing JSLint. If you trust
>> the JQuery developers to write the code you're using, you might as well
>> trust them to decide which JSLint problems are worth fixing (as long as
>> they're aware of them, which they now are).
>>
>> --
>> stefan
>
> Stefan
>
> Yes, indeed it looks like it was a semicolon that really
> did _not_ need to be fixed, thus I misspoke.
>
> I appreciate your assessment of jQuery. I do have yet to
> see anyone, even the biggest critics, provide any information
> about anything really wrong with jQuery -- in the sense that
> something does not work (and when things like that come up,
> they tend to be minor an tend to be caught by the jQuery
> community itself).

Then you haven't been paying attention. Not only have I pointed out a
boatload of things that don't work, but I have then documented the
futility that followed when they were informed about them (i.e. they
didn't fix the problems as they couldn't understand them).

>
> The ones with the incredibly negative opinions of jQuery
> have not, in my view, made a case. But I will be watching.

You just missed it somehow. The case was built over the course of
_years_ and it is airtight.

Here's one thing to look at:-

http://www.cinsoft.net/queries.html

Here's another:-

http://www.cinsoft.net/jquerysucks.html

Search the CLJ archive for tons more.
From: David Mark on
lorlarz wrote:
> On Mar 1, 11:46 am, Gregor Kofler <use...(a)gregorkofler.com> wrote:
>> lorlarz meinte:
>>
>>> David,
>>> I don't think you know how well jQuery is doing.
>> I'm pretty sure he knows.
>>
>>> It is by far the
>>> most used JS library and has had and continues to have the fastest
>>> growth. Moreover, jQuery is now used somewhere in a full 20% of
>>> web sites on the Earth.
>>> We must stay critical about it. But, while other libraries may be
>>> failing, from any use standpoint, jQuery is not.
>> And? You should know by now, that there is no relation between code
>> quality and widespread use. (After all Internet Explorer 6 is still the
>> most popular browser on this planet's face...)
>>
>> Zillions of web pages claim to be XHTML 1.0 strict - hardly anyone
>> really is. Bottom line: Most web authors are quite incompetent when it
>> comes to web authoring, and they are *completely* clueless when it comes
>> to browser scripting. Tthat's why the resort to some library or -
>> frequently - a bunch of them (I once had to work on a site sporting
>> jQuery, Spry and mootools plus "plugins" and "extensions"; it was
>> "leaking badly").
>>
>> Gregor
>>
>> --http://www.gregorkofler.com
>
> This might make a lot of JS people here mad, but I _want_ to use
> jQuery.

Why should anyone care if you _want_ to shoot yourself in the foot. As
noted by several people, cleaning up the syntax won't cure its real ills
(the logic) any more than cleaning up Dojo's syntax cured its problems.
It's just a first step to clear things up enough so that the real work
can begin (and history has shown that the jQuery developers are not up
to doing any real work).

> I just want to have all assurance or reasonable
> quality control.

Then for Christ's sake, listen to people who know better and don't use
that piece of junk. Why do you _want_ to use it? Because you see lots
of other people using it? If they all jumped off a bridge, would you
follow suit?

> At the very least, jQuery is very close to
> OK.

No, it isn't. You are getting hung up on the JSLint results, which is
odd as they don't indicate that all is well either.

> I just really want to know if there are any _real_ errors
> that make things work wrong.

There _are_ and JSLint is oblivious to them (as is John Resig).
From: lorlarz on
On Mar 1, 6:27 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
> lorlarz wrote:
[snip]
>
> > This might make a lot of JS people here mad, but I _want_ to use
> > jQuery.
>
> Why should anyone care if you _want_ to shoot yourself in the foot.  As
> noted by several people, cleaning up the syntax won't cure its real ills
> (the logic) any more than cleaning up Dojo's syntax cured its problems.
>  It's just a first step to clear things up enough so that the real work
> can begin (and history has shown that the jQuery developers are not up
> to doing any real work).
>
> > I just want to have all assurance or reasonable
> > quality control.
>
> Then for Christ's sake, listen to people who know better and don't use
> that piece of junk.  Why do you _want_ to use it?  Because you see lots
> of other people using it?  If they all jumped off a bridge, would you
> follow suit?
>
> > At the very least, jQuery is very close to
> > OK.
>
> No, it isn't.  You are getting hung up on the JSLint results, which is
> odd as they don't indicate that all is well either.
>
> > I just really want to know if there are any _real_ errors
> > that make things work wrong.
>
[snip]

I am a long time JavaScripter and tend to use jQuery only very
sparingly for select purposes, where it makes things not just
a little easier but a LOT easier. (I have been criticized for
using it too little; and, I do still write most programs without
it.)

If we could just focus on the JSLint results which I have some
appreciation for. Mainly: Why must I comment out the 2 single
lines and the block of 5 lines in order for JSLint to make
it further (and on through to the end of jQuery)? What is wrong
with _those_ 3 areas of code -- _that_ worries me.
That seems most serious. At least
a good bit of anything else serious seems to be being addressed
by Resig.

David, I looked at the couple of web pages you cited and would
thusly not use jQuery for purposes where those sorts of things
come up (though I will admit that I did not look at the web
pages long enough to really much figure out what they were
about, but it seemed limited and specialized).