<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
	<title>Dustin Diaz</title>
	
	<link>http://www.dustindiaz.com</link>
	<description>Web Standards with Imagination</description>
	<lastBuildDate>Thu, 08 Jul 2010 20:31:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WSwI" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="wswi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:thumbnail url="http://www.dustindiaz.com/img/wswi-podcast-logo.jpg" /><media:keywords>web,design,webdesign,development,webstandards,javascript,dom,css,xhtml,yahoo,yui</media:keywords><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Podcasting</media:category><itunes:owner><itunes:email>polvero@gmail.com</itunes:email><itunes:name>Dustin Diaz</itunes:name></itunes:owner><itunes:author>Dustin Diaz</itunes:author><itunes:explicit>no</itunes:explicit><itunes:image href="http://www.dustindiaz.com/img/wswi-podcast-logo.jpg" /><itunes:keywords>web,design,webdesign,development,webstandards,javascript,dom,css,xhtml,yahoo,yui</itunes:keywords><itunes:subtitle>A JavaScript, CSS, (X)HTML web log focusing on usability and accessibility. Podcasts include Dustin Diaz with ocassional co-hosts and interviews.</itunes:subtitle><itunes:summary>A JavaScript, CSS, (X)HTML web log focusing on usability and accessibility. Podcasts include Dustin Diaz with ocassional co-hosts and interviews.</itunes:summary><itunes:category text="Technology"><itunes:category text="Podcasting" /></itunes:category><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://odeo.com/listen/subscribe?feed=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://odeo.com/img/badge-channel-black.gif">Subscribe with ODEO</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.podnova.com/add.srf?url=http%3A%2F%2Ffeeds.feedburner.com%2FWSwI" src="http://www.podnova.com/img_chicklet_podnova.gif">Subscribe with Podnova</feedburner:feedFlare><item>
		<title>Autocomplete Fuzzy Matching</title>
		<link>http://www.dustindiaz.com/autocomplete-fuzzy-matching/</link>
		<comments>http://www.dustindiaz.com/autocomplete-fuzzy-matching/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 14:21:30 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=375</guid>
		<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Autocomplete">Autocomplete widgets</a> live in nearly every system that requires filtering items via input against large amounts of data. This includes address books, email contacts, restaurants, even social graphs. However, in most matching algorithms, Engineers don't take into account that people don't know how to spell AND/OR are lazy. Thus here is a <em>really simple</em> solution to work around this problem, and in my own opinion, vastly improve the user experience.]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Autocomplete">Autocomplete widgets</a> live in nearly every system that requires filtering items via input against large amounts of data. This includes address books, email contacts, restaurants, even social graphs. However, in most matching algorithms, Engineers don&#8217;t take into account that people don&#8217;t know how to spell AND/OR are lazy. Thus here is a <em>really simple</em> solution to work around this problem, and in my own opinion, will vastly improve the user experience.</p>
<h3>Look ahead matching</h3>
<p>Let&#8217;s say you have five people. Daniel, Dustin, David, Damarcus, and Russ. Now let&#8217;s say a user types in <em>dus</em>. We would match <b>Dus</b>tin and <b>D</b>amarc<b>us</b>. Likewise, if we typed in <em>us</em>, we would get an output of D<b>us</b>tin, Damarc<b>us</b>, and R<b>us</b>s.</p>
<h3>Enter RegExp</h3>
<p>At this point, it&#8217;s sort of a no-brainer. Your input-based regular expression can be created as such:</p>
<pre><code>var people = ['Daniel', 'Dustin', 'David', 'Damarcus', 'Russ'];

function matchPeople(input) {
  var reg = new RegExp(<b>input.split('').join('\\w*').replace(/\W/, "")</b>, 'i');
  return people.filter(function(person) {
    if (person.match(reg)) {
      return person;
    }
  });
}</code></pre>
<p>Voila! Now you never have to type another vowel again! (At least in spirit&#8230; you know what I mean). In addition to this, you can do further post-process sorting based on <a href="http://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a> which will graduate better matches to the top.</p>
<h3>An Aside: Caching</h3>
<p>Since this tends to do be heavy on regular expression construction, a good idea would be to cache your compiled expressions. This can easily be done using my <a href="http://www.dustindiaz.com/javascript-cache-provider/">Cache Provider</a> as such:</p>
<pre><code>var regCache = new CacheProvider;

function matchPeople(input) {
  var reg = regCache.<b>get</b>(input) || regCache.<b>set</b>(input, new RegExp(input.split('').join('\\w*').replace(/\W/, ""), 'i'));
  // etc...
}</code></pre>
<p>Now any subsequent calls to the same input will run against a pre-compiled expression. And that folks, is all I got for the night. Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/autocomplete-fuzzy-matching/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>JavaScript Cache Provider</title>
		<link>http://www.dustindiaz.com/javascript-cache-provider/</link>
		<comments>http://www.dustindiaz.com/javascript-cache-provider/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 16:49:46 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=369</guid>
		<description><![CDATA[Every developer knows the importance of caching. From end to end you have caching on the backend (memcached, xcache, etc.) to prevent your databases being lit on fire, edge caching on content delivery networks (CDN's) in hopes that your browser will cache assets it sees more than once. And of course client-side caching so you don't repeat expensive operations (albeit algorithmically or high volume repitions). Here is a solution in JavaScript to help you out with the latter, with optional support for <a href="http://dev.w3.org/html5/webstorage/">HTML5 Local Storage</a>.]]></description>
			<content:encoded><![CDATA[<p>Every developer knows the importance of caching. From end to end you have caching on the backend (memcached, xcache, etc.) to prevent your databases being lit on fire, edge caching on content delivery networks (CDN&#8217;s) in hopes that your browser will cache assets it sees more than once. And of course client-side caching so you don&#8217;t repeat expensive operations (albeit algorithmically or high volume repitions). Here is a solution in JavaScript to help you out with the latter, with optional support for <a href="http://dev.w3.org/html5/webstorage/">HTML5 Local Storage</a>.</p>
<h3 class="code">Starting Simple</h3>
<pre><code>function CacheProvider() {
  // values will be stored here
  this._cache = {};
}</code></pre>
<h3 class="code">Feature detect on local storage</h3>
<pre><code>try {
  CacheProvider.hasLocalStorage = ('localStorage' in window) &#038;&#038; window['localStorage'] !== null;
} catch (ex) {
  CacheProvider.hasLocalStorage = false;
}</code></pre>
<p>The main reason we use <code>try / catch</code> is because despite Firefox supporting it, it can be disabled in your <code>about:config</code> settings and an error will be thrown. A simple <code>if / else</code> will not work.</p>
<p>Next we&#8217;ll add support for storing objects into local storage. This technique was borrowed from Christopher Blizzard in his excellent post <a href="http://hacks.mozilla.org/2009/06/localstorage/">Saving data with local storage</a> – for which those who didn&#8217;t know, you can <strong>only</strong> store <code>string</code>&#8217;s into local storage. Thus we have this&#8230;</p>
<h3 class="code">in / out JSON parsing</h3>
<pre><code>if (CacheProvider.hasLocalStorage) {
  Storage.prototype.setObject = function(key, value) {
    this.setItem(key, JSON.stringify(value));
  };

  Storage.prototype.getObject = function(key) {
    return JSON.parse(this.getItem(key));
  };
}</code></pre>
<p>Now for our three core methods, we&#8217;ll have get, set, and clear.</p>
<h3 class="code">Core class functionality</h3>
<pre><code>CacheProvider.prototype = {

  /**
     * {String} k - the key
     * {Boolean} local - get this from local storage?
     * {Boolean} o - is the value you put in local storage an object?
     */
  get: function(k, local, o) {
    if (local &#038;&#038; CacheProvider.hasLocalStorage) {
      var action = o ? 'getObject' : 'getItem';
      return localStorage[action](k) || undefined;
    } else {
      return this._cache[k] || undefined;
    }
  },

  /**
     * {String} k - the key
     * {Object} v - any kind of value you want to store
     * however only objects and strings are allowed in local storage
     * {Boolean} local - put this in local storage
     */
  set: function(k, v, local) {
    if (local &#038;&#038; CacheProvider.hasLocalStorage) {
      if (typeof v !== 'string') {
        // make assumption if it's not a string, then we're storing an object
        localStorage.setObject(k, v);
      } else {
        try {
          localStorage.setItem(k, v);
        } catch (ex) {
          if (ex.name == 'QUOTA_EXCEEDED_ERR') {
            // developer needs to figure out what to start invalidating
            throw new Exception(v);
            return;
          }
        }
      }
    } else {
      // put in our local object
      this._cache[k] = v;
    }
    // return our newly cached item
    return v;
  },

  /**
     * {String} k - the key
     * {Boolean} local - put this in local storage
     * {Boolean} o - is this an object you want to put in local storage?
     */
  clear: function(k, local, o) {
    if (local &#038;&#038; CacheProvider.hasLocalStorage) {
      localStorage.removeItem(k);
    }
    // delete in both caches - doesn't hurt.
    delete this._cache[k];
  }

};</code></pre>
<h3>How does this work?</h3>
<p>Note in the beginning of this post, said Cache Provider was to have <em>optional</em> support for local storage (although it appears to be most of the point). First let&#8217;s look at an example sans-local-storage.</p>
<h3 class="code">getElementsByClassName</h3>
<pre><code>var cache = new CacheProvider;

window.getElementsByClassName = getElementsByClassName || function(c) {
  var reg = cache.get(c) || cache.set(c, new RegExp("(?:^|\\s+)" + c + "(?:\\s+|$)"));
  var elements = document.getElementsByTagName('*');
  var results = [];
  for (var i = 0; i &lt; elements.length; i++) {
    if (elements[i].className.match(reg)) {
      results.push(elements[i]);
    }
  }
  return results;
};</code></pre>
<p>Note the next time you work with the same class &#8211; it work with a precompiled regular expression instead of constructing a new one.</p>
<p>As another example, for large apps that require i18n, you could cache the compiled HTML strings into local storage.</p>
<pre><code>var i18nCache = new CacheProvider;

if (i18nCache.get('topnav')) {
  $('#nav').html(i18nCache.get('topnav'));
} else {
  ajax('top-nav.tmpl', function(html) {
    i18nCache.set('topnav', html);
    $('#nav').html(i18nCache.get('topnav'));
  });
}</code></pre>
<p>Other than that, have a play, do some caching, and outsource your resources to your users browser. cheers ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/javascript-cache-provider/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>JavaScript Animate</title>
		<link>http://www.dustindiaz.com/javascript-animate/</link>
		<comments>http://www.dustindiaz.com/javascript-animate/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 17:35:21 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[D.O.M.]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=366</guid>
		<description><![CDATA[Sort of an old topic for these times, but I thought I'd share a small snippet I wrote about a year ago for the live updating <a href="http://twitter.com/widgets">Twitter widgets</a> which required a tad bit of animation without the use of a library. Of course, anyone doing a large amount of animation will use <a href="http://en.wikipedia.org/wiki/JavaScript_library">library</a> or, when available in a browser - <a href="http://www.w3.org/TR/css3-transitions/">CSS transitions</a>.]]></description>
			<content:encoded><![CDATA[<p>Sort of an old topic for these times, but I thought I&#8217;d share a small snippet I wrote about a year ago for the live updating <a href="http://twitter.com/widgets">Twitter widgets</a> which required a tad bit of animation without the use of a library. Of course, anyone doing a large amount of animation will use some <a href="http://en.wikipedia.org/wiki/JavaScript_library">JavaScript library</a> or, when available in a browser &#8211; <a href="http://www.w3.org/TR/css3-transitions/">CSS transitions</a>.</p>
<p>Ultimately, the goal for the widgets &#8211; which would end up on thousands of websites, was to make them as lightweight as possible &#8211; so you can&#8217;t just go around and make jQuery, YUI, or Prototype a requirement.</p>
<p>Thus, a simple animation class was in order. One that will work in any browser that supports JavaScript &#8211; and can animate any CSS property that is enumerable. Eg: height, weight, font-size, top, left&#8230; not color, background-image, text-decoration, etc.</p>
<h3 class="code">Animation class</h3>
<pre><code>/**
  * @constructor Animate
  * @param {HTMLElement} el the element we want to animate
  * @param {String} prop the CSS property we will be animating
  * @param {Object} opts a configuration object
  * object properties include
  * from {Int}
  * to {Int}
  * time {Int} time in milliseconds
  * callback {Function}
  */
function Animate(el, prop, opts) {
  this.el = el;
  this.prop = prop;
  this.from = opts.from;
  this.to = opts.to;
  this.time = opts.time;
  this.callback = opts.callback;
  this.animDiff = this.to - this.from;
}

/**
  * @private
  * @param {String} val the CSS value we will set on the property
  */
Animate.prototype._setStyle = function(val) {
  switch (this.prop) {
    case 'opacity':
      this.el.style[this.prop] = val;
      this.el.style.filter = 'alpha(opacity=' + val * 100 + ')';
      break;

    default:
      this.el.style[this.prop] = val + 'px';
      break;
  };
};

/**
  * @private
  * this is the tweening function
  */
Animate.prototype._animate = function() {
  var that = this;
  this.now = new Date();
  this.diff = this.now - this.startTime;

  if (this.diff &gt; this.time) {
    this._setStyle(this.to);

    if (this.callback) {
      this.callback.call(this);
    }
    clearInterval(this.timer);
    return;
  }

  this.percentage = (Math.floor((this.diff / this.time) * 100) / 100);
  this.val = (this.animDiff * this.percentage) + this.from;
  this._setStyle(this.val);
};

/**
  * @public
  * begins the animation
  */
Animate.prototype.start = function() {
  var that = this;
  this.startTime = new Date();

  this.timer = setInterval(function() {
    that._animate.call(that);
  }, 4);
};</code></pre>
<p>The background on its design was from a technique <a href="http://developer.yahoo.com/yui">Y.U.I.</a> came up with in its initial launch in the Animation internals. It&#8217;s time-based, overclocked, and plays catchup for browsers that tend to run slower. Hence, the animation looks smoother in faster browsers, but does not get ahead of itself.</p>
<h3>Bonus</h3>
<p>Use transitions when possible. Generally speaking, the faster browsers tend to be ahead of their time anyway, and provide an alternative to animations with CSS transitions &#8211; so why not take advantage of this.</p>
<h3 class="code">transition</h3>
<pre><code>/**
  * @static
  * @boolean
  * allows us to check if native CSS transitions are possible
  */
Animate.canTransition = function() {
  var el = document.createElement('foo');
  el.style.cssText = '-webkit-transition: all .5s linear;';
  return !!el.style.webkitTransitionProperty;
}();</code></pre>
<p>How does it all work in practice?</p>
<h3 class="code">Fade In Example</h3>
<pre><code>if (Animate.canTransition) {
  el.style.webkitTransition = 'opacity 0.5s ease-out';
  el.style.opacity = 1;
}
new Animate(el, 'opacity', {
  from: 0,
  to: 1,
  time: 500,
  callback: done
}).start();</code></pre>
<p>In the end, it&#8217;s barebones, but works efficiently. If you need more out of it, tweak it to your liking, or really, just use a library – which won&#8217;t be uncommon.</p>
<p>Oh right, yeah, almost forgot &#8211; these wouldn&#8217;t be proper without a <a href="http://www.dustindiaz.com/basement/js-animate.html">demo page</a>. Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/javascript-animate/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Asynchronous method queue chaining in JavaScript</title>
		<link>http://www.dustindiaz.com/async-method-queues/</link>
		<comments>http://www.dustindiaz.com/async-method-queues/#comments</comments>
		<pubDate>Thu, 06 May 2010 07:25:25 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=355</guid>
		<description><![CDATA[<em>Chaining</em>. It's an extremely popular pattern these days in JavaScript. It's easily achieved by continually returning a reference to the same object between linked methods. However one technique you don't often see is queueing up a chain of methods, <em>asynchronously</em>, by which functions can be linked together <em>independent of a callback</em>. This discussion, of course, came from a late work night building the  @anywhere <a href="http://platform.twitter.com/js-api.html">JavaScript API</a> with two other mad scientists, Russ D'Sa (@dsa) and Dan Webb (@danwrong). 

Anyway, let's have a look at some historical conventions and compare them to newer ones.]]></description>
			<content:encoded><![CDATA[<p><em>Chaining</em>. It&#8217;s an extremely popular pattern these days in JavaScript. It&#8217;s easily achieved by continually returning a reference to the same object between linked methods. However one technique you don&#8217;t often see is queueing up a chain of methods, <em>asynchronously</em>, by which functions can be linked together <em>independent of a callback</em>. This discussion, of course, came from a late work night building the  @anywhere <a href="http://platform.twitter.com/js-api.html">JavaScript API</a> with two other mad scientists, Russ D&#8217;Sa (@dsa) and Dan Webb (@danwrong). </p>
<p>Anyway, let&#8217;s have a look at some historical conventions and compare them to newer ones.</p>
<p>Imagine an iterator class that operated on arrays. It could look like this:</p>
<pre>// no chaining
var o = new Iter(['a', 'b', 'c', 'd', 'e']);
o.filter(function(letter) {
  if (letter != 'c') { return letter; }
});
o.each(function(letter) {
  append(letter);
});

// with chaining
new Iter(alphabet).filter(remove_letter_c).each(append);</pre>
<p>This is a simple because we&#8217;re working on a known existing object in memory (the alphabet array). However an easy way to spoil our soup is to make our methods continue to operate without existing objects. Like say, for example, a result set you had to make an async request to the server to get. Thus, imagine making this work:</p>
<pre>ajax('/server/results.json').filter(remove_duplicates).append('div#results');</pre>
<p>In the grand scheme of things, the above example isn&#8217;t too far off from from <a href="http://www.dustindiaz.com/javascript-curry/">currying</a> (which it&#8217;s not). And to make another point, currying can often lead to bad coupling of code&#8230; which in its defense, is often the point as well. Some libraries even call this pattern <em>binding</em>&#8230; so&#8230; yeah.</p>
<p>Anyway, to the point, here is a basic Queue implementation that can be used as a tool to build your own asynchronous method chains.</p>
<pre>function Queue() {
  // store your callbacks
  this._methods = [];
  // keep a reference to your response
  this._response = null;
  // all queues start off unflushed
  this._flushed = false;
}

Queue.prototype = {
  // adds callbacks to your queue
  add: function(fn) {
    // if the queue had been flushed, return immediately
    if (this._flushed) {
      fn(this._response);

    // otherwise push it on the queue
    } else {
      this._methods.push(fn);
    }
  },

  flush: function(resp) {
    // note: flush only ever happens once
    if (this._flushed) {
      return;
    }
    // store your response for subsequent calls after flush()
    this._response = resp;
    // mark that it's been flushed
    this._flushed = true;
    // shift 'em out and call 'em back
    while (this._methods[0]) {
      this._methods.shift()(resp);
    }
  }
};</pre>
<p>With this code, you can put it straight to work for something useful, like say, a jQuery plugin that fetches content remotely and then appends the results to your selector input. For you plugin developers our there, it would look like this&#8230;</p>
<pre>
&lt;script src="jquery.js"&gt;&lt;/script&gt;
&lt;script src="async-queue.js"&gt;&lt;/script&gt;
&lt;script&gt;
(function($) {

  $.fn.fetch = function(url) {
    <em>var queue = new Queue;</em>
    this.each(function() {
      var el = this;
      <em>queue.add</em>(function(resp) {
        $(el).html(resp);
      });
    });

    $.ajax({
      url: url,
      dataType: 'html',
      success: function(html) {
        <em>queue.flush(html);</em>
      }
    });
    return this;
  };

})(jQuery);
&lt;/script&gt;
</pre>
<p>Then voila! You can make your DOM queries, fetch remote content, and continue your chain, asynchronously.</p>
<pre>$("&lt;div/&gt;")
  .fetch('/server/navigation.html')
  .addClass('column')
  .appendTo('#side');
</pre>
<p>Here&#8217;s a <a href="http://www.dustindiaz.com/basement/jquery-puts.html">brief example</a> of showing off the example above. Point being, one can only imagine the possibilities you could do. Say for example, having multiple items in the queue waiting to operate on a response. Thus imagine this&#8230;</p>
<pre>fetchTweet(url).linkify().filterBadWords().appendTo('#status');</pre>
<p>Your internals would look like this with the Queue.</p>
<pre>
function fetchTweet(url) {
  this.queue = new Queue;
  this.tweet = "";
  var self = this;
  ajax(url, function(resp) {
    self.tweet = resp;
    self.queue.flush(this);
  });
}
fetchTweet.prototype = {

  linkify: function() {
    this.queue.add(function(self) {
      self.tweet = self.tweet.replace(/\b@(\w{1,20}\b/g, '&lt;a href="..."&gt;$1&lt;/a&gt;');
    });
  return this;
  },

  filterBadWords: function() {
    this.queue.add(function(self) {
      self.tweet = self.tweet.replace(/\b(fuck|shit|piss)\b/g, "");
    });
  return this;
  },

  appendTo: function(selector) {
    this.queue.add(function(self) {
      $(self.tweet).appendTo(selector);
    });
  return this;
  }

};
</pre>
<p>And with that, you can call it a night. Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/async-method-queues/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Something changed</title>
		<link>http://www.dustindiaz.com/something-changed/</link>
		<comments>http://www.dustindiaz.com/something-changed/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 16:54:48 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=351</guid>
		<description><![CDATA[And not just this website. Things are different now like, for example, my friends, my interests, and to sound nerdy, the web. All different for the better.

I've been a bit under the blog radar this last year. @Erin and I have been busy with our separate jobs, also creating our joint photography effort with <a href="http://flashbullet.com">Flash Bullet</a> having done a dozen shoots the last few months. I've remained stagnant with my own personal photography having not being able to fully recover from last years <a href="http://photography.dustindiaz.com">365</a>.

Work @Twitter has kept me busy. A small group of us (@dsa, @todd, &#038; @danwrong) had been heads down for the last two months trying to release something that we think will effect billions of lives called @Anywhere. We think it's great.]]></description>
			<content:encoded><![CDATA[<p>And not just this website. Things are different now like, for example, my friends, my interests, and to sound nerdy, the web. All different for the better.</p>
<p>I&#8217;ve been a bit under the blog radar this last year. @Erin and I have been busy with our separate jobs, also creating our joint photography effort with <a href="http://flashbullet.com">Flash Bullet</a> having done a dozen shoots the last few months. I&#8217;ve remained stagnant with my own personal photography having not being able to fully recover from last years <a href="http://photography.dustindiaz.com">365</a>.</p>
<p>Work @Twitter has kept me busy. A small group of us (@dsa, @todd, &#038; @danwrong) had been heads down for the last two months trying to release something that we think will effect billions of lives called @Anywhere. We think it&#8217;s great.</p>
<p>For the 90% of you reading this because it was once a JavaScript blog, my hope is for it to remain as such. It is in fact still the main thing I do. Speaking of which, if you haven&#8217;t had a play yet, dive into our <a href="http://platform.twitter.com/js-api.html">Twitter JavaScript API</a> preview. Some folks <a href="http://pongsocket.com/tweet-it/">already have</a>. Pending more test coverage, we&#8217;ll release this into a stable release version. Thus the idea being <em>anyone</em> can build a fully featured Twitter web-client with pure client-side scripting.</p>
<p>On another note, I&#8217;ve taken a side step to help the redesign effort that some of you <a href="http://dribbble.com/shots/14379-Profile">may have already seen</a>. This too should be quite good. It&#8217;s pretty obvious that our feature set has out-grown our current <a href="http://twitter.com">Twitter.com</a> experience, so we&#8217;re finally doing something about it&#8230;. and more.</p>
<p>Other than that, some final changes include:</p>
<ul>
<li>A new TV</li>
<li>A full bar sits in my living room</li>
<li>Erin has an American visa</li>
<li>I like fish, more</li>
</ul>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/something-changed/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Unofficial Twitter Widget Documentation</title>
		<link>http://www.dustindiaz.com/twitter-widget-doc/</link>
		<comments>http://www.dustindiaz.com/twitter-widget-doc/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 07:00:49 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=346</guid>
		<description><![CDATA[So, the <a href="http://twitter.com/goodies/widget_search">Twitter Search Widget</a> has officially launched. And the installation is fairly self-explanatory (as a matter of fact, I don't think we even explained it at all??). But nonetheless, if you haven't checked it out, it's worth <a href="http://twitter.com/goodies/widget_search">doing that now</a>. The new widgets are hot! Ok. On with this.]]></description>
			<content:encoded><![CDATA[<p>So, the <a href="http://twitter.com/goodies/widget_search">Twitter Search Widget</a> has officially launched. And the installation is fairly self-explanatory (as a matter of fact, I don&#8217;t think we even explained it at all??). But nonetheless, if you haven&#8217;t checked it out, it&#8217;s worth <a href="http://twitter.com/goodies/widget_search">doing that now</a>. The new widgets are hot! Ok. On with this.</p>
<h3>So, what&#8217;s this do?</h3>
<p>The Twitter Search Widget allows you to track any topic, live, in real-time. You can even use our <a href="http://search.twitter.com/operators">advanced search operators</a> which dogfoods straight into our own <a href="http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search">search API</a>.</p>
<h3>So what are these other features?</h3>
<p>Well, for the advanced JavaScripters; or actually, I should say, ANYONE who can read JavaScript should be able to try some of these things out on your own. Which brings us to <strong>the hidden undocumented features</strong></p>
<h3>But first&#8230;</h3>
<p>Let&#8217;s look at the base widget code to start off with.</p>
<h3 class="code">base twitter widget code</h3>
<pre><code>&lt;div id=&quot;twtr-search-widget&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;http://widgets.twimg.com/j/1/widget.js&quot;&gt;&lt;/script&gt;
&lt;link href=&quot;http://widgets.twimg.com/j/1/widget.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot;&gt;
&lt;script&gt;
new TWTR.Widget({
  search: &#39;my search query&#39;,
  id: &#39;twtr-search-widget&#39;,
  loop: true,
  title: &#39;what people say about...&#39;,
  subject: &#39;stuff and things&#39;,
  width: 250,
  height: 300,
  theme: {
    shell: {
      background: &#39;#111&#39;,
      color: &#39;#000000&#39;
    },
    tweets: {
      background: &#39;#000000&#39;,
      color: &#39;#ffffff&#39;,
      links: &#39;#f59f00&#39;
    }
  }
}).render().start();
&lt;/script&gt;</code></pre>
<p>What this does is load our base functionality and stylesheet. It then instantiates a new Widget object, and points to an id representing an HTML element. What this tells you already is that you could technically have multiple widgets on a page by simply instantiating new objects, populating existing <code>&lt;div&gt;</code> elements. Hey, you could create your own web version of tweet deck this way by stacking a few of them into columns :)</p>
<h4>The features object</h4>
<p>So there is a features object that you can pass into your constructor. There are currently <em>four</em> of these features.</p>
<h3 class="code">the features object</h3>
<pre><code>new TWTR.Widget({
  id: 'my-element-id',
  .
  .
  .
  features: {
    hashtags: true,
    timestamp: true,
    avatars: true,
    fullscreen: false
  }
}).render().start();</code></pre>
<p>Albeit mostly self explanatory, they each do this:</p>
<ul>
<li><strong>hashtags</strong>: defaults to true. setting to false will hide them.</li>
<li><strong>timestamp</strong>: defaults to true. setting to false will hide them.</li>
<li><strong>avatars</strong>: defaults to true for search. and false for profile widget. setting to false will hide them.</li>
<li><strong>fullscreen</strong>: (I love this feature!) defaults to false. setting to true will give you a full viewport sized widget, perfect for displaying on large screens at events, conferences, etc.
<li>
</ul>
<p>Overall, these features are pretty great. I especially love the hashtag and fullscreen features since they are perfect for pairing.</p>
<p>Let&#8217;s say for instance you&#8217;re running a conference like <a href="http://sxsw.com">SxSW</a> — you could search for &#8220;#sxsw OR #sxsw09&#8243; — and in the results, hide the hashtags so it doesn&#8217;t distract the readability of all the searches. Neat, eh?</p>
<h3>Some examples</h3>
<p>I went ahead and installed the widget on my own site — And here&#8217;s a few examples:</p>
<ul>
<li>fullscreen, hidden hashtag search for <a href="http://www.dustindiaz.com/search/?q=%23iranelection&#038;hashtags=false">#iranelection</a></li>
<li>fullscreen <a href="http://www.dustindiaz.com/search/?q=iphone%20to:apple">iphone to:apple</a> (hey, we all do it)</li>
<li>Or sometimes you just want to know what <a href="http://www.dustindiaz.com/search/?q=from:evan">Evan Weaver is doing</a></li>
</ul>
<h3>That&#8217;s it for now</h3>
<p>This will all undoubtedly be on our FAQ website soon enough, but it&#8217;s enough to have a play.</p>
<p>Happy Twidget Searching!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/twitter-widget-doc/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Twita@talinkahashify your tweets</title>
		<link>http://www.dustindiaz.com/linkified-tweets/</link>
		<comments>http://www.dustindiaz.com/linkified-tweets/#comments</comments>
		<pubDate>Mon, 25 May 2009 19:48:44 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[D.O.M.]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=342</guid>
		<description><![CDATA[Well hello everyone. I had previously <a href="http://twitter.com/ded/status/1823235355">tweeted</a> about this a few weeks ago... but sometimes I forget more folks follow this blog than my Twitter.

If any of you use our <a href="http://apiwiki.twitter.com/">Twitter API</a> to embed your latest statuses on your website, here is a simple little script that will do a few niceties for you. This includes linkafying, hashtagifying, and of course the most important, atify (aka: "at replies").

Hit the jump to find out more on how to use it.]]></description>
			<content:encoded><![CDATA[<p>Well hello everyone. I had previously <a href="http://twitter.com/ded/status/1823235355">tweeted</a> about this a few weeks ago&#8230; but sometimes I forget more folks follow this blog than my Twitter.</p>
<p>If any of you use our <a href="http://apiwiki.twitter.com/">Twitter API</a> to embed your latest statuses on your website, here is a simple little script that will do a few niceties for you. This includes linkafying, hashtagifying, and of course the most important, atify (aka: &#8220;at replies&#8221;). <a href="http://www.dustindiaz.com/basement/ify.html">check out the source</a>, and use it as such:</p>
<h3 class="code">tweet code</h3>
<pre><code>ify.clean('your tweet text');</code></pre>
<p>Thus making transforming a tweet such as the following:</p>
<h3 class="code">Before and After</h3>
<pre><code><strong>Bfore</strong>
Hey @ded. You should #stfu! and use http://canon.com #rant.
kthxbye @erin http://www.google.com/search?q=canon+rules

<strong>After</strong>
Hey @&lt;a href=&quot;http://twitter.com/ded&quot;&gt;ded&lt;/a&gt;.
You should #&lt;a href=&quot;http://search.twitter.com/search?q=%23stfu&quot;&gt;stfu&lt;/a&gt;!
and use &lt;a href=&quot;http://canon.com&quot;&gt;http://canon.com&lt;/a&gt;
#&lt;a href=&quot;http://search.twitter.com/search?q=%23rant&quot;&gt;rant&lt;/a&gt;.
kthxbye @&lt;a href=&quot;http://twitter.com/erin&quot;&gt;erin&lt;/a&gt;
&lt;a href=&quot;http://www.google.com/search?q=canon rules&quot;&gt;

http://www.google.com/se...&lt;/a&gt;</code></pre>
<p>Download: <a href="http://www.dustindiaz.com/basement/js/ify.js">source</a> | <a href="http://www.dustindiaz.com/basement/js/ify.min.js">minified</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/linkified-tweets/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		<enclosure url="http://www.dustindiaz.com/basement/js/ify.js" length="1025" type="application/javascript" /><media:content url="http://www.dustindiaz.com/basement/js/ify.js" fileSize="1025" type="application/javascript" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>Well hello everyone. I had previously tweeted about this a few weeks ago... but sometimes I forget more folks follow this blog than my Twitter. If any of you use our Twitter API to embed your latest statuses on your website, here is a simple little script</itunes:subtitle><itunes:author>Dustin Diaz</itunes:author><itunes:summary>Well hello everyone. I had previously tweeted about this a few weeks ago... but sometimes I forget more folks follow this blog than my Twitter. If any of you use our Twitter API to embed your latest statuses on your website, here is a simple little script that will do a few niceties for you. This includes linkafying, hashtagifying, and of course the most important, atify (aka: "at replies"). Hit the jump to find out more on how to use it.</itunes:summary><itunes:keywords>web,design,webdesign,development,webstandards,javascript,dom,css,xhtml,yahoo,yui</itunes:keywords></item>
		<item>
		<title>Me on Photography and JavaScript</title>
		<link>http://www.dustindiaz.com/me-on-photography-and-javascript/</link>
		<comments>http://www.dustindiaz.com/me-on-photography-and-javascript/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 19:08:34 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=340</guid>
		<description><![CDATA[I figured the only way I can keep someone's attention on this blog while talking about Photography is to <em>also</em> talk about JavaScript. Since I have a vested interest in both, and with very good reason, they make a good pair. As some of you might have remembered, I wrote a post not too long back on <a href="http://dustindiaz.com/photography">Photography</a> where I discussed some of the basics and also a brief comparison of JavaScript and Photography.

With that said, if you like one and not the other, this should still at least be entertaining and educational. If you like both, then you're in for a treat of nerdy euphemisms and theories.]]></description>
			<content:encoded><![CDATA[<p>I figured the only way I can keep someone&#8217;s attention on this blog while talking about Photography is to <em>also</em> talk about JavaScript. Since I have a vested interest in both, and with very good reason, they make a good pair. As some of you might have remembered, I wrote a post not too long back on <a href="http://dustindiaz.com/photography">Photography</a> where I discussed some of the basics and also a brief comparison of JavaScript and Photography.</p>
<p>With that said, if you like one and not the other, this should still at least be entertaining and educational. If you like both, then you&#8217;re in for a treat of nerdy euphemisms and theories.</p>
<h3>Hold on a sec&#8230; Photography? Really?</h3>
<p>Yes, really. If you haven&#8217;t noticed, I&#8217;ve started my very own <a href="http://photography.dustindiaz.com">365 Project</a> where I take at least one photo a day, and post it there. There&#8217;s even a handy <a href="http://feedproxy.google.com/ded-365">RSS feed</a> you can drop into your favorite Reader. Anyway&#8230;</p>
<h3>Photography and JavaScript are similar because&#8230;</h3>
<ul>
<li><strong>They are expressive</strong>: This is almost a no-brainer. Since the beginning of having the ability to take a picture of something, the expression &#8220;a picture says a thousand words&#8221; has held true to this day. This also great for people who aren&#8217;t fantastic with words. This spills into JavaScript because it is one of the smallest object oriented languages on the planet and allows you to express behavior and action in a variety of ways. The mere fact that we have such a plethora of JavaScript libraries these days is testament to how expressive it really is, especially since most of them pretty much do the asme thing! Just <em>differently</em>.</li>
<li><strong>They can be as simple or as complicated as you make them</strong>: I&#8217;ve always said that JavaScript is the closest thing we have to a ninja, but in written lexical structure. As previously mentioned, it&#8217;s a small language. But it can be very, very complicated at times, especially when you dive into <a href="http://jsdesignpatterns.com/">JavaScript Design Patterns</a> and begin to learn about subclassing, information hiding, prototypal inheritance, and all that other fun good stuff. Same holds true for photography in that the scientific break-thru of capturing light (onto film or a digital sensor), and modifying it by means of shutter speed and aperture, is <em>so simple</em> that anyone can get started taking pictures on a manual camera. On the flip side, you can turn it into a really complicated and complex hobby (or profession) by introducing flash, wireless remote systems, then umbrellas, soft boxes, snoots, grid spots, gobos&#8230; there&#8217;s also a giant pile of lenses you could buy; macros, telephotos, wide-angles, primes, zooms&#8230; the list can go on. There&#8217;s a reason why there are dedicated camera stores like <a href="http://www.bhphotovideo.com/">B&amp;H Photo</a>, <a href="http://www.calumetphoto.com/">Calumet Photo</a>, unfortunately there aren&#8217;t exactly stores like this for JavaScript ;) &mdash; I guess that&#8217;s what <a href="http://www.apress.com/">Apress</a> and <a href="http://oreilly.com/">O&#8217;Reilly</a> are for (which sells both photography and JavaScript books :)</li>
<li><strong>they are both object oriented and subject driven</strong>: Clearly, JavaScript is object oriented, there&#8217;s no argument on that (seriously, don&#8217;t get us started), but often the subject of what we&#8217;re programming for drives how we use the language. When you&#8217;re building a library, you&#8217;ll most likely use the languages object oriented features. When you&#8217;re implementing interfaces and dealing with simple tasks, you&#8217;ll use more functional JavaScript. Same goes for photography where the subjects should drive the type of photos you&#8217;ll take. When I&#8217;m going to shoot a small plant, I&#8217;m not going to pull out my wide angle, I&#8217;ll pull out a macro or telephoto. When I&#8217;m doing portraits, I&#8217;ll grab my prime 85mm. For more serious work, I can begin to create my own light with strobes. Maybe even two or three of them. And of course the real reason photography is object oriented, is because it evolves around taking pictures of objects. Of course don&#8217;t call people objects (which is slightly inappropriate), they are more or less subjects.</li>
</ul>
<h3>And so the list goes on</h3>
<p>I could probably continue on, but I&#8217;m pretty sure most of the point has been proven. This stuff is fun for a reason, and I&#8217;ve always known that in one way or another, the two have been connected. Something about my brain latches on to <strong>simplicity with the ability to evolve</strong>. Kind of like <a href="http://gmail.com">Gmail</a> (but this is not the forum for that). Cheers everyone, and happy Friday!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/me-on-photography-and-javascript/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>RegEx Brain Teaser Part II</title>
		<link>http://www.dustindiaz.com/regex-brain-teaser-part-ii/</link>
		<comments>http://www.dustindiaz.com/regex-brain-teaser-part-ii/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 02:32:09 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=338</guid>
		<description><![CDATA[In July I published a post <a href="http://www.dustindiaz.com/programming-brain-teaser/">calling out puzzle enthusiasts</a> to solve a programming brain teaser that involved grouping duplicates. Some solved it with a hefty amount of code, others used a savvy regular expression.

Now I'd like to invite you to yet another brain teaser, except this time your answer <strong>must</strong> require a regular expression. If you solve it, I would urge you to <a href="http://store.xkcd.com/#RegularExpressionsShirt">buy yourself a t-shirt</a> ;)]]></description>
			<content:encoded><![CDATA[<p>In July I published a post <a href="http://www.dustindiaz.com/programming-brain-teaser/">calling out puzzle enthusiasts</a> to solve a programming brain teaser that involved grouping duplicates. Some solved it with a hefty amount of code, others used a savvy regular expression.</p>
<p>Now I&#8217;d like to invite you to yet another brain teaser, except this time your answer <strong>must</strong> require a regular expression. If you solve it, I would urge you to <a href="http://store.xkcd.com/#RegularExpressionsShirt">buy yourself a t-shirt</a> ;)</p>
<h3>The Problem</h3>
<p>Write a function that takes a text input (first argument), and an integer specifying the amount of duplicates (second argument) to begin the grouping. View the following code as our skeleton:</p>
<h3 class="code">empty function</h3>
<pre><code>function bookend(text, start) {
  // return modified text
}
var example = 'a a a a a a a a a bb bb c c c c d a dd dd dd dd dd dd';

var result = bookend(example, 3);
// result is '<em>a a a</em> (a a a a a a) bb bb <em>c c c</em> (c) d a <em>dd dd dd</em> (dd dd dd)'

var result2 = bookend(example, 4);
// result2 is '<em>a a a a</em> (a a a a a) bb bb c c c c d a <em>dd dd dd dd</em> (dd dd)'</code></pre>
<h3>In English</h3>
<p><strong>Bookend all duplicates that begin after the specific amount of minimum duplicates</strong>. Therefore if you specify the offset of &#8216;4&#8242; as your argument, and there are six duplicates in a row, then bookend the final two. Also take <em>special note of the spaces</em> in the examples.</p>
<h3>Assumptions</h3>
<p>You can assume your text input will only be a mix of letters (eg: &#8220;\w+&#8221;), and that nothing is separated by more than a single space.</p>
<h3>Sharing</h3>
<p>If you come up with a solution, post them offsite. I&#8217;d recommend <a href="http://pastie.org/pastes/new">Pastie.org</a>.<br />
Happy RegExing!<br />
<strong>Cheers!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/regex-brain-teaser-part-ii/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Get your Gmail Stickers</title>
		<link>http://www.dustindiaz.com/get-your-gmail-stickers/</link>
		<comments>http://www.dustindiaz.com/get-your-gmail-stickers/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 23:36:29 +0000</pubDate>
		<dc:creator>polvero@gmail.com (Dustin Diaz)</dc:creator>
				<category><![CDATA[Duely Noted]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://www.dustindiaz.com/?p=336</guid>
		<description><![CDATA[Yeah. <a href="http://gmailblog.blogspot.com/2008/12/get-your-gmail-stickers.html">Really</a>. Send us a snail-mail with a 42 cent stamp, and we'll give you some stickers! Also, this is the first showcase of any of my photos on behalf of Google :)
Cheers!]]></description>
			<content:encoded><![CDATA[<p>Yeah. <a href="http://gmailblog.blogspot.com/2008/12/get-your-gmail-stickers.html">Really</a>. Send us a snail-mail with a 42 cent stamp, and we&#8217;ll give you some stickers! Also, this is the first showcase of any of my photos on behalf of Google :)<br />
Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustindiaz.com/get-your-gmail-stickers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	<media:credit role="author">Dustin Diaz</media:credit><media:rating>nonadult</media:rating></channel>
</rss>
