http://qs321.pair.com?node_id=11105235


in reply to Re: Thoughts on "one function, flexible arguments"?
in thread Thoughts on "one function, flexible arguments"?

davido:

I just wanted to chime in on Postel's law. As I see it, much of the difficulty of the WWW comes from allowing the browser to ignore malformed HTML without complaint. I agree that the browser could try to make a good attempt at rendering broken HTML, but it should *never* do it silently. The problems weren't that the browser tried to render garbage, but that (a) it would do so without complaint*, and (b) that it would try far too hard** to make it sensible.

If web developers had to deal with the alert box every time a page load had an error, they'd either fix the problem because they got sick of seeing it, or they'd be forced to fix it when the people signing their paychecks saw it and said "WTF!?".

Notes:
* Back in the day, you'd get an alert box, but it had a checkbox at the bottom that said something to the effect of "I never want to see these warnings again", and people would click that and then never again see the alert box. It lead to a culture of "Meh, it works well enough, I guess I'm done" and crap coding. It contributed to the perception that JavaScript is a toy language in a toy environment, and lead to a bunch of slackadaisical front end developers.
** If we had to ensure that we provided correct HTML, there would be far less effort involved in "bug-compatible" HTML rendering tweaks on varied browsers. They could try to do something sensible so that developers could make changes to their pages and see what would happen, knowing that the errors would get fixed before release, so it wouldn't really matter if the table was rendered entirely in italics or whatever.

...roboticus

When your only tool is a hammer, all problems look like your thumb.