<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: douglas-crockford</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/douglas-crockford.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2008-04-19T16:38:52+00:00</updated><author><name>Simon Willison</name></author><entry><title>JavaScript: The Good Parts</title><link href="https://simonwillison.net/2008/Apr/19/oreilly/#atom-tag" rel="alternate"/><published>2008-04-19T16:38:52+00:00</published><updated>2008-04-19T16:38:52+00:00</updated><id>https://simonwillison.net/2008/Apr/19/oreilly/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.oreilly.com/catalog/9780596517748/"&gt;JavaScript: The Good Parts&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Douglas Crockford’s soon-to-be-published book on the subset of JavaScript that he recommends. Promises to be “short, but dense”—if it’s half as good as his JavaScript lectures this is going to be a must-have.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/books"&gt;books&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;&lt;/p&gt;



</summary><category term="books"/><category term="douglas-crockford"/><category term="javascript"/></entry><entry><title>hash</title><link href="https://simonwillison.net/2008/Mar/30/hash/#atom-tag" rel="alternate"/><published>2008-03-30T18:34:22+00:00</published><updated>2008-03-30T18:34:22+00:00</updated><id>https://simonwillison.net/2008/Mar/30/hash/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=789"&gt;hash&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Douglas Crockford: “Any HTML tag that accepts a src= or href= attribute should also be allowed to take a hash= attribute”—to protect against file tampering and (more importantly) provide a truly robust caching mechanism.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/caching"&gt;caching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hash"&gt;hash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/html"&gt;html&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sha1"&gt;sha1&lt;/a&gt;&lt;/p&gt;



</summary><category term="caching"/><category term="douglas-crockford"/><category term="hash"/><category term="html"/><category term="sha1"/></entry><entry><title>Quoting Douglas Crockford</title><link href="https://simonwillison.net/2007/Nov/7/crockford/#atom-tag" rel="alternate"/><published>2007-11-07T15:36:15+00:00</published><updated>2007-11-07T15:36:15+00:00</updated><id>https://simonwillison.net/2007/Nov/7/crockford/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=715"&gt;&lt;p&gt;In the long term, I want to replace JavaScript and the DOM with a smarter, safer design. In the medium term, I want to use something like Google Gears to give us vats with which we can have safe mashups. But in the short term, I recommend that you be using Firefox with No Script. Until we get things right, it seems to be the best we can do.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=715"&gt;Douglas Crockford&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/dom"&gt;dom&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/firefox"&gt;firefox&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-gears"&gt;google-gears&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mashups"&gt;mashups&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/noscript"&gt;noscript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;



</summary><category term="dom"/><category term="douglas-crockford"/><category term="firefox"/><category term="google-gears"/><category term="javascript"/><category term="mashups"/><category term="noscript"/><category term="security"/></entry><entry><title>The Elements of JavaScript Style</title><link href="https://simonwillison.net/2007/Sep/13/yahoo/#atom-tag" rel="alternate"/><published>2007-09-13T08:22:21+00:00</published><updated>2007-09-13T08:22:21+00:00</updated><id>https://simonwillison.net/2007/Sep/13/yahoo/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=701"&gt;The Elements of JavaScript Style&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Douglas Crockford illustrates better coding practises through refactoring of old code.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/refactoring"&gt;refactoring&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yahoo"&gt;yahoo&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="javascript"/><category term="refactoring"/><category term="yahoo"/></entry><entry><title>Base32 encoding</title><link href="https://simonwillison.net/2007/Aug/17/base32/#atom-tag" rel="alternate"/><published>2007-08-17T23:25:41+00:00</published><updated>2007-08-17T23:25:41+00:00</updated><id>https://simonwillison.net/2007/Aug/17/base32/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://crockford.com/wrmg/base32.html"&gt;Base32 encoding&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I was on the verge of inventing this when I discovered that Douglas Crockford had invented it for me.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://programming.reddit.com/info/2g3xh/comments/c2g4jz"&gt;programming.reddit.com&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/base32"&gt;base32&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/encoding"&gt;encoding&lt;/a&gt;&lt;/p&gt;



</summary><category term="base32"/><category term="douglas-crockford"/><category term="encoding"/></entry><entry><title>JavaScript Minifier that doesn't break code</title><link href="https://simonwillison.net/2007/Jun/4/peters/#atom-tag" rel="alternate"/><published>2007-06-04T17:44:46+00:00</published><updated>2007-06-04T17:44:46+00:00</updated><id>https://simonwillison.net/2007/Jun/4/peters/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://peter.michaux.ca/article/2242"&gt;JavaScript Minifier that doesn&amp;#x27;t break code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Perl re-implementation of Douglas Crockford’s classic JSMin that doesn’t clobber IE’s conditional comments, by Peter Michaux.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.b-list.org/links/2007/05/27/javascript-minifier-doesnt-break-code-perl"&gt;James Bennett&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/conditionalcomments"&gt;conditionalcomments&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/internet-explorer"&gt;internet-explorer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/james-bennett"&gt;james-bennett&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jsmin"&gt;jsmin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pete-michaux"&gt;pete-michaux&lt;/a&gt;&lt;/p&gt;



</summary><category term="conditionalcomments"/><category term="douglas-crockford"/><category term="internet-explorer"/><category term="james-bennett"/><category term="javascript"/><category term="jsmin"/><category term="perl"/><category term="pete-michaux"/></entry><entry><title>JSON and Browser Security</title><link href="https://simonwillison.net/2007/Apr/11/json/#atom-tag" rel="alternate"/><published>2007-04-11T00:52:56+00:00</published><updated>2007-04-11T00:52:56+00:00</updated><id>https://simonwillison.net/2007/Apr/11/json/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://yuiblog.com/blog/2007/04/10/json-and-browser-security/"&gt;JSON and Browser Security&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Douglas Crockford suggests using secret tokens to protect JSON content, and avoiding wrapper hacks to protect unauthorised JSON delivery as they may fall foul of undiscovered browser bugs in the future.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="json"/><category term="security"/></entry><entry><title>Browser Wars</title><link href="https://simonwillison.net/2007/Feb/22/yahoo/#atom-tag" rel="alternate"/><published>2007-02-22T07:53:30+00:00</published><updated>2007-02-22T07:53:30+00:00</updated><id>https://simonwillison.net/2007/Feb/22/yahoo/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=651"&gt;Browser Wars&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Doug Crockford is hosting a panel discussion with Chris Wilson from IE, Mike Shaver from Mozilla and Håkon Wium Lie from Opera on February 28th in Sunnyvale.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/chris-wilson"&gt;chris-wilson&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hakonwiumlee"&gt;hakonwiumlee&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mike-shaver"&gt;mike-shaver&lt;/a&gt;&lt;/p&gt;



</summary><category term="chris-wilson"/><category term="douglas-crockford"/><category term="hakonwiumlee"/><category term="mike-shaver"/></entry><entry><title>Quoting Douglas Crockford</title><link href="https://simonwillison.net/2007/Jan/8/storage/#atom-tag" rel="alternate"/><published>2007-01-08T19:04:05+00:00</published><updated>2007-01-08T19:04:05+00:00</updated><id>https://simonwillison.net/2007/Jan/8/storage/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=620"&gt;&lt;p&gt;With this much storage, you can imagine filesystems in which files are never deleted and files are never rewritten. The filesystem never forgets. Such systems could be much more reliable than the systems we use today which are based on the assumption that storage is a constrained resource.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=620"&gt;Douglas Crockford&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/storage"&gt;storage&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="storage"/></entry><entry><title>Quoting Douglas Crockford</title><link href="https://simonwillison.net/2006/Dec/21/crock/#atom-tag" rel="alternate"/><published>2006-12-21T10:14:13+00:00</published><updated>2006-12-21T10:14:13+00:00</updated><id>https://simonwillison.net/2006/Dec/21/crock/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://scripting.wordpress.com/2006/12/20/scripting-news-for-12202006/#comment-26383"&gt;&lt;p&gt;The good thing about reinventing the wheel is that you can get a round one.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://scripting.wordpress.com/2006/12/20/scripting-news-for-12202006/#comment-26383"&gt;Douglas Crockford&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="json"/></entry><entry><title>Quoting Dave Winer</title><link href="https://simonwillison.net/2006/Dec/20/ohthehumanity/#atom-tag" rel="alternate"/><published>2006-12-20T19:21:48+00:00</published><updated>2006-12-20T19:21:48+00:00</updated><id>https://simonwillison.net/2006/Dec/20/ohthehumanity/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://www.scripting.com/2006/12/20.html#godBlessTheReinventers"&gt;&lt;p&gt;I read on Niall Kennedy that del.icio.us has come up with an API that returns a JSON structure, and I figured, sheez it can't be that hard to parse, so let's see what it looks like, and damn, IT'S NOT EVEN XML! [...] Who did this travesty? Let's find a tree and string them up. Now.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://www.scripting.com/2006/12/20.html#godBlessTheReinventers"&gt;Dave Winer&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/dave-winer"&gt;dave-winer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/delicious"&gt;delicious&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/niall-kennedy"&gt;niall-kennedy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xml"&gt;xml&lt;/a&gt;&lt;/p&gt;



</summary><category term="dave-winer"/><category term="delicious"/><category term="douglas-crockford"/><category term="json"/><category term="niall-kennedy"/><category term="xml"/></entry><entry><title>Quoting Douglas Crockford</title><link href="https://simonwillison.net/2006/Dec/14/xhtml/#atom-tag" rel="alternate"/><published>2006-12-14T17:40:10+00:00</published><updated>2006-12-14T17:40:10+00:00</updated><id>https://simonwillison.net/2006/Dec/14/xhtml/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=602"&gt;&lt;p&gt;XHTML is not going to replace HTML as the web's official markup language because it turns out that resilience is more useful than brittleness.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=602"&gt;Douglas Crockford&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xhtml"&gt;xhtml&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="xhtml"/></entry><entry><title>Proposed RFC for application/json</title><link href="https://simonwillison.net/2006/Aug/1/proposed/#atom-tag" rel="alternate"/><published>2006-08-01T21:29:17+00:00</published><updated>2006-08-01T21:29:17+00:00</updated><id>https://simonwillison.net/2006/Aug/1/proposed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.ietf.org/rfc/rfc4627.txt?number=4627"&gt;Proposed RFC for application/json&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Douglas Crockford is putting JSON through the IETF.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.davidflanagan.com/blog/2006_08.html"&gt;davidflanagan.com&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ietf"&gt;ietf&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rfc"&gt;rfc&lt;/a&gt;&lt;/p&gt;



</summary><category term="douglas-crockford"/><category term="ietf"/><category term="json"/><category term="rfc"/></entry><entry><title>JSON and Yahoo!'s JavaScript APIs</title><link href="https://simonwillison.net/2005/Dec/16/json/#atom-tag" rel="alternate"/><published>2005-12-16T00:10:57+00:00</published><updated>2005-12-16T00:10:57+00:00</updated><id>https://simonwillison.net/2005/Dec/16/json/#atom-tag</id><summary type="html">
    &lt;p&gt;I had the pleasure yesterday of seeing Douglas Crockford speak about &lt;a href="http://www.crockford.com/JSON/index.html"&gt;JSON&lt;/a&gt;, the ultra-simple data interchange format he has been promoting as an alternative to XML. JSON is a subset of JavaScript, based around that language's array, string and object literal syntax.&lt;/p&gt;

&lt;p&gt;As of today, JSON is supported as an &lt;a href="http://developer.yahoo.net/common/json.html"&gt;alternative output format&lt;/a&gt; for nearly all of Yahoo!'s Web Service APIs. This is a &lt;em&gt;Really Big Deal&lt;/em&gt;, because it makes Yahoo!'s APIs available to JavaScript running anywhere on the web without any of the &lt;a href="http://www.xml.com/pub/a/2005/11/09/fixing-ajax-xmlhttprequest-considered-harmful.html"&gt;normal problems&lt;/a&gt; caused by XMLHttpRequest's cross domain security policy.&lt;/p&gt;

&lt;p&gt;Like JSON itself, the workaround is simple. You can append two arguments to a Yahoo! REST Web Service call:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&amp;amp;output=json&amp;amp;callback=myFunction
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The page returned by the service will look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;
myFunction({ JSON data here });
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You just need to define &lt;code&gt;myFunction&lt;/code&gt; in your code and it will be called when the script is loaded. To make cross-domain requests, just dynamically create your script tags using the DOM:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '...' + '&amp;amp;output=json&amp;amp;callback=myFunction';
document.getElementsByTagName('head')[0].appendChild(script);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In long running apps you'll want to work out some kind of cleanup system to remove script tags from the DOM once they have been executed. More on this technique &lt;a href="http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/" title="Web Services + JSON = Dump Your Proxy"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It should be noted that &lt;a href="http://del.icio.us/"&gt;del.icio.us&lt;/a&gt; has had &lt;a href="http://del.icio.us/help/json"&gt;APIs like this&lt;/a&gt; for a while.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yahoo"&gt;yahoo&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="douglas-crockford"/><category term="json"/><category term="yahoo"/></entry></feed>