{"id":130,"date":"2010-11-19T18:41:00","date_gmt":"2010-11-19T23:41:00","guid":{"rendered":"http:\/\/kuny.ca\/blogs\/?p=130"},"modified":"2010-11-19T18:41:00","modified_gmt":"2010-11-19T23:41:00","slug":"postel%e2%80%99s-law-has-no-exceptions","status":"publish","type":"post","link":"http:\/\/kuny.ca\/blogs\/2010\/130\/tech-notes\/postel%e2%80%99s-law-has-no-exceptions\/","title":{"rendered":"Postel\u2019s Law Has No Exceptions"},"content":{"rendered":"<p>[from Aaron Swartz]<\/p>\n<p>As Mark Pilgrim is fond of saying, \u201cThere are no exceptions to Postel\u2019s Law.\u201d (Postel\u2019s Law is generally quoted as \u201cbe liberal in what you accept and conservative in what you put out\u201d or something to that effect.) The message of the law is that interoperability is the primary concern, and that programs should accept things, even things that are against the spec, if necessary to achieve interoperability.<\/p>\n<p>HTML, as you may know, is a mess. It\u2019s contorted in a hundred different ways with tons of bugs and their work-arounds encrusted into the Web and browsers are expected to make sense of all of it. The XML people saw this and said \u201cwe have to fix this\u201d. Their solution was to break Postel\u2019s Law.<\/p>\n<p>With XML you are supposed to die and never look back if the document you come across violates the spec. The idea was that if everything died on invalid feeds, no one would ever write them. This is wrong for three reasons:<br \/>\n   1.      Even with the rule, there will be invalid documents. Someone will write some code, test it, see that it works and move on. One day the code will be given data that trips one of XML\u2019s exceptions (AT&amp;T is a common example \u2014 XML requires it be written AT&amp;T) and an invalid document will be created.<\/p>\n<p>   2.      XML apps compete for users. Users want to read these documents, even if they\u2019re broken. Users will switch to apps that read these documents and the rule will be useless, since folks will likely test with those apps. The only way we can keep the rule in effect is by getting everyone who writes an app to act against the wishes of their users, which seems like a bad idea.<\/p>\n<p>   3.      Essentially the same effect can be achieved by having a validation display (like iCab or Straw\u2019s smiley face that frowns on invalid documents) and an easy-to-use validator.<\/p>\n<p>This is not to say that all apps should have to process invalid documents, or that they should work hard to guess what the author meant, or that we should encourage or tolerate invalid documents. We should try still try to get rid of invalid documents, but taking things out on the users is the wrong way to do it.<\/p>\n<p>The creators of XML were wrong. Postel\u2019s Law has no exceptions.   <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>[from Aaron Swartz] As Mark Pilgrim is fond of saying, \u201cThere are no exceptions to Postel\u2019s Law.\u201d (Postel\u2019s Law is generally quoted as \u201cbe liberal in what you accept and conservative in what you put out\u201d or something to that effect.) The message of the law is that interoperability is the primary concern, and that <a href='http:\/\/kuny.ca\/blogs\/2010\/130\/tech-notes\/postel%e2%80%99s-law-has-no-exceptions\/' class='excerpt-more'>[&#8230;]<\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-tech-notes","category-6-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":1,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":131,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/posts\/130\/revisions\/131"}],"wp:attachment":[{"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kuny.ca\/blogs\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}