Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

(tye)Re: Larry vs. Joel vs. Ovid

by tye (Sage)
on Nov 21, 2001 at 01:07 UTC ( #126643=note: print w/replies, xml ) Need Help??

in reply to (Ovid) Re(2): Larry vs. Joel vs. Ovid
in thread Larry vs. Joel vs. Ovid

If it was agreed from day one that Web browsers weren't going to put up with sloppy HTML, then we wouldn't have the mess we have today.

And we might not have the popularity of the web we have today. Graceful failure is a good idea. Under your scheme all of the poor surfers of the world would be getting lots of errors from their browsers when those surfers have no control (and virtually no influence) over getting those errors fixed and many of them would have no idea what those errors mean.

The fact is that many decided to take advantage of one half of a sound principle by completely ignoring the other half of the principle. And only having one half of that principle is certainly not a good idea.

But putting the error checking and enforcement into a web browser client is a really bad idea. Error checking and enforcement needs to be as early in the process as possible. A much better idea would be to fix web servers so that they refuse to emit bad HTML rather than "fix" web browsers so that they refuse to display bad HTML!

It is a good idea to be at least somewhat lenient in what you accept. It is also a good idea to note cases where you were lenient in such a way that this information is likely to make its way back to the source. That back channel is often quite difficult to implement well. But a really horrible idea for such an implementation would be browsers giving errors to web surfers.

Now, being vague about what you accept is a bad idea. That is why the two halves need to go together. In order to be strict about what you provide, you have to define things clearly. Without that side of the coin, just being liberal about what you accept is trying to DWIM, which is (often) a nice feature of Perl but is usually a bad idea in any software that isn't interacting directly with a human.

And do you want to be responsible for explaining to the client that the $30,000 transaction couldn't go through because something changed how much whitespace is sent?

You can go too far in either direction. The idea of the principle is to prevent you from going too far in one direction. You are (in part) complaining about people going too far in the other.

But the complaint about browsers being too lenient is a bad form of wishful thinking. No one will ever produce a browser that is not lenient in what it accepts -- well, if they do, it won't get used much. Now a browser that tells you that it had to be lenient has its advantages, all of which are of no use (and some distraction) to the average web surfer and so will never become widely popular. And having some magical control to force all browsers to not be lenient or to at least complain loudly when they are force to be is, in fact, a very bad idea, unless you also design a way for those browsers to direct their loud complaints back at the authors of the bad HTML.

Go design that back channel first and then you can think about tilting against the "bad, lenient browser" windmill again.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
(Ovid) Re: (tye)Re: Larry vs. Joel vs. Ovid
by Ovid (Cardinal) on Nov 21, 2001 at 01:34 UTC

    tye wrote:

    Under your scheme all of the poor surfers of the world would be getting lots of errors from their browsers...

    Okay, when was the last time you got an error from an ATM because it lost some of your money, even if it's requesting it from a different bank? ATMs work because the design of the ATMs communication protocol was standardized before the ATMs communicated with different banks and this design was adhered to.

    In your example above, if the standards were clear from the beginning and the companies that made the browsers put out standards-compliant browsers, the designers would be getting the errors, too! They'd scratch their heads and their buddy Bob would say "Actually, you need to put quotes around attribute values". Aah! The light would dawn, the problem would be fixed, and we'd probably have a better Web, albeit a potentially smaller one. Of course, that's not reality, so we're stuck.

    And do you want to be responsible for explaining to the client that the $30,000 transaction couldn't go through because something changed how much whitespace is sent?


    "Look Mr. CEO. You said you didn't want any bugs and it says right here in ar_post() API that no white space is allowed between the 12 digit Account Number and the 9 digit Routing Transit Number. If your programmers don't adhere to the specifications we send, how can we be sure that they are sending what they're supposed to?"

    Admittedly, that's an overly simplistic example and not flexible enough for real world work. My point is not that we should be so rigid that we break with the slightest gust of wind. My point is that we shouldn't be so flexible that we fall over :)


    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://126643]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2018-06-18 10:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (109 votes). Check out past polls.