For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > July 2005 > OT: Social responsibility when writing HTML









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OT: Social responsibility when writing HTML
James Taylor

2005-07-26, 5:02 pm

Warning: This thread is seriously off-topic now.
In fact, I'll change the subject to reflect this.


In article <slrndeat4j.7fo.abigail@alexandra.abigail.nl>,
Abigail <abigail@abigail.nl> wrote:
>
> Furthermore, I cannot imagine a "good, anticiapting programmer"
> writing &lt; instead of '<' inside quotes for the "difficulties"
> someone might have parsing HTML, and then leaving off the quotes.


Perhaps, but the parser has to cope with HTML from both experts
*and* amateurs. To cope with missing quotes from amateurs,
it might choose to treat the first > as the tag terminator
then look to see if it can make sense of the tag contents.

It occurs to me that you may be confusing this hypothetical
parser with one that I would write, but that's not my point.
You may also be confusing the poor HTML that the parser is
trying to defend against as something I might write, but
that isn't my point either.

My point is that anyone writing HTML for public consumption
must be mindful of the fact that it will be interpreted by
all manner of parsers; some good, some bad, some good but old,
some new but poor, and some that for pragmatic reasons are
operating in quirks mode to defend against poor HTML. So,
as long as the HTML author doesn't produce invalid HTML,
they should make sensible choices to guard against likely
faults in HTML parsers (unless they don't give a damn about
the web in the first place, of course).

In article <slrndeathe.7fo.abigail@alexandra.abigail.nl>,
Abigail <abigail@abigail.nl> wrote:
>
> I really hate that attitude. Instead of blaming the people
> writing buggy browsers, or other bad parsers, you blame the
> people writing HTML!


That's because web developers should know better and anyway
can make corrections easily, whereas on many minority
computing platforms there is no choice of web browser. The
user has to use what's available, or write their own which
is usually not practical or even possible.

Given that the standards allow a free choice of whether to
write angle brackets in attribute values either raw or as
character entities, it doesn't make sense to mindlessly
choose the technique that will cause *more* problems rather
than less for those receiving your HTML. This is just one
example of where a socially conscious choice can improve the
web for everyone. There are plenty of other areas where
careful selection of the correct technique can make a big
difference to accessibility and usability, but it requires
the HTML author to have reasonable clue about the chronology
of the introduction of new technologies, how widespread
support for them is, and how well older browsers degrade.

Which of the following techniques would *you* choose:

1. Encode smart quotes as:
a) unicode entities like ’ etc.
b) Windows codepage 1252 entities ’
c) convert them to ascii ' and "

2. Site navigation:
a) superkewl Flash app the user has to learn first
b) javascripted rollover images with no alt text
c) static images with alt text and plain href links
d) normal textual links

3. Links that you want the user to open in another window:
a) using a java script: scheme so you can position the
window and strip it of the normal controls
b) using <a href="whatever" target="_blank">
c) normal href links so the user can make their
own choice about whether they want a new window

4. Glossy company branding to impress people:
a) a Flash splash page with wizzy animations (after all nobody
still uses dial-up, and who wants to get indexed anyway)
b) an animated GIF that constantly draws the eye
c) a static image of the company logo in one corner

5. Named anchors within a page:
a) use <div id="name"> and to hell with older browsers
b) use <a name="name"> which works everywhere

6. Headings, subheadings, and bold:
a) use <div class="head">, <div class="subhead">
and <span class="emphasis">
b) use <h1 class="head">, <h2 class="head">
and <b class="emphasis">

7. Multimap.com style application where the positional
relationship between page elements is important:
a) use positional CSS for everything
b) use HTML tables

8. An HTML form:
a) with a javascript button to submit it
b) with a real submit button

I could probably go on to fill a book with a list of these
sort of choices, but then I'm an experienced web developer
with sufficient clue. The vast majority of kiddie web
deeziners out there would be completely oblivious to the
existence of a choice, and anyway would pick (a) from every
selection just because it's the newest wizzy technology that
gives them the maximum scope for creativity, "so it *has* to
be the right choice doesn't it". It would never even occur
to them that using minimal new technology to achieve their
goals is better than using the maximally new and fragile
technique. Such deeziners have little understanding of what
they're doing (beyond the use of whatever wysiwyg editor
they're using) and they care even less about social niceties,
such as ensuring accessibility to the widest audience,
keeping their HTML and graphics small, neat and efficient
for the benefit dial-up modem users, web caches, etc, or
allowing people to view the site on any browser, at any font
size, or in any window size. They don't care about allowing
people (or bots) to automatically crawl and scrape the site,
in fact they probably think that's a *bad* thing and would
prefer everyone to enter their site only from the front page
so they can throw the right combination of popup advertising
at the hapless suckers!

Not only does the appallingly fragile construction of most
websites reduce the general quality of the web, but it also
imposes a pressure of extinction on minority browsers and
platforms that don't have sufficient market share and
financial muscle to keep up with the grubby complexity that
results from this. Furthermore, it raises the barrier for
entry to anyone wishing to write their own browser, crawler,
or other web client. Despite being a competent Linux user
and fan, I still do the majority of my work on an alternative
platform (RISC OS) because its GUI usability *completely*
outclasses anything available on Linux. (Of course, I have
it networked to my Linux box for the best of both worlds.)
Alternative platforms have much to offer and, just as we
should look after the bio-diversity of the rainforest, we
should avoid needlessly killing off computing platforms in a
mindless lust for the latest kewl thing, otherwise we'll
look back and wonder why we didn't see it coming when some
megacorp owns the world and there are no freedoms left.

So you see, you might think it's a small thing, but when I
see someone advocating the use of fragile markup (needlessly)
in the full knowledge that some browsers won't cope with it
and suggesting that browsers should just get fixed and
upgraded, I hope you now see why I oppose this socially
harmful and myopic attitude as a matter of utmost principle.

--
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.

axel@white-eagle.invalid.uk

2005-07-26, 5:02 pm

James Taylor <spam-block-@-see-my-sig.com> wrote:
> Warning: This thread is seriously off-topic now.
> In fact, I'll change the subject to reflect this.



> Abigail <abigail@abigail.nl> wrote:


[color=darkred]
> Which of the following techniques would *you* choose:


Some of your [snipped] examples have nothing to do HTML as such,
but just various things in webpages.

> I could probably go on to fill a book with a list of these
> sort of choices, but then I'm an experienced web developer
> with sufficient clue. The vast majority of kiddie web
> deeziners out there would be completely oblivious to the
> existence of a choice, and anyway would pick (a) from every
> selection just because it's the newest wizzy technology that
> gives them the maximum scope for creativity, "so it *has* to
> be the right choice doesn't it". It would never even occur


That is their problem... as their clients may soon realise.

> to them that using minimal new technology to achieve their
> goals is better than using the maximally new and fragile
> technique. Such deeziners have little understanding of what
> they're doing (beyond the use of whatever wysiwyg editor
> they're using) and they care even less about social niceties,
> such as ensuring accessibility to the widest audience,
> keeping their HTML and graphics small, neat and efficient
> for the benefit dial-up modem users, web caches, etc, or
> allowing people to view the site on any browser, at any font
> size, or in any window size. They don't care about allowing
> people (or bots) to automatically crawl and scrape the site,
> in fact they probably think that's a *bad* thing and would
> prefer everyone to enter their site only from the front page
> so they can throw the right combination of popup advertising
> at the hapless suckers!


> Not only does the appallingly fragile construction of most
> websites reduce the general quality of the web, but it also
> imposes a pressure of extinction on minority browsers and
> platforms that don't have sufficient market share and
> financial muscle to keep up with the grubby complexity that
> results from this.


Is that not a reason to keep to standards?

> Furthermore, it raises the barrier for
> entry to anyone wishing to write their own browser, crawler,
> or other web client. Despite being a competent Linux user
> and fan, I still do the majority of my work on an alternative
> platform (RISC OS) because its GUI usability *completely*
> outclasses anything available on Linux. (Of course, I have
> it networked to my Linux box for the best of both worlds.)
> Alternative platforms have much to offer and, just as we
> should look after the bio-diversity of the rainforest, we
> should avoid needlessly killing off computing platforms in a
> mindless lust for the latest kewl thing, otherwise we'll
> look back and wonder why we didn't see it coming when some
> megacorp owns the world and there are no freedoms left.


Which computing platforms are being killed off? Hardly Solaris -
I have both Sparc and Intel editions at home and they run quite
well without regard to any HTML standard. HP-UX? A system I would
run Oracle on, not a web browser.

> So you see, you might think it's a small thing, but when I
> see someone advocating the use of fragile markup (needlessly)
> in the full knowledge that some browsers won't cope with it
> and suggesting that browsers should just get fixed and
> upgraded, I hope you now see why I oppose this socially
> harmful and myopic attitude as a matter of utmost principle.


No. If a browser cannot cope with good markup - it is the
fault of the browser. Being able to cope with bad markup is
a plus sign.

I design the webpages from my own site (no, I am not going to
make a plug for it as it would be of little interest to anyone)
to be Lynx viewable - except those containing photographs.

Axel


Abigail

2005-07-26, 5:02 pm

James Taylor (spam-block-@-SEE-MY-SIG.com) wrote on MMMMCCCXLVII
September MCMXCIII in <URL:news:ant2616467d6fNdQ@riscpc.jtnet>:
;;
;; In article <slrndeat4j.7fo.abigail@alexandra.abigail.nl>,
;; Abigail <abigail@abigail.nl> wrote:
;; >
;; > Furthermore, I cannot imagine a "good, anticiapting programmer"
;; > writing &lt; instead of '<' inside quotes for the "difficulties"
;; > someone might have parsing HTML, and then leaving off the quotes.
;;
;; Perhaps, but the parser has to cope with HTML from both experts
;; *and* amateurs. To cope with missing quotes from amateurs,
;; it might choose to treat the first > as the tag terminator
;; then look to see if it can make sense of the tag contents.

This is the one of the most remarkable pieces of bullshit I've ever
seen. The only reason people (used) to be able "to get away" with not
using a closing quote was the losing coding talents of Marc Andreessen
and his seven little dwarves. They never put anything smart in their
parser "to cope with HTML from both experts and amateurs". They were
bad programmers themselves, and just assumed any > would close the tag.

;; It occurs to me that you may be confusing this hypothetical
;; parser with one that I would write, but that's not my point.

Well, it was you who didn't know you could use a '>' inside an attribute
value, and it was you would said HTML would "get what they deserve" if
they used '>' inside an attribute value (instead of &gt;), so you were
giving me all the reasons to assume you would write an HTML parser in
such a way.

;; You may also be confusing the poor HTML that the parser is
;; trying to defend against as something I might write, but
;; that isn't my point either.
;;
;; My point is that anyone writing HTML for public consumption
;; must be mindful of the fact that it will be interpreted by
;; all manner of parsers; some good, some bad, some good but old,
;; some new but poor, and some that for pragmatic reasons are
;; operating in quirks mode to defend against poor HTML. So,
;; as long as the HTML author doesn't produce invalid HTML,
;; they should make sensible choices to guard against likely
;; faults in HTML parsers (unless they don't give a damn about
;; the web in the first place, of course).

Well, there *have* been browsers that *didn't* do entity expansion inside
attribute values, so if you would "defend" against those, you wouldn't
write '&gt;' inside an attribute value, but '>'.

;; > I really hate that attitude. Instead of blaming the people
;; > writing buggy browsers, or other bad parsers, you blame the
;; > people writing HTML!
;;
;; That's because web developers should know better and anyway
;; can make corrections easily, whereas on many minority
;; computing platforms there is no choice of web browser. The
;; user has to use what's available, or write their own which
;; is usually not practical or even possible.


And that's how bad web browsers stay in business. Why bother fixing
your shitty product, if everyone else will fix their correct code?
It's better to spend your time implementing <BLINK>!



Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
James Taylor

2005-07-27, 9:03 am

In article <kLvFe.37659$Pf3.14017@fe2.news.blueyonder.co.uk>,
<axel@white-eagle.invalid.uk> wrote:
>
> James Taylor wrote:
>
> Some of your [snipped] examples have nothing to do HTML as such,
> but just various things in webpages.


Yes, but they illustrate my point that a good web developer
should write defensively (and that very few people do so).

>
> That is their problem... as their clients may soon realise.


Agreed, although their clients generally have less clue than
they do and only bother to test the site on MSIE. The
clients certainly don't bother to look "under the hood" to
check whether the site has been defensively coded.

>
> Is that not a reason to keep to standards?


Sure. I'm certainly not advocating deviation from any standards.
I'm advocating creating pages *within* the standards in such a
way that degrades gracefully, and uses the minimum technology
to achieve the requirements of the site. I'm suggesting
people learn a social conscience and try to be inclusive to
older browsers and simpler hand-coded web clients etc. I'm
saying don't make it impossible for anything but the latest
bleeding edge bloatware browser to access, otherwise that'll
be the only browser that gets sufficient development time to
keep up and all the other platforms will perish. People have
been compounding the Microsoft monopoly like that for far too
long as it is, and the result is that a crap system thrives
while excellent alternative systems whither on the vine.

>
> Which computing platforms are being killed off?


Well, personally I use RISC OS. It blows most other systems
out of the water for sheer fluid productivity, but shortage
of software development has left it struggling to keep up
with modern web technology. Not being able to access many
important websites has driven people away from the platform,
reducing the market share, thus reducing the potential sales
for developers so they develop for other systems instead,
leading to a shortage of developers and thus a vicious
circle of decline. One of the primary forces behind my
beloved platform's decline is the thoughtless use of newer
web technology by most web designers, and by thoughtless I
mean things like javascript sniffers that test for MSIE and
NN then raise an error if it doesn't match and also don't
have any alternative content between the <noscript> tags.
The idiots who do that kind of thing not only harm their
own site and the web in general, but their social
irresponsibility also wounds all minority browsers and
platforms (including mine) and for that they should be shot.

> Hardly Solaris - I have both Sparc and Intel editions at home
> and they run quite well without regard to any HTML standard.
> HP-UX? A system I would run Oracle on, not a web browser.


If you think "alternative" necessarily means a unix derivative,
you've been leading a very insular lifestyle.

>
> No. If a browser cannot cope with good markup - it is the
> fault of the browser. Being able to cope with bad markup is
> a plus sign.


I understand this point of view, but it overlooks the social
responsibility web authors should feel to be as inclusive as
possible when publishing. Perhaps my command of English is
not sufficient to be persuasive, or perhaps I'm just not making
myself clear, but I can't believe I'm the only web developer
to understand this essential principle. God I hope not!

> I design the webpages from my own site (no, I am not going to
> make a plug for it as it would be of little interest to anyone)
> to be Lynx viewable - except those containing photographs.


Good start.

--
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.

James Taylor

2005-07-27, 9:03 am

In article <slrnded68m.7fo.abigail@alexandra.abigail.nl>,
Abigail <abigail@abigail.nl> wrote:
>
> James Taylor wrote:
>
> This is the one of the most remarkable pieces of bullshit I've
> ever seen.


Really? Is that a good thing? ;-)

> The only reason people (used) to be able "to get away" with
> not using a closing quote was the losing coding talents of
> Marc Andreessen and his seven little dwarves.


What makes you think Mosaic derivatives are the only
browsers that behaved that way?

>
> Well, it was you who didn't know you could use a '>' inside
> an attribute value, and it was you would said HTML would
> "get what they deserve" if they used '>' inside an attribute
> value (instead of &gt;), so you were giving me all the reasons
> to assume you would write an HTML parser in such a way.


You're entitled to your opinion. I could defend myself
by saying that if I were writing a proper parser I'd start
with the standards. But, as I said, THIS IS NOT MY POINT.

> Well, there *have* been browsers that *didn't* do entity
> expansion inside attribute values, so if you would
> "defend" against those, you wouldn't write '&gt;' inside
> an attribute value, but '>'.


Sheesh! Sounds like the only safe thing to do is avoid the use
of '>' in any form within attribute values. Thankfully, I don't
believe there are any situations where it is actually
necessary to put angle brackets in HTML attribute values.

>
> And that's how bad web browsers stay in business. Why
> bother fixing your shitty product, if everyone else will
> fix their correct code?


I don't understand why you're being so unforgiving towards
browser producers. On many platforms there is little choice
of browser and, when a better one comes along, users have
good reason to be grateful *even* if it's not perfect. In
fact, I don't believe any browser on any platform is ever
likely to be perfect. That might be an irritating wrinkle in
reality for you, but a reality nevertheless.

I'm not saying browsers shouldn't get improved, I'm just saying
that HTML authors should be considerate. I hate the attitude
that says "damn anyone stuck using a less capable browser, as
I don't intend to make the slightest effort to include them".
People with that attitude have ruined the web, and supported
the big bloatware browsers along with the monopolistic
platforms that run them to the detriment of any alternatives.
It's myopic, socially harmful, irresponsible and ignorant.

--
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com