<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>plaintext</title>
	<atom:link href="http://niryariv.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://niryariv.wordpress.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 Nov 2009 21:14:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='niryariv.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b606a74c123b49aaadfff7cdb030dab1?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>plaintext</title>
		<link>http://niryariv.wordpress.com</link>
	</image>
			<item>
		<title>UnShorten WordPress Plugin Uses TheRealURL</title>
		<link>http://niryariv.wordpress.com/2009/11/10/unshorten-wordpress-plugin-uses-therealurl/</link>
		<comments>http://niryariv.wordpress.com/2009/11/10/unshorten-wordpress-plugin-uses-therealurl/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:09:57 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[The Real URL]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=359</guid>
		<description><![CDATA[I recently found that Jon Rogers, a developer from the UK, released the UnShorten WordPress plugin, which uses TheRealURL to unshorten links displayed by the Twitter Tools plugin.
That&#8217;s pretty cool, TheRealURL was designed as a web service with exactly this type of use in mind.
Between this and other users TheRealURL now serves over 40,000 requests [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=359&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently found that <a href="http://www.jonrogers.co.uk/">Jon Rogers</a>, a developer from the UK, released the <a href="http://www.jonrogers.co.uk/unshorten-wordpress-plugin/">UnShorten</a> WordPress plugin, which uses <a href="http://therealurl.appspot.com/">TheRealURL</a> to unshorten links displayed by the <a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a> plugin.</p>
<p>That&#8217;s pretty cool, TheRealURL was <a href="http://niryariv.wordpress.com/2009/04/20/the-real-url/">designed</a> as a web service with exactly this type of use in mind.</p>
<p>Between this and other users TheRealURL now serves over 40,000 requests a day. It&#8217;s nice to see Google App Engine handling that with barely using any of the various daily <a href="http://code.google.com/appengine/docs/quotas.html">quotas</a> (except for incoming bandwidth&#8230; Need to check on that one):</p>
<p><a href="http://niryariv.files.wordpress.com/2009/11/picture-152.png"><img class="aligncenter size-full wp-image-371" title="TheRealURL GAE Quota Usage" src="http://niryariv.files.wordpress.com/2009/11/picture-152.png?w=700&#038;h=209" alt="TheRealURL GAE Quota Usage" width="700" height="209" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/359/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=359&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/11/10/unshorten-wordpress-plugin-uses-therealurl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>

		<media:content url="http://niryariv.files.wordpress.com/2009/11/picture-152.png" medium="image">
			<media:title type="html">TheRealURL GAE Quota Usage</media:title>
		</media:content>
	</item>
		<item>
		<title>So Beautiful.</title>
		<link>http://niryariv.wordpress.com/2009/10/10/foggy-windows/</link>
		<comments>http://niryariv.wordpress.com/2009/10/10/foggy-windows/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 17:53:00 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=353</guid>
		<description><![CDATA[Jenny Pollak&#8217;s foggy window shots.

(Found via FFFFOUND)
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=353&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;">Jenny Pollak&#8217;s <a href="http://www.booooooom.com/2009/01/02/jenny-pollak/">foggy window shots</a>.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-352" title="jenny_pollak_07" src="http://niryariv.files.wordpress.com/2009/10/jenny_pollak_07.jpg?w=500&#038;h=490" alt="jenny_pollak_07" width="500" height="490" /></p>
<p style="text-align:center;">(Found via <a href="http://ffffound.com/image/7361586610ce47d6029714356c197b847a45474b">FFFFOUND</a>)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=353&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/10/10/foggy-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>

		<media:content url="http://niryariv.files.wordpress.com/2009/10/jenny_pollak_07.jpg" medium="image">
			<media:title type="html">jenny_pollak_07</media:title>
		</media:content>
	</item>
		<item>
		<title>Obscure</title>
		<link>http://niryariv.wordpress.com/2009/08/19/obscure/</link>
		<comments>http://niryariv.wordpress.com/2009/08/19/obscure/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 00:17:48 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=345</guid>
		<description><![CDATA[i love working on an obscure book.  people cling to ideas, because they&#8217;re supposed to be vouchers for a million dollars.  no, write an obscure book.  build something outside all that pressure.  i guess treehouses for kids qualify.
_why, Sep 2004

Where&#8217;s _why? I do hope all is OK.
     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=345&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p><strong>i love working on an obscure book.  people cling to ideas, because they&#8217;re supposed to be vouchers for a million dollars.  no, write an obscure book.  build something outside all that pressure.  i guess treehouses for kids qualify.</strong></p>
<p>_why, <a href="http://www.advogato.org/person/whytheluckystiff/diary/50.html">Sep 2004</a>
</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=773106">Where&#8217;s</a> _<a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">why</a>? I do hope all is OK.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=345&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/08/19/obscure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>TheRealURL Adds Page Titles</title>
		<link>http://niryariv.wordpress.com/2009/07/17/therealurl-now-adds-page-titles/</link>
		<comments>http://niryariv.wordpress.com/2009/07/17/therealurl-now-adds-page-titles/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 19:29:42 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[The Real URL]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=324</guid>
		<description><![CDATA[I needed this for a project I&#8217;m working on, so I added a new feature to TheRealURL unshortening service: JSON/P requests now return the page title (scraped from the HTML &#60;title&#62; tag) as well as its original URL. 
For example, http://therealurl.appspot.com/?format=json&#38;url=bit.ly/a returns:
{ &#34;url&#34; : &#34;http://www.apple.com/&#34;, &#34;title&#34; : &#34;Apple&#34; }
The plain text format remains as is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=324&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I needed this for a project I&#8217;m working on, so I added a new feature to <a href="http://therealurl.appspot.com/">TheRealURL</a> unshortening service: JSON/P requests now return the page title (scraped from the HTML <tt>&lt;title&gt;</tt> tag) as well as its original URL. </p>
<p>For example, <tt><a href="http://therealurl.appspot.com/?format=json&amp;url=bit.ly/a">http://therealurl.appspot.com/?format=json&amp;url=<strong>bit.ly/a</strong></a></tt> returns:</p>
<pre class="brush: jscript;">{ &quot;url&quot; : &quot;http://www.apple.com/&quot;, &quot;title&quot; : &quot;Apple&quot; }</pre>
<p>The plain text format remains as is &#8211; nothing but the unshortened URL &#8211; so I don&#8217;t think there should be any issues for existing API users. Response times don&#8217;t appear to be affected much either. If you do get any issues, please let me know in the comments or at niryariv@gmail.com.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=324&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/07/17/therealurl-now-adds-page-titles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>The Long Poll: AJAX Push(like) Chat with Comet</title>
		<link>http://niryariv.wordpress.com/2009/07/13/the-long-poll-implementing-ajax-chat-with-comet/</link>
		<comments>http://niryariv.wordpress.com/2009/07/13/the-long-poll-implementing-ajax-chat-with-comet/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:43:36 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[comet]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[long poll]]></category>
		<category><![CDATA[push]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=299</guid>
		<description><![CDATA[Recently I&#8217;ve been working on an AJAX based chat application (in development..). The obvious way to do it is send an XMLHttpRequest every few seconds to check for new messages. Unless it&#8217;s a particularly animated conversation most requests won&#8217;t return any new content, so I added a simple Conditional-GET like system based on the chat&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=299&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently I&#8217;ve been working on an AJAX based chat <a href="http://www.helloworldchat.com/">application</a> (in development..). The obvious way to do it is send an XMLHttpRequest every few seconds to check for new messages. Unless it&#8217;s a particularly animated conversation most requests won&#8217;t return any new content, so I added a simple Conditional-GET like system based on the chat&#8217;s text size. Here&#8217;s the client side implementation:</p>
<pre class="brush: jscript;">
function refresh_chat() {
	$.ajax({
	  	url: &quot;/chat&quot;,
	   	data: &quot;format=xhr&amp;chat_id={{chat_id}}&amp;cur_len=&quot; + chat_content.length,
		  complete: function(xhr){
				if (xhr.status == 200) render_chat(xhr.responseText);
				setTimeout(&quot;refresh_chat()&quot;, 5000)
		  }
	 });
}
</pre>
<p>And the server code that handles it:</p>
<pre class="brush: python;">
cur_len = self.request.get(&quot;cur_len&quot;, 0)
if len(chat.content) == int(cur_len):
	self.error(304) # return 304 Not Modified
else:
	self.response.out.write(chat.content) # return new content
</pre>
<p>That&#8217;s basically the standard approach. Pretty simple, works ok (could be optimized a bit, for example return only the actual new content etc). It&#8217;s not exactly an elegant design, though. Trying to use HTTP, designed as a Pull protocol, for an application that requires Push results creates this system of frequent server requests with empty responses, kind of like the &#8220;Are we there yet?&#8221; conversations with kids on long road trips.</p>
<p><a href="http://jsconf2009.com/moffitt_video.html">Jack Moffitt&#8217;s JSConf talk</a> introduced me to the concept of <a href="http://en.wikipedia.org/wiki/Push_technology#Long_polling">Long Polling</a>, aka <a href="http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications">Comet</a> or (with a lot added) <a href="http://xmpp.org/extensions/xep-0124.html">BOSH</a>, as a way to simulate HTTP Push. Rather than have the client sending a lot of short, frequent requests and the server responding to each as fast as possible, <strong>long polling turns it around: the server holds the requests as long as it can, returning a response only when it has new data or a timeout limit was hit.</strong> So, instead of sending request every 3 seconds, for example, you can send one every 30 seconds.</p>
<p>Client side code remains almost the same:</p>
<pre class="brush: jscript;">
function refresh_chat() {
	$.ajax({
	  	url: &quot;/chat&quot;,
	   	data: &quot;format=xhr&amp;chat_id={{chat_id}}&amp;cur_len=&quot; + chat_content.length,
		  complete: function(xhr){
				if (xhr.status == 200) render_chat(xhr.responseText);
				setTimeout(&quot;refresh_chat()&quot;, 1000);
		  }
	 });
}
</pre>
<p>But on the server side, there&#8217;s a bit of new logic to keep checking for new content while the server holds the response:</p>
<pre class="brush: python;">
cur_len = self.request.get(&quot;cur_len&quot;, 0)
end_by = int(time.time()) + 30

while int(time.time()) &lt; end_by:
	if len(chat.content) != int(cur_len):
		return self.response.out.write(chat.content) # return new content

	time.sleep(1)

self.error(304) # return 304 Not Modified
</pre>
<p>If you have any experience building web applications, you&#8217;ve spent a lot of effort making sure servers respond quickly to requests. Delaying the response is counter-intuitive, which in itself makes Comet useful to know, if only for its new perspective. However, this also makes production use a bit complicated, since most web server stacks are optimized for maximum requests/second rather than long concurrent requests. Content-rich sites often use separate servers for big media content for this reason, and Comet also has its own server (er &#8220;HTTP-based event routing bus&#8221;) in <a href="http://cometdproject.dojotoolkit.org/">Cometd</a>. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/299/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=299&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/07/13/the-long-poll-implementing-ajax-chat-with-comet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>FeedVolley: Messages From Iran</title>
		<link>http://niryariv.wordpress.com/2009/06/18/feedvolley-messages-from-iran/</link>
		<comments>http://niryariv.wordpress.com/2009/06/18/feedvolley-messages-from-iran/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 18:33:00 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[feedvolley]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=291</guid>
		<description><![CDATA[I just put up a quick hack I made with FeedVolley (more about FV here), that aggregates Twitter (and other media) feeds coming from inside Iran: Messages From Iran
I don&#8217;t know about news value, but it&#8217;s pretty cool to be able to refresh that page now and then and get a snapshot of the current [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=291&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just put up a quick hack I made with <a href="http://feedvolley.com/">FeedVolley</a> (more about FV <a href="http://niryariv.wordpress.com/category/projects/feedvolley/">here</a>), that aggregates Twitter (and other media) feeds coming from inside Iran: <a href="http://feedvolley.com/MessagesFromIran">Messages From Iran</a></p>
<p>I don&#8217;t know about news value, but it&#8217;s pretty cool to be able to refresh that page now and then and get a snapshot of the current mood and happenings, in these possibly historic times there.</p>
<p>It was also cool to find another use for FeedVolley, which I neglected a bit recently ;) I added some page caching on top of the existing feed caching, to allow it to handle some traffic (Slicehost&#8217;s 256MB slices seem to start sending swap alerts as soon as traffic rises above negligible). The sources are basically the ones listed <a href="http://friendfeed.com/iran-primary-sources/services">here</a>, with a few additional ones I&#8217;m trying to find. In fact, if you really want to keep a close watch on what&#8217;s going on, you may want to watch the FriendFeed <a href="http://friendfeed.com/iran-primary-sources">stream</a> &#8211; the FeedVolley page is really just an HTML skin to make the feed look a little nicer (hopefully). </p>
<p>(Favorite tweet so far: &#8220;<a href="http://twitter.com/jadi/statuses/2225781900">@jonobacon IRC is blocked. Tell our regards to Ubuntu Global Jam from Iran. I&#8217;m twitting the #iranElection story from a Kubuntu machine :)</a>&#8220;. Makes me think of starting to use Twitter again..)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=291&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/06/18/feedvolley-messages-from-iran/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>The Case for Working With Your Hands</title>
		<link>http://niryariv.wordpress.com/2009/06/07/the-case-for-working-with-your-hands/</link>
		<comments>http://niryariv.wordpress.com/2009/06/07/the-case-for-working-with-your-hands/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 21:26:01 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[other]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=281</guid>
		<description><![CDATA[I love this NY Times article not just because it reminds me of my old motorcycle which I enjoyed fixing almost as much as riding (and spent almost as much time doing, anyway), but especially for the arguments it makes about the irrelevance of much of conventional &#8220;wisdom&#8221; about careers, education and happiness in today&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=281&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I love this NY Times article not just because it reminds me of my old motorcycle which I enjoyed fixing almost as much as riding (and spent almost as much time doing, anyway), but especially for the arguments it makes about the irrelevance of much of conventional &#8220;wisdom&#8221; about careers, education and happiness in today&#8217;s world. It feels great to read your own views and thoughts put in a coherent, clear form. <a href="http://www.nytimes.com/2009/05/24/magazine/24labor-t.html?_r=1&amp;pagewanted=all">The Case for Working With Your Hands</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=281&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/06/07/the-case-for-working-with-your-hands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>41411 Rmmbr: Text Your Inbox</title>
		<link>http://niryariv.wordpress.com/2009/05/07/41411-rmbr-text-your-inbox/</link>
		<comments>http://niryariv.wordpress.com/2009/05/07/41411-rmbr-text-your-inbox/#comments</comments>
		<pubDate>Thu, 07 May 2009 20:47:59 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[rmmbr]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=263</guid>
		<description><![CDATA[rmmbr is a service I built for myself and recently opened for general use. I wanted a way to send myself notes about things I need to do, items I want to research etc. If just write this on a scrap of paper I usually seem to forget about it, so using Textmarks&#8216; web-SMS gateway [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=263&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://rmmbr.appspot.com/">rmmbr</a> is a service I built for myself and recently opened for general use. I wanted a way to send myself notes about things I need to do, items I want to research etc. If just write this on a scrap of paper I usually seem to forget about it, so using <a href="http://www.textmarks.com/">Textmarks</a>&#8216; web-SMS gateway (which is pretty nice btw &#8211; reliable and easy to interface with) I wrote a little web app that lets me text these notes to my inbox.</p>
<p>The examples on rmmbr&#8217;s <a href="http://rmmbr.appspot.com/">home page</a> are pretty much how I use it &#8211; I come across some term I want to research or am reminded of something I need to do and send an text message like <tt>rmmbr &lt;whatever&gt;</tt> to 41411. When I get back home an email is waiting in my Gmail inbox with the text sent, a Google search link for it, and if it&#8217;s an address or a date Gmail might also attach its &#8220;map this&#8221; or &#8220;add to calendar&#8221; links as well. </p>
<p>To start using it, you need to let rmmbr connect your phone # with your email address by texting <tt>rmmbr signup &lt;your@email&gt;</tt> to 41411. You&#8217;ll get a confirmation email and can start sending yourself messages. Just remember to always start the message with &#8220;rmmbr&#8221; &#8211; it still gets me sometimes..</p>
<p>I don&#8217;t know how useful it would be for anyone with an iPhone or a Blackberry, but if you&#8217;re like me and prefer to keep your cellphones small, cheap and low maintenance, you might find this a useful solution for your text-to-inbox needs. <a href="http://rmmbr.appspot.com">Enjoy</a> :)</p>
<p>[Update: formerly rmbr, the app/sms code is now rmmbr, to prevent confusion with <a href="http://rmbr.com/">rmbr.com</a> - which is a different product, not related to rmmbr in any way]</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=263&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/05/07/41411-rmbr-text-your-inbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>Kunstler: The Tragedy of Suburbia</title>
		<link>http://niryariv.wordpress.com/2009/05/05/kunstler-the-tragedy-of-suburbia/</link>
		<comments>http://niryariv.wordpress.com/2009/05/05/kunstler-the-tragedy-of-suburbia/#comments</comments>
		<pubDate>Tue, 05 May 2009 22:16:16 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[other]]></category>
		<category><![CDATA[systems]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=250</guid>
		<description><![CDATA[

WordPress just added special TED support &#8211; I&#8217;m not a fan of TED&#8217;s exclusive/trendy approach, but it&#8217;s a good opportunity to post this excellent talk by James Howard Kunstler. 
The lesson of design which considers its users, environment and resources vs. design that is isolated, contrived and wasteful holds true to software as well, from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=250&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div align="center">
<object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"></param><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent"></param><param name="bgColor" value="#ffffff"></param> <param name="flashvars" value="vu=http://video.ted.com/talks/embed/JamesHowardKunstler_2004-embed_high.flv&su=http://images.ted.com/images/ted/tedindex/embed-posters/JamesHowardKunstler-2004.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=121" /><embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" flashvars="vu=http://video.ted.com/talks/embed/JamesHowardKunstler_2004-embed_high.flv&su=http://images.ted.com/images/ted/tedindex/embed-posters/JamesHowardKunstler-2004.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=121"></embed></object>
</div>
<p>WordPress just added special TED <a href="http://support.wordpress.com/videos/ted-talks/">support</a> &#8211; I&#8217;m not a fan of TED&#8217;s exclusive/trendy approach, but it&#8217;s a good opportunity to post this excellent talk by <a href="http://www.kunstler.com/">James Howard Kunstler</a>. </p>
<p>The lesson of design which considers its users, environment and resources vs. design that is isolated, contrived and wasteful holds true to software as well, from the UI to the server.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/250/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=250&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/05/05/kunstler-the-tragedy-of-suburbia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
		<item>
		<title>JSONP, Quickly</title>
		<link>http://niryariv.wordpress.com/2009/05/05/jsonp-quickly/</link>
		<comments>http://niryariv.wordpress.com/2009/05/05/jsonp-quickly/#comments</comments>
		<pubDate>Tue, 05 May 2009 20:25:25 +0000</pubDate>
		<dc:creator>Nir</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://niryariv.wordpress.com/?p=215</guid>
		<description><![CDATA[I discovered JSONP just recently, following Chris&#8216; comment. Though I initially didn&#8217;t intend to support JSON, JSONP made enough difference that I rewrote most of the TheRealURL code (all 20 lines of it) to support it. Since it took me some time to figure out JSONP initially, perhaps a quick guide might help those who [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=215&subd=niryariv&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I discovered JSONP just recently, following <a href="http://umbrae.net/">Chris</a>&#8216; <a href="http://niryariv.wordpress.com/2009/04/20/the-real-url/#comments">comment</a>. Though I initially didn&#8217;t intend to support JSON, JSONP made enough difference that I rewrote most of the <a href="http://therealurl.appspot.com/">TheRealURL</a> code (all 20 lines of it) to support it. Since it took me some time to figure out JSONP initially, perhaps a quick guide might help those who follow.</p>
<p><strong>JSONP allows you to make an HTTP request outside your own domain</strong>, which enables consuming Web Services from JavaScript code. It relies on a JS quirk: while XMLHttpRequest is blocked from making external requests, there&#8217;s no such limit on <code>&lt;script&gt;</code> elements. What JSONP does is add a <code>&lt;script src=&gt;</code> element to the DOM, with the external URL as the SRC target.</p>
<p><strong>To serve JSONP simply return the JSON data inside a function</strong>. e.g., this JSON: </p>
<pre class="brush: jscript;">{ &quot;hello&quot; : &quot;Hi, I'm JSON. Who are you?&quot;}</pre>
<p>Becomes: </p>
<pre class="brush: jscript;">some_function({ &quot;hello&quot; : &quot;Hi, I'm JSON. Who are you?&quot;})</pre>
<p>(The reason is that the latter is actually code that will run inside the  created by the JSONP client, so it needs to be executable code rather than plain JSON data)</p>
<p><strong>some_function is provided by the calling client, usually in the &#8216;callback&#8217; parameter</strong>. So, a query like this:</p>
<p><code>get_jsonp?callback=getthedata</code> </p>
<p>Should return:</p>
<p><code>getthedata({ "hello" : "Hi, I'm JSON. Who are you?"})</code></p>
<p><strong>On the server side, this means adding some code similar to this:</strong></p>
<pre class="brush: php;">
// assume $json holds the JSON response
if ($GET['callback'] != '') $json = $GET['callback'].&quot;( $json )&quot;;
return $json;   // my PHP is rusty but you know what I mean
</pre>
<p>On the client side, modern JS frameworks include JSONP support (or you can <a href="http://www.west-wind.com/Weblog/posts/107136.aspx">DIY</a>). For example, <strong>in jQuery &lt;= 1.2 adding <code>&amp;callback=?</code> to the query string in <a href="http://docs.jquery.com/Ajax/jQuery.getJSON">getJSON</a> method&#8217;s URL sends a JSONP request.</strong>(jQuery transparently replaces the &#8216;?&#8217; with a unique string). Here&#8217;s how you get the unshortened URL for &#8216;bit.ly/a&#8217; using <a href="http://therealurl.appspot.com">therealurl</a>:</p>
<pre class="brush: jscript;">
$.getJSON(&quot;http://therealurl.appspot.com?format=json&amp;amp;url=bit.ly/q&amp;amp;callback=?&quot;,
	function(data){ alert(data.url) }
);
</pre>
<p>That&#8217;s about it. JSONP probably won&#8217;t feature in the next Beautiful Code edition and obviously you need to <strong>watch the URLs you&#8217;re accessing</strong> so you don&#8217;t get malicious JS code executed, but, until cross site XHR is <a href="http://dev.w3.org/2006/waf/access-control/">resolved</a>, JSONP can get the job done.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/niryariv.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/niryariv.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/niryariv.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/niryariv.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/niryariv.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/niryariv.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/niryariv.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/niryariv.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/niryariv.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/niryariv.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=niryariv.wordpress.com&blog=43536&post=215&subd=niryariv&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://niryariv.wordpress.com/2009/05/05/jsonp-quickly/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083db13fe107ddd043d6d7de3cf6c752?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">niryariv</media:title>
		</media:content>
	</item>
	</channel>
</rss>