David said:
Scott said:
:
[in response to Matt Kruse]
You are in a small subset of developers that use jQuery by choice, yet
are also highly critical of it. In fact you might be the only person
I've read that shares those characteristics. Not that there's anything
wrong with that, just a somewhat unique view.
You can put me in that category as well.
The category of those who abdicate responsibility for cross-browser
scripting to the jQuery authors (of all people), despite being told
repeatedly of their collective incompetence?
No, you must have misread.
It is a very rare case where I misread (and this is not one of them).
I was discussing the category of people
who use their clients' and employers' resources wisely,
That would be the "category of people" who "wisely" use a dubious 70K
script that has been proven to be incompetently written and
maintained.
There's that word again.
http://farm4.static.flickr.com/3211/2347642183_91247aa0c8_o.jpg
that work well for the environments those clients care about,
You mean that break in last year's browsers, barely "work" in a
handful of today's browsers, are too bloated for mobile devices and
are a good bet to break in next year's browsers, requiring costly
"upgrades" and reboots of QA testing. And, of course, the clients
rarely understand any of this. You are supposed to be the "wise"
expert steering them clear of costly junk code.
people
who understand enough about browser-scripting to do the work
themselves
That's a crock (and completely irrelevant). The client doesn't care
what you think you can or cannot do. They care what you *actually* do
with their money. And saying you could have done things in competent
fashion but didn't raises serious questions about your integrity.
but choose to use a library that substantially speeds up
certain parts of the job,
As we've been over about a million times, the "speed up" is an
illusion. It may save you a few minutes in the present, but these
"savings" are borrowed against future losses.
people who make up their own minds about the
competence of their tools and the authors of those tools.
Everyone should make up their own minds. The information is out
there. What you do with that informations sheds light on your mindset
and reasoning ability (or lack thereof).
No. In fact, it does simplify my development.
See above. The long-term costs and benefits are far more complicated
than you make them out to be.
Odd that you think you
can see over my shoulders from way back there.
Way back where? I'm so far ahead of you that you've disappeared over
the horizon.
Are you really as
arrogant as you come across?
It's easy to come off as arrogant in an industry teeming with cargo
cults and pseudo-intellectual apologists.
As we've been over repeatedly, CSS-selectors are often the very best
tools for the job.
You must not have been paying attention during those discussions. CSS
selector queries are virtually *never* the "best tools" for the job.
This is particularly true when using demonstrably faulty
implementations (as would be expected). jQuery is a prime example.
And I know that you've read enough of jQuery's
source to realize that the selectors engine is probably 15% - 20% of
the total.
I don't know where you came up with that figure. The whole thing is
tangled up with selectors and all of it is highly dubious. From the
event handling to the silly animations, it is all junk code (and has
been shown to be such so many times that arguing anything else
indicates madness.
No. I am willing to hand off code that I know is not perfect,
The pigeonholing of code as "perfect" or "not perfect" is a disturbing
trend. Such oversimplifications have no place in programming.
if I
can comfortably describe its limitations and flaws,
But you can't. You've demonstrated repeatedly that you have no clue
(see also Matt Kruse). And the crap changes constantly anyway, so
whatever land mines you've mapped out today may well change position
tomorrow.
and if it works
reliably.
jQuery does not work reliably in any sense of the word.
What I'm not comfortable doing is handing off code that I
think the client cannot fix themselves or for which they cannot find
simple help fixing.
The goal is to hand off code that will not *need* fixing. Handing off
something that you *know* is broken in numerous ways is clearly
contrary to that goal.
I'm afraid right now that any clients I have who
do not have the expertise to fix things themselves would not get
helpful responses from the minimal community around My Library.
That's a worthless argument and assumes that the only two choices are
jQuery and My Library. Furthermore, quantity doesn't trump quality.
Most people who have questions about My Library get help straight from
*me*, not fellow pattern rearrangers.
No, that doesn't bother me much. Frankly, it's you and the attitude
you display here that prevents me from even considering suggesting My
Library to any clients.
Then you admit that you allow your own feelings (however misguided) to
influence the critical decisions you must make on behalf of your
clients or employer? That's not how business works. Companies
couldn't care less about your feelings. They care about how many
times they have to re-download jQuery and re-test their applications,
how many end-users are needlessly excluded due to dubious decisions,
etc.
I'm afraid you don't recall correctly.
I'm afraid I do.
My position was simply that
you were misusing the speed test as a conformance test,
So, let me get this straight. Because the test in question measures
both speed as well as conformance, its results on the latter must be
dismissed out of hand. It compares a wide variety of query engines
and their ability to retrieve the correct results. The presence of
almost random results and exceptions across the board (save for my two
columns of course), varying from one browser to the next is of no use
to you because of the word "speed" in the title?
misrepresenting the other libraries thoroughly in the process.
I misrepresented nothing. You tried to sieze on the fact that one of
the columns was jQuery 1.21 (though in reality it turned out to be
1.26). As was explained to you at the time, that was the last version
of jQuery that did not use QSA. The code that newer versions of
jQuery (featured in adjacent columns) fall back on when QSA fails is
very similar to the code found in 1.26 and therefore similar results
can be expected when those versions are used with browsers that do not
feature QSA. Furthermore, it's been demonstrated ad nauseam that this
code is highly incompatible with QSA rendering the decision to layer
the two as ridiculous as most other aspects of the jQuery design.
The tests are mostly basic selectors that all of the "major" libraries
claimed to support. You had some problem that I added additional
selectors not found in the "standard" Slickspeed tests (of which there
is no standard rendition). And as was noted at the top of the page,
several of the selector categories (e.g. nth-child) were newly added
features to My Library. So, like some scheming child you went back
and dug up an old version of My Library that had no code to figure
such selectors (and made no claims to feature such code), cooked up
your own "test" that predictably failed for the selectors that had no
support. Somehow you equated that with the failings of the others,
despite the fact that they always claimed to support those selectors
and had code in place to attempt to do so. That was the
misrepresentation you remembered and it was clearly yours alone. As I
noted at the time, I'd never seen such an ignorant (and transparent)
display and you were clearly trying to smoke-screen the results that
exposed your own bad decisions.
They haven't for me or my clients.
The thing is, when clients realize they've been had by overconfident
rookies with puffed up resumes, they don't call back and they aren't
likely to keep them in the loop regarding efforts to fix the problems
they introduced. No news can be bad news in this business.
I've written table-striping code for when I can't add the "odd"
classes on the server.
You like to talk about what you've done. I don't see it as relevant.
I've written several different version of such
code.
Yes.
It's not at all difficult to write.
Of course it isn't difficult to set the class of alternating rows in a
table.
But including that code in
my build and adding whatever calls are needed to apply it is more
difficult than doing this:
$("#myTable tbody tr
dd").addClass("odd");
Same bogus argument. Even if it were more difficult, taking the easy
way out to save a few minutes is not the hallmark of a competent
professional. Feeding that monstrosity into some QSA/jQuery stack is
pure lunacy. I rip such code out of projects on an almost daily
basis.
Moreover if I decide I want to apply it to a certain class of tables
instead, I don't need to ensure that I can collect them by class name
and then run a loop over the bunch. I can do this instead:
$("table.zebra tbody tr
dd").addClass("odd");
Yeah, thanks for the lesson queries and chaining.
I don't have to want to use all the code that jQuery supplies, just
enough of it that it's worth my time dealing with its flaws.
You can't be a little bit pregnant and using a large, monolithic
library when you only "need" a fraction of its features is the classic
script kiddie mistake.
Software either meets your needs or it doesn't.
Your perceived needs are irrelevant. And your clients needs are never
served well by dropping jQuery into a project.
Doesn't it annoy you when posters come here complaining just that
their script "doesn't work?"
Yes it does.
We need to know what they expect before
we can tell for ourselves that it doesn't work.
Yes.
The same holds true
for libraries.
In terms of logic, you just took a sharp turn right off a cliff. You
clearly don't know much about how jQuery works (or doesn't) and what
little you do know you seem to dismiss as irrelevant (e.g. miscounts
and exceptions documented in the context of "speed tests" don't
count).
What I expect out of them is clearly something less
than what you expect.
Clearly.
So you shouldn't use them, clearly.
Obviously I don't. I barely use my own library.
But your
evangelizing against them has really not convinced me that these
libraries are inherently flawed.
Then you are too thick to be trying to write cross-browser scripts.
Do you think Donald Knuth never wrote any bad code? Was Edsger
Dijkstra's code so perfect that no one would ever find a flaw in it?
That's irrelevant.
Talent is only part of the story.
Well, for example, the authors of jQuery have not demonstrated much in
the way of talent for the sort of problem-solving required to write a
cross-browser script. That's a huge part of that story.
It's important, but there is more
to well-built software, especially software built by a community.
Results are results. All of this babbling about "it takes a village"
when the software is miscounting and throwing exceptions (among many
other things) is ridiculous. The village in question is obviously
full of idiots.
It seems apparent to me, but in a manner that belies the rest of your
argument. Which do you think you should trust more, a reasonably
small script that you can understand in detail with some concentrated
effort, whose flaws you can detail for yourself efficiently -- or a
50+-million lines-of-code behemoth that you can only treat as a black
box?
You aren't making any sense in context. My argument is that you can't
compare operating systems (which you are pretty much stuck with) with
dubious blobs of JS (which are 100% transparent and avoidable).
I think it might do that for script kiddies.
You are the worst sort of script kiddie, disguised as an intellectual.
But for competent
developers, it's just a collection of short-cuts for things they could
do themselves if they really wanted to.
Competent developers don't use jQuery. They don't even consider it.
And therein lies the rub (for you). You don't want to admit that
you've made incompetent decisions, so you babble on about
"misrepresentations" and "communities" and whatnot. It's disgusting.
I do a lot of work in Java.
So did the Dojo nuts. It's a rare individual who makes the transition
to browser scripting.
And years ago I wrote logging systems to
fit my needs.
So?
They were better adapted to exactly what we wanted to
do than any general-purpose logging library ever could be. But I
would probably never write one again, because the general-purpose
libraries have gotten so useful, and they work well-enough for my
needs, and they come without several weeks worth of development.
Java is not browser scripting. The typical Java developer doesn't get
that it takes far more discipline to use a "toy" language to script
browsers, so they try to go about it like they were writing Java
applets. It doesn't work (see Dojo).
[too much more for me to respond to right now.]
This was more than enough, thanks.