Absolute element offsets--exercise in futility

D

David Mark

That's a false over-generalization. If you are trying to be super
accessible and all that, sure, don't hide things by default. But
internal webapps rarely have those types of concerns.

That is ridiculous. If you declare a display:none rule in CSS,
expecting to override it with script, you have just committed the
textbook accessibility blunder of creating a document that is
unreadable with script. Hard to imagine as the jQuery definition of
progressive enhancement applies only to script or no script (there is
no middle ground to be had.)

So, you are new to browser scripting and you define such a rule in CSS
and use:

el.style.display = '';

Oops, doesn't work. Now the aspiring author knows he/she has taken a
wrong turn. So they remove the CSS rule and now they may have FoUC,
which is simple enough to deal with (and a good lesson to learn.)

Now, you propose to call some ridiculous, ever-changing function that
requires computed styles, expandos, etc. *and* allows the beginner to
gloss right over a critical and crucial to understand blunder.
I think it's fairly common, actually. Click on a row to expand
"details" below it in another row.

So, use this:

el.style.display = '';

Simple, concise, one line, works in virtually every UA ever released,
doesn't change meaning over time, etc. Why, you could even
encapsulate that line in a function, perhaps asigning it only if:

typeof document.documentElement.style.display == 'string';

Now you know how to hide/show elements only if it is possible to do so
(some agents can't do it.) I'll leave the FoUC line as an exercise.
Perspective, I guess. In some areas it's growing.


Everything is history at some point. I hope .NET dies out sooner
rather than later. But that doesn't change the fact that it's built by
a huge company, has lots of devoted developers who swear by it, is the
back-bone of mission-critical webapps and web sites, and must satisfy
a need for a huge number of people, even if you think it is horrible.
Sounds a lot like jQuery (s/huge company/ninja/).


People still use dial-up?

As you've been told, *lots* of people use dial-up. You know those
people with iPhones? Those are on dial-up at least some of the time.
Depending on the country and demographic, a significant percentage of
your prospective audience may be on dial-up. Broadband is expensive
in some areas. And regardless of the specific bandwidth or size of
the scripts involved, wasted time on worthless scripts means less time
for content.
I don't think I did? I did make a comment on an existing ticket, and I
posted suggestions to the dev mailing list, referencing the thread
here.

Whatever, the point is that the natives tore it down as an affront to
their idol. It would be more useful to add a balancing criticism
section to the jQuery Wikipedia entry. The current entry is an
infomercial. Certainly there are enough sources at this point to back
up a contrary view.

What's the point of an object that gathers DOM element references,
just to run them through a broken - each - conveyor to sputtering
grinders called attr, removeAttr, show, etc. You really expect
anything useful (or even predictable) to come of that, after all we
have seen in the last week?

And, as you well know, the big selling point for the wannabe are the
"plugins":

http://groups.google.com/group/jque...ead/583e8446e4bfc365/3743f9a2d354733c?lnk=gst

Just skip to the last message. They are re-enacting the year 2000 in
2009.
Sure, if by "book" you mean "pdf file" and by "buy" you mean "download
for free".

I was referring to those jQuery books which should now be moved to the
fiction section. Who would buy such a thing now?
 
D

David Mark

David, you don't seem to understand your own argument. When a
programmer writes code, they can do one of two things:

1.) Reuse old code, that is, use a library.

2.) Write new code from scratch.

No, the unit of measure for Javascript code is the function, not the
"library." And how ridiculous is it to imply that I don't understand
my own position?
Any reuse of old code means you're using a library. It doesn't matter
Nope.

if that library is informal - just some functions you wrote that you
like to reuse because you're comfortable with them - or formal and
public like jQuery or Prototype or mootools.

There is nothing "formal" about any of those three. Are you kidding?
You've argued against libraries, which means you are in favor of
writing new code, from scratch. Anything that is a "context-specific
solution", written just for one specific solution, involves writing
new code from scratch.

Again, no.
 
D

David Mark

The standard I'd use is "How can we meet the customer's needs, at the
lowest possible cost, for a given level of quality?" That doesn't mean
that things should be low quality or low cost, but rather, that they
should be the lowest cost per whatever quality the client needs. Some
clients need very high levels of quality, and some only need very low
levels of quality.

Per whatever quality the client needs? I put it to you that most
clients do not need to maintain jQuery (or anything like it.) They
sure as hell don't need most of things usually done with jQuery. The
people who like "lightboxes" are the designers. They want sell "Ajax
sites." Get it?
You are critical of those pre-package templates that only cost $29.99
(or sometimes they are free), but I'd argue that, for a certain class
of customer, those ultra-cheap templates are very successful. I've
seen sites where the owners simply want to run a simple store, selling
fishing gear, and the web site is a sideline to their real business.
And these sites only generate $100 or $200 a week in sales, and
therefore do not justify great expense. But the owners of such sites
deserve to be congratulated for pulling together a working business
model. The sites may not look great, but they are sufficient, and the
business is able to attract customers. If you were to argue that the
site should be built to a higher level of quality, you'd have to prove
that the higher quality would bring in additional sales.

You take forever to say nothing. One thing is for sure, jQuery (or
the like) is a huge mistake for a commerce site. Don't be an idiot.
Some very ugly sites are extremely successful. Jason Fried has argued
that Drudge Report is one of the most successful sites on the web, and
I agree with his reasoning:

http://www.37signals.com/svn/posts/1407-why-the-drudge-report-is-one-...

I don't know who Jason Fried is, but I do know that domain. You are
actually citing those people? If Jason wrote that miserable slide
show of theirs, I suspect he was fried.
The use of pre-package effects, such as those provided by jQuery UI,
are exactly like the $29.99 templates. They do an excellent job of
meeting the needs of a certain class of web site owner.

"Pre-package effects" in jQuery UI? You don't even know what you are
talking about.
 
D

David Mark

Am Sun, 12 Apr 2009 14:06:40 -0700 schrieb Lawrence Krubner:
Why don't you just publish your scripts as a library then?
Yawn... The usual implied "if you can't do better, stop critizing". Apart
from that you *can* downloadMark'sscripts. But then: Are you capable of
assessing the code quality?

I'd never argue that Mark should stop criticizing anyone. I'm arguing
that, if his scripts are freely available, and no one uses them, then
perhaps they are not as useful as he thinks they are.

That's not what you said at all. And there is a big difference
between freely available and freeware. By the same token, there is
quite a difference between posted and marketed to death.

There is also the typical fixation on the past, which is central to
arguments for things like jQuery (e.g. everybody is using them!)
Your use of the word "quality" suggests that there is a single
dimension by which we can measure code. Your implication is that we
can use some official standard of code quality. Perhaps you're imaging
a standard such as "How well does this code conform to well known,
agreed upon principles of software design?"

Considering the current topic, you come off as a buffoon. Was that
your intent?
However, there are many other, equally valid, dimensions by which code
can be measured. For instance:

1.) How useful do people find this code?

Put it this way, if your code adds one and one and comes up with
three, somebody may still find it useful. That doesn't mean it is
good for them.
2.) How easy to use do people find this code?

They aren't having a very easy time of it at the moment. And
regardless, these things make it very easy to delude yourself. You
may think you have done something wonderful in ten minutes, but the
reality is very different.
If people find code un-useful, or if they find it hard to work with,
then I'd argue it is worth very little, regardless of its conformance
to some well known standards of software design.

What code are you arguing about?
 
D

David Mark

Ah, yes. Because of your courageous willingness to stand against the
conventional wisdom, the world is coming around to your way of seeing
things.

There's no real wisdom to stand against. Tap it and the whole
argument falls right over.
The millions of people who carefully read comp.lang.javascript

You are such an idiot. Do you think this is the only place such ideas
are discussed? Are you really ignorant of the fact that this
newsgroup has more influence on these stupid library efforts than
their authors?
everyday have been dazzled by the brilliance of your arguments.

Your words.
That
respected publishing houses like O'Reilly have published books saying
positive things about jQuery is of no matter.

Fixated on the past. Who cares how many books on jQuery have been
published in the last few years. They all turned out to be wrong.

[snip]
 
D

David Mark

I have. At the various web design firms that I've worked at, I've had
to work closely with designers. Over the last 10 years, I've gotten to
know what they need and what they don't need. I've also had long
conversations with clients, what they want, what goals they are trying
to acheive.

I've also had countless friends come up to me and say "I'd like to
learn how to build web sites." I've taught several. The experience has
helped me see what concepts they find easy to grasp, and which
concepts they find difficult to grasp.

Given those experiences, I understand why jQuery is gaining in
popularity. It answers a real need.




You are expressing contempt for the software AOL makes available so
that people can build a simple web page. And, really, your entire
argument is based on this straight-forward elitism. Take away the
elitism, and you have no argument at all. Once a person realizes that
AOL's simple web page builder answers a real market need, then the
person also understands how other efforts to make the web simple
answers real market needs.

No, stupid. People are using the equivalent of AOL's builders to
create e-commerce sites, credit card forms, etc. Go read for a while.
 
D

David Mark

I think this blog post by Drew McLellan offers a good point about why
libraries like jQuery are useful:

No it doesn't. It is another clueless maniac trying to "fix" PNG's
with scripted DirectX twiddling and browser sniffing. IE6 shipped ten
years ago. Use its built-in mechanism (conditional comments) to
include whatever extraneous CSS or scripts you need to replace or fix
PNG's. No other browser will ever see them. End of story.

[snip]
 
D

David Mark

That is ridiculous.  If you declare a display:none rule in CSS,
expecting to override it with script, you have just committed the
textbook accessibility blunder of creating a document that is
unreadable with script.  Hard to imagine as the jQuery
^^^^
Oops, without.
 
M

Matt Kruse

That is ridiculous.  If you declare a display:none rule in CSS,
expecting to override it with script, you have just committed the
textbook accessibility blunder of creating a document that is
unreadable with script.

Luckily many of us never have to worry about that, even if we know
what the problem is and how to handle it.
As you've been told, *lots* of people use dial-up.  

I don't know anyone, and luckily I don't have to be concerned about
it. Creating public sites for as many users as possible from anywhere
in the world is kind of a pain.
Whatever, the point is that the natives tore it down as an affront to
their idol.

Actually, John Resig replied to my post on the dev list about each()
and said these were good ideas and he would see about working them in.
We'll see if they make it into a future release.
I was referring to those jQuery books which should now be moved to the
fiction section.  Who would buy such a thing now?

I would never have bought a jQuery book. It is sufficiently simple
that no book purchase would be justified. Unless it has pictures of
Ninjas.

Matt Kruse
 
T

Thomas 'PointedEars' Lahn

Jeremy said:
Thomas said:
Not more difficult as writing proper HTML in the first place.

Valid HTML 4.01 strict is a good start and making an accessible page[1],
but it isn't the end. Full accessibility includes providing alternative
content for images, audio and video as well as careful, for example.

That runs under "proper HTML" in my book.

An important advantage of HTML over other formats is that it degrades
gracefully by default. It is only that so few people seem to be able to
make good use of that feature. They rather ignore it and build ugly
script-only workarounds instead. And then they complain how hard it would
be to make HTML documents accessible.

(You may quote me on that.)


PointedEars
 
D

David Mark

Luckily many of us never have to worry about that, even if we know
what the problem is and how to handle it.

So, hiding content away from those without scripting (e.g. many blind
people) is a minor concern? Are you really saying it is difficult to
hide/show elements without committing such an obvious blunder?
I don't know anyone, and luckily I don't have to be concerned about
it. Creating public sites for as many users as possible from anywhere
in the world is kind of a pain.

Welcome to the Web. See why jQuery is no good for it at all?
Actually, John Resig replied to my post on the dev list about each()
and said these were good ideas and he would see about working them in.
We'll see if they make it into a future release.

What possible difference would that make? Also, re-read that thread.
Some plugin authors shot it down as they are using some undocumented
(or more undocumented than usual) method signature. Good luck!
I would never have bought a jQuery book. It is sufficiently simple

You know that is a lie. If not, re-read *this* thread.
that no book purchase would be justified. Unless it has pictures of
Ninjas.

One has a picture of a samurai on the cover. Appropriate for such an
inaccurate book.
 
T

Thomas 'PointedEars' Lahn

Jeremy said:
Valid HTML 4.01 strict is a good start and making an accessible page[1],
but it isn't the end. Full accessibility includes providing alternative
content for images, audio and video as well as careful, for example.

< http://www.jan.wvu.edu/media/webpages.html > makes a nice summary of
several different things to keep in mind.

If one gets to be a Ph.D. for spreading this amount of FUD and nonsense
about HTML and accessibility, I want my diploma right now.


PointedEars
 
D

David Mark

David said:
Per whatever quality the client needs? I put it to you that most
clients do not need to maintain jQuery (or anything like it.) They
sure as hell don't need most of things usually done with jQuery. The
people who like "lightboxes" are the designers. They want sell "Ajax
sites." Get it?


You take forever to say nothing. One thing is for sure, jQuery (or
the like) is a huge mistake for a commerce site. Don't be an idiot.


I don't know who Jason Fried is, but I do know that domain. You are

Actually, I was thinking of another domain. However, the one above
uses XHTML transitional and Prototype, so their reasoning on "ugly
sites" isn't of much interest either.
 
T

The Natural Philosopher

Jeremy said:
Not more difficult as writing proper HTML in the first place.

Valid HTML 4.01 strict is a good start and making an accessible page[1],
but it isn't the end. Full accessibility includes providing alternative
content for images, audio and video as well as careful, for example.

Indeed. Always bear in mind that your site, advertising expensive sports
equipment for the extremely physically able, must be accessible by a
broke brainless amoeba using IP over carrier pigeon transport at 20
bytes a day, running lynx on a an 8086 Venix machine.

To design your site otherwise, is to engaeg in illegal discrimination
aginst penniless amoebae.

[1] Accessible in this context meaning more than just "can" be used. It
means "designed for" alternative (non-visual) user agents.

Exactly. Make sure the olfactory plugins are available. And work.
 
A

Andrew Poulos

The said:
Jeremy said:
Andrew Poulos wrote:
I took him to mean; although accessibility is important, building an
accessible web site can be difficult.
Not more difficult as writing proper HTML in the first place.

Valid HTML 4.01 strict is a good start and making an accessible
page[1], but it isn't the end. Full accessibility includes providing
alternative content for images, audio and video as well as careful,
for example.

Indeed. Always bear in mind that your site, advertising expensive sports
equipment for the extremely physically able, must be accessible by a
broke brainless amoeba using IP over carrier pigeon transport at 20
bytes a day, running lynx on a an 8086 Venix machine.

To design your site otherwise, is to engage in illegal discrimination
against penniless amoebae.

[1] Accessible in this context meaning more than just "can" be used.
It means "designed for" alternative (non-visual) user agents.

Exactly. Make sure the olfactory plugins are available. And work.

Almost as funny as imaging you at a meeting explaining that the reason
why no people who rely on assistive technologies can access the
information on the pages you were paid to build is that you don't care
(about them).

Andrew Poulos
 
G

Gregor Kofler

Am Fri, 17 Apr 2009 09:33:27 +0100 schrieb The Natural Philosopher:
Indeed. Always bear in mind that your site, advertising expensive sports
equipment for the extremely physically able, must be accessible by a
broke brainless amoeba using IP over carrier pigeon transport at 20
bytes a day, running lynx on a an 8086 Venix machine.

To design your site otherwise, is to engaeg in illegal discrimination
aginst penniless amoebae.

[1] Accessible in this context meaning more than just "can" be used.
It means "designed for" alternative (non-visual) user agents.

Exactly. Make sure the olfactory plugins are available. And work.

I suppose meaningful semantics and properly filled alt and/or title
attributes would already deal with 90% of the shortcomings of todays
webpages when it comes to accessibility.

Gregor
 
T

The Natural Philosopher

Andrew said:
The said:
Jeremy said:
I took him to mean; although accessibility is important, building an
accessible web site can be difficult.
Not more difficult as writing proper HTML in the first place.

Valid HTML 4.01 strict is a good start and making an accessible
page[1], but it isn't the end. Full accessibility includes providing
alternative content for images, audio and video as well as careful,
for example.

Indeed. Always bear in mind that your site, advertising expensive
sports equipment for the extremely physically able, must be accessible
by a broke brainless amoeba using IP over carrier pigeon transport at
20 bytes a day, running lynx on a an 8086 Venix machine.

To design your site otherwise, is to engage in illegal discrimination
against penniless amoebae.

[1] Accessible in this context meaning more than just "can" be used.
It means "designed for" alternative (non-visual) user agents.

Exactly. Make sure the olfactory plugins are available. And work.

Almost as funny as imaging you at a meeting explaining that the reason
why no people who rely on assistive technologies can access the
information on the pages you were paid to build is that you don't care
(about them).

Amoebae don't lobby governments.
For website design, they, and wood pigeons, may safely be ignored.
 
T

The Natural Philosopher

Gregor said:
Am Fri, 17 Apr 2009 09:33:27 +0100 schrieb The Natural Philosopher:
Indeed. Always bear in mind that your site, advertising expensive sports
equipment for the extremely physically able, must be accessible by a
broke brainless amoeba using IP over carrier pigeon transport at 20
bytes a day, running lynx on a an 8086 Venix machine.

To design your site otherwise, is to engaeg in illegal discrimination
aginst penniless amoebae.

[1] Accessible in this context meaning more than just "can" be used.
It means "designed for" alternative (non-visual) user agents.
Exactly. Make sure the olfactory plugins are available. And work.

I suppose meaningful semantics and properly filled alt and/or title
attributes would already deal with 90% of the shortcomings of todays
webpages when it comes to accessibility.
I think if you start designing to the 'lowest common factor' of sentient
beings you probably are heading for a site design that will immediately
eliminate all but that lowest 1% of potential accessors.

And you certainly shouldn't be using javascript in any meaningful way.

'For everyone else, there is the telephone'..

Like homosexuality, I don't object to 'accessibility'. I just don't want
it to be made compulsory.

I note that everyiones favorite Irish airline, is proposing to weigh
people as well as their luggage, and charge accordingly. Is this
discrimination against fat people, or is not doing it discrimination
against thin people?

I think we should pass a law making the laws of physics allow aeroplanes
to fly on the same fuel, regardless of how much they weigh.

God, it seems, is a great discriminator. Why, apparently Heaven is a
closed shop, reserved for good Christians only. Manifestly unfair.
I bet they have flash movies there.
 

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
474,102
Messages
2,570,645
Members
47,245
Latest member
ShannonEat

Latest Threads

Top