<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>daydreaming</title>
	
	<link>http://n79.org</link>
	<description>nikibobb just writing some notes</description>
	<pubDate>Tue, 11 Nov 2008 21:04:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/JustDaydreaming" type="application/rss+xml" /><item>
		<title>Arc Mouse</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/449938622/</link>
		<comments>http://n79.org/2008/11/11/arc-mouse/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 20:35:08 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://n79.org/?p=77</guid>
		<description><![CDATA[



Microsoft&#8217;s Arc Mouse is gorgeous. The idea is quite cool as well - a folding portable mouse. Usability of course is the real question.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://n79.org/wp-content/uploads/2008/11/arc-red-profile-a-fy08.jpg"><img src="http://n79.org/wp-content/uploads/2008/11/arc-red-profile-a-fy08.jpg" alt="" title="arc-red-profile-a-fy08.jpg" width="500" height="212" class="aligncenter size-full wp-image-80" /></a></p>
<p><a href="http://n79.org/wp-content/uploads/2008/11/arc_blk_afront_fy09.jpg"><img src="http://n79.org/wp-content/uploads/2008/11/arc_blk_afront_fy09.jpg" alt="" title="arc_blk_afront_fy09" width="500" height="370" class="alignnone size-full wp-image-92" /></a></p>
<p><a href="http://n79.org/wp-content/uploads/2008/11/arc_blk_aback_fy09.jpg"><img src="http://n79.org/wp-content/uploads/2008/11/arc_blk_aback_fy09.jpg" alt="" title="arc_blk_aback_fy09" width="500" height="376" class="alignnone size-full wp-image-91" /></a></p>
<p><a href="http://n79.org/wp-content/uploads/2008/11/mk_arcblk_otherviews09.jpg"><img src="http://n79.org/wp-content/uploads/2008/11/mk_arcblk_otherviews09.jpg" alt="" title="mk_arcblk_otherviews09" width="358" height="228" class="alignnone size-full wp-image-95" /></a></p>
<p>Microsoft&#8217;s <a href="http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=112">Arc Mouse</a> is gorgeous. The idea is quite cool as well - a folding portable mouse. Usability of course is the real question.</p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/449938622" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/11/11/arc-mouse/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/11/11/arc-mouse/</feedburner:origLink></item>
		<item>
		<title>Simplified authentication for web developers</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/448966278/</link>
		<comments>http://n79.org/2008/11/10/simplified-authentication-for-developers/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 00:27:10 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://n79.org/2008/11/10/simplified-authentication-for-developers/</guid>
		<description><![CDATA[I hate having to build authentication structure, it creates extra code for me to write and it causes extra fuss for users in terms of the forms they have to fill out. Centralized authentication systems have long promised to get rid of this hassle. One notable examples which was never widely adopted was Microsoft&#8217;s passport. [...]]]></description>
			<content:encoded><![CDATA[<p>I hate having to build authentication structure, it creates extra code for me to write and it causes extra fuss for users in terms of the forms they have to fill out. Centralized authentication systems have long promised to get rid of this hassle. One notable examples which was never widely adopted was Microsoft&#8217;s <a href="http://en.wikipedia.org/wiki/Windows_Live_ID">passport</a>. Such centralized systems allowed a system to authenticate it&#8217;s users against a central data store. To many consumers of authentication technologies having a centralized point of failure, both in terms of reliability and security was unacceptable. Especially when that centralized point of failure was Microsoft, hence Passport&#8217;s narrow adoption. Microsoft has now built a new system called <a href="https://login.live.com/ppsecure/secure.srf?lc=1033&amp;id=10&amp;ru=https://accountservices.passport.net/default.srf%3Fvv%3D600%26lc%3D1033&amp;tw=1200&amp;fs=1&amp;kv=7&amp;ct=1226361912&amp;ems=1&amp;seclog=10&amp;ver=6.0.11508.0&amp;tpf=c2992aa1b6c489fa41f827c6138f96ac">Windows Live ID</a> addressing some of Passport&#8217;s isssues.</p>
<p>In contrast to these centralized systems, OpenID allows a system to authenticate it&#8217;s users against any other system. I will leave an explanation of the key exchange to other sites <a href="http://blog.facilelogin.com/2008/05/understanding-openid-association.html">here</a> and <a href="http://www.theserverside.com/tt/articles/article.tss?l=OpenID">here</a> who do it much better than me. The one complexity left with the OpenID specification is that you need to remember or record an arbitrary url, which you must enter on the site you want to authenticate with. For users, this is as bad as them having to remember a password, except that the URL need not be kept secret.</p>
<p>The solution to this complexity comes from <a href="http://clickpass.com">Clickpass</a>. They have created a one-button graphical widget which lets users authenticate against Facebook, Google and Yahoo or any OpenID provider. The developer just has to implement a simple interface and is good to go. More importantly, the user&#8217;s experience improves dramatically since they now only have to login once with their authentication provider instead of over and over again at each site they go while repetively typing in a complex URL. So what&#8217;s not to like? Clickpass makes life easier for the developer and the user has a better experience.</p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/448966278" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/11/10/simplified-authentication-for-developers/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/11/10/simplified-authentication-for-developers/</feedburner:origLink></item>
		<item>
		<title>Seeing Obama’s Buzz</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/444350997/</link>
		<comments>http://n79.org/2008/11/06/seeing-obamas-buzz/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 13:14:21 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[viz]]></category>

		<guid isPermaLink="false">http://n79.org/?p=57</guid>
		<description><![CDATA[Here are some visualizations of Obama Twitter activity spreading across the country during and after the election. The visuals track mentions of him and can loosely be thought of as tracking &#8220;buzz&#8221;. Twitter background activity is gold and Obama is blue. Done with ruby-processing. 

]]></description>
			<content:encoded><![CDATA[<p>Here are some visualizations of Obama <a href="http://twitter.com">Twitter</a> activity spreading across the country during and after the election. The visuals track mentions of him and can loosely be thought of as tracking &#8220;buzz&#8221;. Twitter background activity is gold and Obama is blue. Done with <a href="http://github.com/jashkenas/ruby-processing/wikis">ruby-processing</a>. </p>
<p><object width="600" height="450"><param name="flashvars" value="&#038;offsite=true&#038;intl_lang=en-us&#038;page_show_url=%2Fphotos%2Fepiphanizer%2Fsets%2F72157608705277527%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fepiphanizer%2Fsets%2F72157608705277527%2F&#038;set_id=72157608705277527&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=61927"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=61927" allowFullScreen="true" flashvars="&#038;offsite=true&#038;intl_lang=en-us&#038;page_show_url=%2Fphotos%2Fepiphanizer%2Fsets%2F72157608705277527%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fepiphanizer%2Fsets%2F72157608705277527%2F&#038;set_id=72157608705277527&#038;jump_to=" width="600" height="450"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/444350997" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/11/06/seeing-obamas-buzz/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/11/06/seeing-obamas-buzz/</feedburner:origLink></item>
		<item>
		<title>Twittersphere maps…</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/441904202/</link>
		<comments>http://n79.org/2008/11/04/twittersphere-maps/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 09:12:26 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[viz]]></category>

		<guid isPermaLink="false">http://n79.org/?p=43</guid>
		<description><![CDATA[Lately I&#8217;ve been visualizing data from the Twitter public timeline using ruby-processing. Here are some maps of the twittersphere, each one is made from several thousand randomly sampled tweets from a particular day&#8230;.I hope you find them both beautiful and enlightening.






]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been visualizing data from the <a href="http://twitter.com">Twitter</a> public timeline using <a href="http://github.com/jashkenas/ruby-processing/wikis">ruby-processing</a>. Here are some maps of the twittersphere, each one is made from several thousand randomly sampled tweets from a particular day&#8230;.I hope you find them both beautiful and enlightening.</p>
<div style="margin-left:100px">
<a href='http://n79.org/wp-content/uploads/2008/11/world.jpg'><img src="http://n79.org/wp-content/uploads/2008/11/world.jpg" alt="" title="world" width="500" height="200" class="aligncenter size-full wp-image-44" /></a></p>
<p><a href='http://n79.org/wp-content/uploads/2008/11/uk-europe.jpg'><img src="http://n79.org/wp-content/uploads/2008/11/uk-europe.jpg" alt="" title="uk-europe" width="500" height="336" class="aligncenter size-full wp-image-45" /></a></p>
<p><a href='http://n79.org/wp-content/uploads/2008/11/usa.jpg'><img src="http://n79.org/wp-content/uploads/2008/11/usa.jpg" alt="" title="usa" width="500" height="337" class="aligncenter size-full wp-image-46" /></a></p>
<p><a href='http://n79.org/wp-content/uploads/2008/11/japan.jpg'><img src="http://n79.org/wp-content/uploads/2008/11/japan.jpg" alt="" title="japan" width="500" height="337" class="aligncenter size-full wp-image-46" /></a>
</div>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/441904202" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/11/04/twittersphere-maps/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/11/04/twittersphere-maps/</feedburner:origLink></item>
		<item>
		<title>Yahoo Live Visualizations</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/287086325/</link>
		<comments>http://n79.org/2008/05/09/yahoo-live-visualizations/#comments</comments>
		<pubDate>Fri, 09 May 2008 20:27:24 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[design]]></category>

		<category><![CDATA[video]]></category>

		<category><![CDATA[viz]]></category>

		<guid isPermaLink="false">http://n79.org/?p=38</guid>
		<description><![CDATA[I recommend going to Vimeo so you can watch these in HD and see more details.
These are two visualizations I did of a few days activity on Yahoo Live, Yahoo&#8217;s lifecasting/videochat service. On the first one the horizontal axis represents time, and the vertical axis is number of viewers. It is very information dense, so [...]]]></description>
			<content:encoded><![CDATA[<p>I recommend going to <a href="http://vimeo.com/user474141/videos">Vimeo</a> so you can watch these in HD and see more details.</p>
<p>These are two visualizations I did of a few days activity on <a href="http://live.yahoo.com">Yahoo Live</a>, Yahoo&#8217;s lifecasting/videochat service. On the first one the horizontal axis represents time, and the vertical axis is number of viewers. It is very information dense, so blow it up to full screen and watch a few times; you may see some interesting patterns. A shout out to <a href="http://www.myelin.co.nz/">Phil Pearson</a> for his help with some of the finishing touches.</p>
<p><object type="application/x-shockwave-flash" width="640" height="360" data="http://www.vimeo.com/moogaloop.swf?clip_id=991643&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=991643&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF" /></object><br /><a href="http://www.vimeo.com/991643?pg=embed&#038;sec=991643">Visualization of Yahoo Live! (no. 1)</a> from <a href="http://www.vimeo.com/user474141?pg=embed&#038;sec=991643">Nikhil B</a> on <a href="http://vimeo.com?pg=embed&#038;sec=991643">Vimeo</a>.</p>
<p>This one is a collage showing all the simultaneous channels at once. If you watch carefully you can notice that there are fewer broadcasts at night and more in the morning. You might also catch a glimpse of morning light and evening darkness.</p>
<p><object type="application/x-shockwave-flash" width="640" height="360" data="http://www.vimeo.com/moogaloop.swf?clip_id=991639&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=991639&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF" /></object><br /><a href="http://www.vimeo.com/991639?pg=embed&#038;sec=991639">Visualization of Yahoo Live! (no. 2)</a> from <a href="http://www.vimeo.com/user474141?pg=embed&#038;sec=991639">Nikhil B</a> on <a href="http://vimeo.com?pg=embed&#038;sec=991639">Vimeo</a></p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/287086325" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/05/09/yahoo-live-visualizations/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/05/09/yahoo-live-visualizations/</feedburner:origLink></item>
		<item>
		<title>Free Stock Mouse Pointers</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/281023925/</link>
		<comments>http://n79.org/2008/04/30/free-stock-mouse-pointers/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 19:34:33 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[design]]></category>

		<category><![CDATA[viz]]></category>

		<guid isPermaLink="false">http://n79.org/2008/04/30/free-stock-mouse-pointers/</guid>
		<description><![CDATA[I needed some high resolution mouse cursors for a mockup I was doing, and was unable to find any stock/clipart on the web&#8230;so I made some and scaled them to a few sizes. Enjoy.


Mouse Pointers by Nikhil Bobb is licensed under a Creative Commons Attribution 3.0 United States License.
]]></description>
			<content:encoded><![CDATA[<p>I needed some high resolution mouse cursors for a mockup I was doing, and was unable to find any stock/clipart on the web&#8230;so I made some and scaled them to a few sizes. Enjoy.</p>
<p><img src='http://n79.org/wp-content/uploads/2008/03/cursor-white.png' alt='White Mouse Cursors' /></p>
<p><img src='http://n79.org/wp-content/uploads/2008/03/cursor-black.png' alt='Black Mouse Pointers' /></p>
<p><a rel="license" href="http://creativecommons.org/licenses/by/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/us/88x31.png"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/StillImage" property="dc:title" rel="dc:type">Mouse Pointers</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://n79.org/2008/04/30/free-stock-mouse-pointers/" property="cc:attributionName" rel="cc:attributionURL">Nikhil Bobb</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 United States License</a>.</p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/281023925" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/04/30/free-stock-mouse-pointers/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/04/30/free-stock-mouse-pointers/</feedburner:origLink></item>
		<item>
		<title>AT&amp;T DSL Customer Service</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/259904525/</link>
		<comments>http://n79.org/2008/03/23/att-dsl-customer-service/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 01:47:01 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[quick bite]]></category>

		<guid isPermaLink="false">http://n79.org/2008/03/23/att-dsl-customer-service/</guid>
		<description><![CDATA[This number was a bit hard to find:
&#8220;You can call AT&#038;T DSL Customer Care at 1-877-937-5288 (1-877-XDSLATT), and select the billing prompt.&#8221; from the AT&#038;T DSL faq.
update March 28th, 2008
I also just found out that &#8220;CA customers can call 858 522 8838 (not tollfree)&#8221; at fatwallet. This number was really quick, and went direct to [...]]]></description>
			<content:encoded><![CDATA[<p>This number was a bit hard to find:<br />
&#8220;You can call AT&#038;T DSL Customer Care at 1-877-937-5288 (1-877-XDSLATT), and select the billing prompt.&#8221; from <a href="http://dsl.bus.att.com/faqs/dbf.html">the AT&#038;T DSL faq</a>.</p>
<p><em>update March 28th, 2008</em><br />
I also just found out that &#8220;CA customers can call 858 522 8838 (not tollfree)&#8221; at <a href="http://www.fatwallet.com/forums/hot-deals/776795/">fatwallet</a>. This number was really quick, and went direct to the customer service rep without any menus.</p>
<p><em>update April 2nd, 2008</em><br />
If you want dry loop service (DSL without a phone line) you can call the AT&#038;T dry loop department directly at 1-800-942-6037.</p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/259904525" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/03/23/att-dsl-customer-service/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/03/23/att-dsl-customer-service/</feedburner:origLink></item>
		<item>
		<title>Fire Eagle Sample App - whereis</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/259904526/</link>
		<comments>http://n79.org/2008/03/07/fireeagle-sample-app-whereis/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 17:36:04 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[camping]]></category>

		<category><![CDATA[dev]]></category>

		<category><![CDATA[fireeagle]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://n79.org/2008/03/07/fireeagle-sample-app-whereis/</guid>
		<description><![CDATA[Fire Eagle (not fireeagle) is a new location platform from some of my colleagues here at Yahoo! Brickhouse. I&#8217;ve put together a simple sample app called whereis which shows off the power of the platform. 
What is whereis?
Each instance of whereis lets you share location within a trusted group of people. Whereis does not update [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fireeagle.com">Fire Eagle</a> (not fireeagle) is a new location platform from some of my colleagues here at <a href="http://yahoo.com">Yahoo!</a> Brickhouse. I&#8217;ve put together a simple sample app called whereis which shows off the power of the platform. </p>
<h3>What is whereis?</h3>
<p>Each instance of whereis lets you share location within a trusted group of people. Whereis <b>does not</b> update location in Fire Eagle, you should do this using other apps (eg. Fire Eagle automatic device updaters, or other sites).  This screenshot basically sums it up -</p>
<p><img src='http://n79.org/wp-content/uploads/2008/03/whereis.gif' alt='whereis screenshot' /></p>
<h3>What can I use it for?</h3>
<ul>
<li>Run it on your intranet to easily share location between your co-workers</li>
<li>Run it on the internet so friends and family can share location</li>
</ul>
<h3>Who is whereis intended for?</h3>
<p>Whereis is intended for developers who have familiarity with Ruby and access to a server.</p>
<h3>Why are you releasing it?</h3>
<p>It is a simple app (~200 lines of code) built on top of the <a href="http://code.whytheluckystiff.net/camping/">camping framework</a>. If you understand Ruby and the <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> pattern, it will give you a good idea of how FE works and can be used. I think the code is pretty self explanatory, drop me a line if you have any suggestions.</p>
<p><span id="more-27"></span></p>
<h3>What else should I do with it?</h3>
<ul>
<li>run an instance for your group</li>
<li>use it to experiment with fireeagle</li>
<li>skin it with CSS to make it look good</li>
<li>build a service around it</li>
<li>add a subscriptions table with acls to have a twitter like mode</li>
<li>anything else</li>
</ul>
<h3>How do I use it?</h3>
<ul>
<li>download the <a href='http://n79.org/wp-content/uploads/2008/03/whereis.tgz' title='whereis.tgz'>files</a></li>
<li>make sure you and everyone you want to use whereis have fireeagle accounts</li>
<li>install camping (via gem)</li>
<li>install dependencies</li>
<li>get a fireeagle consumer token and secret from the FE website and set up the correct callback URL</li>
<li>insert the token and secret in getFEClient - whereis.rb</li>
<li>change the login password in createTheBasics - whereis.rb</li>
<li>&#8220;camping whereis.rb&#8221; on the command line</li>
</ul>
<h3>Caveats</h3>
<ul>
<li>Whereis uses sqlite as it&#8217;s database so it&#8217;s probably not suitable for large scale deployments.</li>
<li>I&#8217;m using a very early version of the fireeagle gem, before you write anything make sure to look at the newest version.</li>
<li>This code might be a bit slow in production if the fireeagle servers are heavily loaded. If you want to take initiative and fix the problem this is how you would do it (via <a href="http://mojodna.net/">Seth Fitzsimmons</a>) - instead of updating the locations on query, update them periodically using a cron job or some other method.
</ul>
<pre name="code" class="ruby">

#!ruby
#whereis - a simple fireeagle demo
#IMPORTANT: make sure to use the version of fireeagle.rb included in the tarball
#Nikhil Bobb (nikhilb at yahoo-inc.com)
#26th Feb 08

require 'camping/session'
require 'FireEagle'
require 'JSON'

Camping.goes :Whereis

module Whereis
  include Camping::Session
  table_style = &quot;border-width:1px; border-style:outset&quot;

  def getFEClient(access_token = &quot;&quot;, access_token_secret = &quot;&quot;)
    client = FireEagle::Client.new \
	  :consumer_key        =&gt; &quot;&quot;,
	  :consumer_secret     =&gt; &quot;&quot;,
	  :access_token        =&gt; access_token,
          :access_token_secret =&gt; access_token_secret
  end

  #gets a user's location from fireEagle and returns a nice
  #string
  def getFELocation(access_token, access_token_secret)
    client = getFEClient(access_token, access_token_secret)
    location_obj = client.user
    #query the JSON object to get the location
    #where best guess = true
    hierarchy = location_obj[&quot;user&quot;][&quot;location_hierarchy&quot;]
    current_loc = hierarchy.select {|l| l[&quot;best_guess&quot;]}.first
    [current_loc[&quot;name&quot;], current_loc[&quot;located_at&quot;]]
  end
end

module Whereis::Models

  class User &lt; Base;
    has_one :request_token
    serialize :access_token
  end

  class RequestToken &lt; Base;
    belongs_to :user
    serialize :bin
  end 

  class Login &lt; Base; end

  class CreateTheBasics &lt; V 1.0
    def self.up
      create_table :whereis_logins do |t|
        t.column :username, :string
        t.column :password, :string
      end
      create_table :whereis_users do |t|
        t.column :name, :string
        t.column :access_token, :text
      end
      create_table :whereis_request_tokens do |t|
        t.column :str, :string
        t.column :bin, :text
        t.column :user_id, :integer
      end
      Login.create :username =&gt; 'admin', :password =&gt; &quot;eagle123&quot;
    end
    def self.down
      drop_table :whereis_users
      drop_table :whereis_request_tokens
      drop_table :whereis_logins
    end
  end
end

module Whereis::Controllers
  class Style &lt; R '/styles.css'
    def get
      @headers[&quot;Content-Type&quot;] = &quot;text/css; charset=utf-8&quot;
      @body = %{
        table {
          border-width:1px;
          border-style: dotted;
        }
        td {
          border-width: 1px 1px 1px 1px;
          border-style: solid;
        }
      }
    end
  end
  class Auth &lt; R '/auth'
    def post
      @logged_in_user = Login.find :first, :conditions =&gt; ['username = ? AND password = ?', input.username, input.password]
      if @logged_in_user
        @login = 'login success !'
        @state.user_id = @logged_in_user.id
        redirect R(Index)
      else
        @login = 'wrong user name or password'
        render :id
      end

    end
    def get
      render :id
    end
  end

  class Index &lt; R '/'
    def get
      if @state.user_id.blank?
        redirect R(Auth)
        return
      end

      @users = []
      User.find(:all).each do |u|
        t = u.access_token
        if t
          location = getFELocation(t.token, t.secret)
          @users &lt;&lt; [u.name, location[0], location[1]]
        end
      end
      render :whereis
    end

    def post
      if @state.user_id.blank?
        redirect R(Auth)
        return
      end

      client = getFEClient
      request_token = client.get_access_token_part1
      rt = RequestToken.create :bin =&gt; request_token, :str =&gt; request_token.token
      u = User.create :name =&gt; input.user, :request_token =&gt; rt
      redirect &quot;#{FireEagle::AUTHORIZATION_URL}?oauth_token=#{request_token.token}&quot;
    end
  end

  class Callback &lt; R '/callback'
    def get

      if @state.user_id.blank?
        redirect R(Auth)
        return
      end

      client = getFEClient
      rt = RequestToken.find_by_str(input.oauth_token)
      at = client.get_access_token_part2(rt.bin)
      user = rt.user
      user.access_token = at
      user.save
      rt.destroy
      redirect &quot;/&quot;
    end
  end
end

module Whereis::Views
  def layout
    html do
      head do
        title { &quot;Where is everyone?&quot; }
        link :rel =&gt; 'stylesheet', :type =&gt; 'text/css',
             :href =&gt; '/styles.css', :media =&gt; 'screen'
      end
    end
    body { self &lt;&lt; yield }
  end

  def id
    p @login
    form :action =&gt; R(Auth), :method =&gt; 'post' do
      label 'Username', :for =&gt; 'username'; br
      input :name =&gt; 'username', :type =&gt; 'text'; br

      label 'Password', :for =&gt; 'password'; br
      input :name =&gt; 'password', :type =&gt; 'text'; br

      input :type =&gt; 'submit', :name =&gt; 'login', :value =&gt; 'Login'
    end

  end

  def whereis
    form :method =&gt; &quot;post&quot; do
      input :type =&gt; &quot;text&quot;, :name =&gt; &quot;user&quot;
      input :type =&gt; &quot;submit&quot;, :value =&gt; &quot;add me&quot;
    end
    table do
      tr do
        td &quot;name&quot;
        td &quot;location&quot;
        td &quot;time&quot;
      end
      tr do
        @users.each do |u|
          u.each{|c| td c}
        end
      end
    end
  end
end

def Whereis.create
  Camping::Models::Session.create_schema
  Whereis::Models.create_schema :assume =&gt; (Whereis::Models::User.table_exists? ? 1.0 : 0.0)
end
</pre>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/259904526" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/03/07/fireeagle-sample-app-whereis/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/03/07/fireeagle-sample-app-whereis/</feedburner:origLink></item>
		<item>
		<title>Overrides in Camping</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/259904527/</link>
		<comments>http://n79.org/2008/03/05/overrides-in-camping/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 08:18:06 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[camping]]></category>

		<category><![CDATA[dev]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://n79.org/2008/03/05/overrides-in-camping/</guid>
		<description><![CDATA[If you want to add a call to all the controllers in your  Camping miroframework app you can use before or after overrides. These are similar to the before_filter in Rails.
Remember to return the superclass or Camping will throw a &#8220;Read error: #&#60;NoMethodError: undefined method `status&#8217; for nil:NilClass&#62;&#8221; because it can&#8217;t call back into [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to add a call to all the controllers in your  <a href="http://code.whytheluckystiff.net/camping/" title="Camping Microframework" target="_blank">Camping miroframework</a> app you can use <a href="http://code.whytheluckystiff.net/camping/wiki/BeforeAndAfterOverrides" title="Before or After Override for camping" target="_blank">before or after overrides</a>. These are similar to the <em>before_filter</em> in Rails.</p>
<p>Remember to return the superclass or Camping will throw a <em>&#8220;Read error: #&lt;NoMethodError: undefined method `status&#8217; for nil:NilClass&gt;</em>&#8221; because it can&#8217;t call back into the returned controller. A <font color="#ff0000">modification</font> of the above linked wiki page example illustrates -</p>
<pre name="code" class="ruby">

Camping.goes :YourApp

module YourSession
  def service(*a)
    @session = YourApp::Session.new
    s = super(*a)
    @session.close
    #return s from above after completing
    s
  end
end

module YourApp
  include YourSession
end
</pre>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/259904527" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/03/05/overrides-in-camping/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/03/05/overrides-in-camping/</feedburner:origLink></item>
		<item>
		<title>How much does nuclear power really cost?</title>
		<link>http://feeds.feedburner.com/~r/JustDaydreaming/~3/259904528/</link>
		<comments>http://n79.org/2008/03/02/how-much-does-nuclear-power-cost/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 04:53:45 +0000</pubDate>
		<dc:creator>nikhilb</dc:creator>
		
		<category><![CDATA[viz]]></category>

		<category><![CDATA[cost]]></category>

		<category><![CDATA[electricity]]></category>

		<category><![CDATA[energy generation]]></category>

		<category><![CDATA[nuclear power]]></category>

		<guid isPermaLink="false">http://n79.org/2008/03/02/how-much-does-nuclear-power-cost/</guid>
		<description><![CDATA[Forbes had an article on the true cost of nuclear power in the US. It turns out clean coal generated power is only slightly more expensive than regular coal. On the other hand Nuclear power is significantly more expensive and only makes economic sense because of subsidies.
I didn&#8217;t see a chart in the the article [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://forbes.com">Forbes</a> had an <a href="http://www.cato.org/pub_display.php?pub_id=8792">article</a> on the true cost of nuclear power in the US. It turns out clean coal generated power is only slightly more expensive than regular coal. On the other hand Nuclear power is significantly more expensive and only makes economic sense because of subsidies.</p>
<p>I didn&#8217;t see a chart in the the article so I made one with their statistics. Enjoy.</p>
<p><img src="http://n79.org/wp-content/uploads/2008/03/cost-of-power.jpg" alt="Comparative cost of different power generating methods" /></p>
<img src="http://feeds.feedburner.com/~r/JustDaydreaming/~4/259904528" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://n79.org/2008/03/02/how-much-does-nuclear-power-cost/feed/</wfw:commentRss>
		<feedburner:origLink>http://n79.org/2008/03/02/how-much-does-nuclear-power-cost/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 1.308 seconds -->
