<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Ideas For Dozens</title>
        <link>http://www.urbanhonking.com/ideasfordozens/</link>
        <description></description>
        <language>en</language>
        <copyright>Copyright 2008</copyright>
        <lastBuildDate>Sat, 14 Jun 2008 10:21:01 -0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>Songbird Media Player Integration for Web Pages, a Compendium</title>
            <description><![CDATA[<h4>What is Songbird?</h4>

<p><img src="http://img.skitch.com/20080608-772jc9kpq3sh7yc2k5cwu7qe4.preview.jpg" style="float:right; width:250px; margin-left: 10px" />Songbird is an iTunes-style music player that contains an integrated web browser. Songbird detects rich media on pages you visit and integrates them into itself in a number of ways: making them navigable through a "web playlist" reflecting the current page, remembering them in a "web media history" that you can browse and search, and, finally, providing a bridge between the music player and the web browser itself that allows web pages to interact with the playing song and the user's music library.</p>
<h4>Why does Songbird matter?</h4>
<p>
	<a href="http://getsongbird.com/">Songbird</a> is to iTunes what Firefox is to Internet Explorer: it provides an open source alternative to an application built as part of a vendor's extremely successful lock-in strategy. And, following in Firefox's footsteps, Songbird aims to introduce a raft of technical innovations into a stagnant space.
	</p>
	<p style="margin: 0pt 10px 10px; float: left; font-size: small;">
	<img src="http://akihitok.typepad.jp/photos/uncategorized/songbird_3.jpg" /><br />
	The bird. Shown here in a rare non-farting moment.
</p>
	<p>
	While iTunes (and especially the iTunes store) revolutionized the music industry on first release, its rate of innovation is restricted by Apple's ability to imagine and implement new features and, even more tightly, by the constricting legal ties the company has woven with the media conglomerates that provide its content. Songbird, on the other hand, is trying to offer an open platform for anyone to build their own innovative applications or competing business models. If they succeed, these lowered boundaries to participation will mean that Songbird's feature count and available content options will zoom past iTunes', inevitably bringing along an ever-growing number of users and, eventually, breaking Apple's monopoly and forcing them to scramble to compete &mdash; just as Firefox has done with Internet Explorer.
</p>

<h4>What can I do with it?</h4>

<p>
	So, in what ways is Songbird open? What can you do with it as a developer? Well, just like Firefox, Songbird is open in a number of ways. First, the <a href="http://wiki.songbirdnest.com/Developer/Articles/Getting_Started/Core_Player_Development">code for the player itself is available for download</a> and licensed under the GPL. This means you can modify it, use it in your own applications, print it on your school binder, whatever you want. Secondly, Songbird has a plug-in architecture against which you can develop. The Songbird team calls applications written on this architecture <a href="http://addons.songbirdnest.com/">Add-ons</a> and they have access to everything from the player's appearance (for <a href="http://addons.songbirdnest.com/search?query=feathers">building skins</a>) to the actual data and UI of the application. Finally, and most importantly for us here, Songbird provides web pages with <a href="http://developer.songbirdnest.com/webpage-api/docs/files/sbIRemotePlayer-idl.html">a javascript API</a> that allows them access to the app's sophisticated playback interface and, with their permission, the user's media library and custom playlists. Since this last is by far the easiest to get started with, I'll spend the rest of this post focusing specifically on it.
</p>

<h4>Setting up a Songbird Javascript Development Environment</h4>

<p>
	One of the hardest parts of starting development in any new environment is getting all the pieces in place to successfully write and run your first line of code. This is especially true in complex runtime environments like javascript hosted in a web page running against APIs in a rapidly developing client. Here are the steps I followed to get there:
</p>
<ul>
<li>
	<a href="http://wiki.songbirdnest.com/Developer/Articles/Builds/Nightly_Builds">Download a nightly build</a>. At the time of this writing, 0.6 was the latest hotness, but things are moving rapidly.
</li>	
	<br style="clear:both;" />
<li><img src="http://img.skitch.com/20080608-cctppuyg4h7m327upwxdp5x647.jpg" style="float:right"/> Get <a href="getfirebug.com/lite.html">Firebug lite</a>. Like most Javascript developers, I've become increasingly dependent on Firebug since its introduction. Being able to test out code in its interactive shell and navigate the resulting objects is priceless. Heck, even just being able to log information to the console rather than having to dismiss an endless parade of alert statements is worth the price of admission alone. Unfortunately, because of Songbird's rapid pace of development, there isn't currently a version of Firebug that is compatible with 0.6 (if you come from the future, visit <a href="http://addons.songbirdnest.com/addon/130">Firebug's page on the Songbird add-on site</a> to see if things have changed). Thankfully, there's another version of Firebug that can reside in the DOM of any given page. It doesn't have all the niceties we'd want (like object navigation) and it's access to the Songbird-specific javascript APIs we'll be spending our time with can be a bit...err...intermittent, but at least it provides a console for logging and some ability to inspect our objects. Once you've downloaded firebug, stick the directory somewhere in your project and create an HTML file with the following in the head tag:
	
<code lang="html">
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; 
        src=&quot;/path/to/firebug/firebug.js&quot;&gt;&lt;/script&gt;
</code>

You should also set the debug attribute in your opening html tag to "true". Now, when you open your page in Songbird, it'll have a mini version of Firebug running at the bottom of its window. You can log to it and interact with objects (though limits and quirks will abound).
</li>
</ul>

</p>

<h4>Songbird's Model of the World</h4>

<p style="margin: 0pt 10px 10px; float: left; font-size: small;"><a href="http://img.skitch.com/20080608-t9anwgub74sfbxeedsgh99hppb.jpg%22%20alt=%22FLUXBLOG:%20Our%20Last%20Summer%20As%20Indies%22"><img src="http://img.skitch.com/20080608-t9anwgub74sfbxeedsgh99hppb.jpg" width="335px"/></a><br />
Songbird's viewer window explained (<a href="http://img.skitch.com/20080608-t9anwgub74sfbxeedsgh99hppb.jpg%22%20alt=%22FLUXBLOG:%20Our%20Last%20Summer%20As%20Indies%22">full-size version</a>).
</p>

<p>The purpose of the Songbird webpage API is to provide the javascript running on a particular page with access to the media-player side of the application. Through it your page can track changes in the currently playing song, manage the "web playlist" (a small iTunes-style song browser that shows up underneath the current web page), and access song listings and metadata for the user's local music library, including reading and creating local playlists &mdash; you can even download songs directly to the user's computer. Pretty much the only thing you can't do is delete files.
	</p>
	<p>Songbird presents three main abstractions for working with this functionality: Libraries, Media Lists, and Media Items. Let's start at the bottom with Media Items and work our way up.
		</p>
		<h5>Media Items == Songs</h5>
		<p>
		A Media Item is a single song or video in your Songbird library (at this point, I'm just speculating about the video part, though the generic name is certainly tantalizing and I know that Songbird does have some form of video support; however, I've only worked with songs, and from here on I'll assume that a Media Item is really a song). Media Items provide access to a raft of metadata such as "trackName", "artistName", "duration", etc. See <a href="http://developer.songbirdnest.com/webpage-api/docs/files/sbIWrappedMediaItem-h.html#MediaItem.getProperty">the full list of Media Item properties</a> for everything that Songbird makes available. You can read these attributes and set them. Interestingly,  metadata properties are namespaced so you can create your own solely for use by your application, or even attempt to get a community of developers to standardize around new attributes for a particular domain.
		</p>
		<p>
		One important thing about Media Items is that they don't necessarily have to correspond to a song with a locally available media file. Just as your iTunes library can contain songs whose actual mp3 files are elsewhere (like on an external backup drive), Media Items can be associated with files that are not currently available or with no file at all. Unlike iTunes, Media Items in Songbird can also be associated URLs that point at online mp3s.
		</p>
		<h5>Media Lists == Playlists</h5>

		<p>The next step up the ladder is Media Lists. These, as you might expect, are collections of Media Items, i.e. playlists. They have a name which is a handle for finding them (and also what shows up in the app's sidebar if you add them to the Main Library). You can find out which Media Items belong to a Media List and you can add and remove them. Media Lists are ordered stacks, so there's some functionality for managing the position, uniqueness, and suchlike of individual Media Items and for iterating through the full set.</p>
		
		<h5>Libraries</h5>
		<p>
		At the top of this whole shebang are Libraries. Libraries represent the permissions and interaction scope associated with a Media List or group of Media Lists, i.e. in which part of the application they'll be visible and which chunks of code will have access to them. There are three types of Libraries in Songbird &mdash; the Main Library, the Web Library, and the Site Library &mdash; and one other entity (the "Web Playlist" mentioned above) that sits in the same spot as a Library and behaves almost exactly like a Library, but isn't technically a Library. Things will get clearer quickly if we talk about the purpose of each type of Library, so let's dive right into that.</p>
		<h5>Libraries: the Main Library</h5>
		<p>First up, we've got the Main Library. The Main Library contains all the Media Items on the user's computer. Remember, since Songbird can provision audio for Media Items from public URLs and can include local Media Items for which the file is not currently available (the Missing Backup Drive scenario), this is not limited to files actually "physically" present. Reasons to talk to the Main Library include: wanting to create a new playlist on the user's computer that will be available after they browse away from your site, wanting to see what songs the user already has in order to make content recommendations, getting a list of all the local playlists a user has created and what songs are in them, etc. By default websites are blocked from accessing the Main Library at all unless the user has changed their "Web Integration" preferences to allow  general access or to allow it for your website in particular. If you attempt to access the Main Library of a user who has limited access to their Main Library, Songbird will prompt them to permit or deny the action; the javascript API includes callbacks to make your code aware of the user's response to this prompt.
		</p>
		<h5>Libraries: the Web Library</h5>
		<p>Next up, we've got the Web Library. The Web Library contains all the Media Items Songbird has extracted from the webpages the user has visited. When you navigate to a URL that contains links to music files, Songbird discovers these links and gives you an iTunes style playlist representation of them at the bottom of your window (the Web Playlist). The Web Library is everything that's ever shown up in this playlist. It's every song from every webpage the user has ever visited within Songbird. This list of songs is made available to the user as the "Web Media History" and is an incredibly useful feature &mdash; if you spend any significant amount of time reading mp3 blogs or browsing band sites your Web Library will rapidly become populated with most of the music you've ever heard about, even in passing. This makes it an extremely rich collection to search against and idly browse. I can only imagine all the cool apps you could build if you had access to the entire mp3 blog browsing history of your users...obviously recommendations (for both music and blogs) come to mind, but you could probably also build some kind of very kick ass client-resident distributed spidering operation, or something else extremely neat that I can't think of off the top of my head. As you'd expect, the Web Library is under exactly the same access restrictions as the Main Library.</p>

				<h5>Libraries: the Web Playlist</h5>

		<p>Now we start to move into the Libraries that belong more to our individual websites than to the users themselves and over which we therefore have more control. The first and most visible of these is the Web Playlist. In the normal course of events (i.e. while browsing sites that aren't cool enough to use the Songbird API), the Web Player simply reflects any mp3s or other media files Songbird happened to find on the page. However, with the API we can control just about every aspect of the Web Playlist from the tracks that populate it to what pieces of data show up in each of its columns. I mentioned above that the Web Playist is not, strictly speaking, a Library. This means that it doesn't offer quite the same API as other Libraries &mdash; it only contains a single Media List; it doesn't have its own access controls separated from those of the Media List assigned to it; etc. &mdash; however, I include it in this list because, in the javascript, it lives at the root of the 'songbird' namespace as a sibling to the other Libraries and it offers an API that is largely (though not entirely) parallel to the others.</p>    
		
				<h5>Libraries: Site Libraries</h5>
                         
		<p>Lastly, we come to Site Libraries. Unlike the other Libraries we've covered so far, Site Libraries don't directly control the display of tracks to the user. Instead, they are simply an application-specific namespace for storing Media Lists. In other words, they let your javascript build Media Lists that are available only to users visiting particular pages on your domain (controlled via a scoping mechanism much like the traditional robots.txt syntax). Once you've got a Media List safely inside your own private Site Library, you can then display it in a Web Playlist, save it to the user's Main Library, or simply keep it invisible and use it to swap out the currently playing song. In fact, if you don't actually use a Site Library to manipulate any part of Songbird's UI (for example if they're just a convenient way to store your app's internal data), you don't even need the user's permission to create them. Site Libraries are a little harder to grok than the other varieties since they lack visible representation, but you'll quickly get used to working with them as they're the main place you'll be storing all the Media Lists you build. If you're still confused as you come away from this paragraph, you can just think of Site Libraries as a private place to store the Media Lists you compose without having to display them to the user in any way.
</p>
		                                                
		                                                                                                                                                                                                                                                                     

<h4>Some code samples</h4>

<p>Let's make this whirlwind conceptual tour more concrete by looking at some examples. I'll show you the code to accomplish some basic tasks and then explain it in terms of the concepts I've outlined above.</p>

<h5>Putting songs in the Web Playlist</h5>

<code lang="javascript">
songbird.setSiteScope("", "/");
var library = songbird.siteLibrary;
var myMediaItem = songbird.siteLibrary.createMediaItem("http://www.example.com/track.mp3");
myMediaList.add(myMediaItem);
songbird.webPlaylist.mediaList = myMediaList;
</code>

<p>I cribbed this example from <a href="http://wiki.songbirdnest.com/Articles/Getting_Started/Web_Integration_with_the_Webpage_API">the Songbird wiki</a>. It simply creates a media item from an mp3 URL, assigns the item to a media list that is scoped to the domain of the current page, and tells songbird to display the media list in the web playlist. The song won't actually appear anywhere visible to the user until the last line of code in this sample. Once the web playlist receives the media item, it'll scan the URL for metadata and fill in the track display based on what it finds.</p>
 
<h5>Set a property on a media item</h5>

<code lang="javascript">
var myMediaItem = songbird.siteLibrary.createMediaItem("http://www.example.com/track.mp3");
myMediaItem.setProperty( "http://songbirdnest.com/data/1.0#artistName",  "The Rolling Stones" );
</code>

<p>If you set a property before adding the media item to a list and displaying it, Songbird will trust your metadata assignment and not override it based on the results it finds on the attached mp3. There are parallel methods for getting the values of any already set properties. You can set properties on media lists in the same way.</p>

<h5>Download a media items' file to the user's computer</h5>

<code lang="javascript">
var library = songbird.siteLibrary("", "");
var mediaItem = library.createMediaItem("http://path/to/item.mp3");
songbird.downloadItem(mediaItem);
</code>

<p>In addition to providing access to the various libraries, the songbird object allows you to do a whole raft of useful things such as download an mp3 from the web into a local media item (as shown here), getting access to information about the currently playing track, controlling which track is playing, etc.</p>

<h5>Get all the local playlists</h5>

<code lang="javascript">
var mediaLists = songbird.mainLibrary.getPlaylists();
	var results = [];
	while(mediaLists.hasMoreElements()) {
		var mediaList = mediaLists.getNext();
		results.push(mediaList);
	}
	return results;
};
</code>

<p>This code asks the main library for a list of its playlists. When that first line of code runs, requesting access to the main library for the first time, Songbird will prompt the user for permission. In order to iterate through the results of getPlaylists, we have to call the special enumeration helper, hasMorePlaylists. This is a common pattern with collections of Songbird objects, there's often custom enumeration code that be somewhat counter-intuitive compared to standard array iteration.</p>

<h4>Additional Resources</h4>

<p>These examples only scratch the surface of what you can do with songbird. For more examples and more documentation, visit <a href="http://developer.songbirdnest.com/webpage-api/docs/files/sbIRemotePlayer-idl.html">the Songbird webpage-api docs</a> and <a href="http://wiki.songbirdnest.com/Articles/Getting_Started/Web_Integration_with_the_Webpage_API">the Songbird wiki entry on Webpage API integration</a>.</p>

<p>The Songbird team hangs out at #songbird on irc.mozilla.org. They are quite friendly and open to helping out if you're confused or run into issues. I'd also like to thank them specifically for answering my large raft of questions as I was learning this API. This guide wouldn't have been possible without them.</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/songbird" rel="tag">songbird</a>, <a href="http://www.technorati.com/tags/music" rel="tag">music</a>, <a href="http://www.technorati.com/tags/player" rel="tag">player</a>, <a href="http://www.technorati.com/tags/javascript" rel="tag">javascript</a>, <a href="http://www.technorati.com/tags/api" rel="tag">api</a>, <a href="http://www.technorati.com/tags/open" rel="tag">open</a>, <a href="http://www.technorati.com/tags/source" rel="tag">source</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/06/songbird-media-player-integrat.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/06/songbird-media-player-integrat.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
            <pubDate>Sat, 14 Jun 2008 10:21:01 -0800</pubDate>
        </item>
        
        <item>
            <title>Getting Started with Merb vol.2: Intro to Routing and Controllers</title>
            <description><![CDATA[<div style="float:left; margin:0; margin-bottom: 10px; margin-right:10px; text-align:center; display:block">
	<img src="http://www.merbivore.com/img/header_logo.png" style="padding-bottom:0;"/>
		<p style="font-size:10px; font-style:italic; margin: 0; padding:0">An intro to routing and controllers.</p>
	<a href="http://flickr.com/photos/aranandjennie/304469543/"><img src="http://farm1.static.flickr.com/104/304469543_7c45d57a79_m_d.jpg" style="margin:0; padding:0" /></a>
</div>
<p>
	I wrote recently about <a href="http://www.urbanhonking.com/ideasfordozens/2008/04/guide-to-getting-started-with.html">getting started with Merb</a>. Yesterday, after having refer to my own post to remember how it all worked, I started on a new Merb app as part of the Great <a href="http://grabb.it">Grabb.it</a> Rewrite of 2008. I very quickly ran into another area of Merb that's a bit thin on documentation: Controllers. After some googling, some fiddling, and some brainstorming in the #merb irc channel I managed to figure out enough of the basics to get things up and running.
</p>	
<p>
	Right now, Merb's sweet spot seems to be as an API server, which is exactly how we're planning on using it. This usage means that while there might be a little bit of model integration for access control, most of the job is in routing URLs and data formatting. That means we'll be spending most of our effort in config/router.rb and in our controllers. Specifically, we'll need to know a lot about how Merb provides responses in various formats depending on the request url, i.e. it's equivalent to Rails' respond_to method. Let's start by laying out our requirements and then I'll show you how I translated them into Merbish.
</p>

<p>
	For this app, I needed to take URLs within a namespace and route them to a single controller setting various params based on the rest of the request path. In other words, I wanted to provide URLs like:
	
<code>
http://myapp.com/music/artist.jspf
</code>
and
<code>
http://myapp.com/music/artist/title.mp3
</code>

where the first url would give you a playlist of all of an artist's tracks in <a href="http://wiki.xiph.org/index.php/JSPF_Draft">JSPF</a> (Javascript Shareable Playlist Format) and the second would provide an mp3 of the song with the given title by the given artist.
</p>
<p>So, the first thing I needed was a series of routes that would recognize all URLS starting with /music and then grab the path after the first slash into an :artist param and the path after the second slash into a :title param. Finally, it would need to look for a format after the dot and pass that through as well if available.</p>
<p>
	It turns out the best way to do this in Merb is with nested routes, thusly (inside of the Merb::Router.prepare block in config/router.rb):

<code lang="ruby">
r.match(&#x27;/music&#x27;) do |music|
  music.match(&quot;/:artist.:format&quot;).to(:controller =&gt; &#x27;music&#x27;, :action =&gt; &#x27;artist&#x27;)
  music.match(&quot;/:artist/:title.:format&quot;).to(:controller =&gt; &#x27;music&#x27;, :action =&gt; &#x27;track&#x27;)
end
</code>
</p>
<p>
	This is pretty self explanatory if you're familiar with Rails routes, though it is probably worth noting that an early version of this I tried which eschewed the nesting in favor of including the /music part of the path in each route separately seemed to have problems detecting the format correctly (though it is more than likely the cause was driver error on my part rather than anything that Merb might do differently in that situation). There's pretty thorough <a href="http://merbunity.com/tutorials/9">documentation on Merb routing</a> if you need more specific help and that's definitely not the case for the Controller APIs, so let's tackle those right away.
	</p>

<p>
	Now, how do we consume those URLs in our application? We need a controller, thusly:

<code lang="ruby">
class Music &lt; Application
  provides :jspf
  
  def track
    display Track.new params[:artist], params[:title]
  end
  
  def artist
    display Artist.new params[:artist]
  end
end
</code>

There's two main things going on here that distinguish Merb's controllers from Rails': the 'provides' class method and the 'display' method we're calling in each action. These two methods work together to let us return our data in the right format on every request. And, while they might look confusingly different from the familiar Rails respond_to block at first, they turn out to make things much cleaner, eliminating the need to redeclare common formats over and over in each controller method.
</p>

<p>
	So, here's how it works: provides sets up a list of formats that we're willing to consume and then display makes sure that we provide the right one for each request. When a request comes in ending in .jspf, display calls to_jspf on the object that gets passed to it (in this case new tracks and artists). If we wanted to provide javascript, xml, html, etc. we'd just add those symbols to provides' arguments and then make sure the objects we passed to display could respond to to_xml, to_html, to_etc with the right data (there's an additional option for html of using a template in the views directory that Merb can automatically detect; that case works just like Rails; also: html seems always to be installed as a format regardless of whether or not you pass :html to provides).
</p>

<p>
	While this should be enough to get you up and running writing Merb controllers, there are a few other details worth noting. First of all, if you want to provide alternative formats besides, js, html, xml, and the usual suspects (like we do here with jspf), you'll need to register a mime-type. We configured that by adding a single line to config/init.rb:
<code lang="ruby">
 Merb.add_mime_type(:jspf, :to_jspf, %w[application/application/jspf+json]) 
</code>
There's lots of other additional information about the request available to your controller actions as well, such as content_type. Secondly there's other options besides display for returning content from your action. Calling "render" will attempt to automatically detect a template with the right format in the appropriate views directory. And you can always just render a raw string. Again, more details are available <a href="http://merbunity.com/tutorials/9">here</a>. 
</p>
<p>There's the beginnings of a great open source book being written by some folks on GitHub: <a href="http://github.com/deimos1986/book_mdar/tree/master">Life On The Edge With Merb, DataMapper &amp; RSpec</a>.They've done a pretty solid job covering the basics of app initialization, modeling with the DataMapper ORM, and testing with RSpec so far, but their section on Controllers is blank so far. If someone wants to pick up the thin thread I've laid down here and run with it, that would be a great place for more documentation to accumulate.</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/merb" rel="tag">merb</a>, <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/router" rel="tag">router</a>, <a href="http://www.technorati.com/tags/controller" rel="tag">controller</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/06/getting-started-with-merb-2-in.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/06/getting-started-with-merb-2-in.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">grabbit</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
            <pubDate>Tue, 03 Jun 2008 17:35:29 -0800</pubDate>
        </item>
        
        <item>
            <title>RailsConf 2008 Lightning Talk Summaries</title>
            <description><![CDATA[ <p style="float:left; margin: 10px; margin-top:0; font-size: small">
	<img src="http://farm4.static.flickr.com/3111/2536409273_ff7db4709e_m_d.jpg" title="RailsConf 2008 
Audience by James Duncan Davidson"/><br /><em>photo by James Duncan Davidson</em></p>
<p>
A few months back <a href="http://chadfowler.com/">Chad Fowler</a> asked me to coordinate the lightning talks for this year's <a href="http://en.oreilly.com/rails2008/public/content/home">RailsConf</a>. It turned out to be a rolicking good time! We had 36 speakers in three sessions over three days &mdash; more than half the number of official talks! Topics ranged from announcements of new plugins (man, there are a lot of these suckers out there!) to demos of cool sites (<a href="http://sharedcopy.com">Shared Copy</a> certainly blew some minds) to rants and harangues (Ryan Davis never disappoints in this regard).
</p>

<p>Below, I've attempted to summarize each of the talks and provide appropriate links where I could find them. The results are based on my sketchy notes while keeping time (and preparing my own talk) and so are definitely less than definitive. If you spoke and I got some of your details wrong, drop me a comment and I'll make corrections. If any speakers want to send me links to their slides, I can add those as well.</p>

<p>Thanks to everyone who participated &mdash; audience and speakers alike &mdash; and thanks to the RailsConf orgnaizers for letting me put this together.</p>

<h4>Friday</h4>
<ul>
<li>Jon Garrin - Gatekepeer Plugin</li> 
<li>Max Baumann - <a href="http://varnish.projects.linpro.no/">Varnish</a> as a Page Caching Alternative</li>
<li><a href="http://www.weebadde.com/">Prabode Weebadde</a> - Paging: Pro-Paging</li> 
<li><a href="http://caspiandesign.com/www/">Four Hewes</a> - "Designers: Will you respect me in the morning?"</li>
<li>Scott Chacon - <a href="http://github.com/schacon/git-lighthouse/tree">Git + Lighthouse</a></li>
<li>Chew Choon Keat - <a href="http://sharedcopy.com/">Shared Copy</a></li>
<li><a href="http://railspikes.com/">Luke Francl</a> - <a href="http://fanchatter.com/">Fan Chatter Stadium</a></li>
<li><a href="http://blog.pluron.com/">Gleb Arshinov</a> - Keyboard Shortcuts for the web</li>
<li><a href="http://www.zenspider.com/">Ryan Davis</a> - Write less code</li> 
</ul>
<h4>Saturday</h4>
<ul>
<li>Max Warnock - RDF framework</li>
<li><a href="http://blog.pastie.org/">Josh Goebel</a> - <a href="http://pastie.caboo.se/">Pastie</a></li>
<li>Greg Borenstein - <a href="http://rad.rubyforge.org">RAD: Ruby Arduino Development</a></li> 
<li><a href="http://simplygenius.com/">Matt Conway</a> - <a href="http://github.com/wr0ngway/rubber/wikis">Rubber</a> for managing EC2 with Capistrano</li> 
<li><a href="http://blog.internautdesign.com">David Lowenfels</a> - <a href="http://scrumninja.com">Scrum Ninja</a></li>
<li>Jeremy Seitz/Mike Hill - geo search w/sphinx (<a href="http://PrimoSpot.com">PrimoSpot.com</a>: find parking spots in NY)</li>
<li><a href="http://withoutscope.com/">Rich Cavanaugh</a> -  acts_as_reasonable</li>
<li>Ryan Jarvinen - <a href="http://earfl.com">Earfl</a>: Voice Flickr</li>
<li>Brian Chamberlin - <a href="http://www.railsbrain.com/">RailsBrain</a> ajax docs</li>
<li><a href="http://mill-industries.com/">Eric Mill</a> - <a href="http://ohnomymoney.com">ohnomymoney.com</a>: Wesabe integration</li>
<li><a href="http://www.theagiledeveloper.com/">Matthew Deiters</a> - Content Management DSL, DSL Engine</li>
</ul>

<h4>Sunday</h4>
<ul>
<li><a href="http://www.chak.org/">Dan Chak</a> - Active Resource Kool-Aid</li>
<li>David James - <a href="http://github.com/djwonk/method_trails/tree/master">Method Trails</a></li>
<li>Michael Slater - <a href="http://buildingwebapps.com">buildingwebapps.com</a></li>
<li>Noel Rappin - <a href="http://github.com/noelrappin/rails-iui/tree/master">iPhone on Rails</a></li>
<li>Robert Thau - <a href="http://dev.smartleaf.com/permissioning/">Permissioning in ActiveRecord</a></li>
<li>Loren Johnson - <a href="http://github.com/seancribbs/restful_workflow/tree/master">Resful Workflow Plugin</a></li>
<li><a href="http://www.onethirtyseven.com/">David Woodward</a> - REST with Rails and ejabberd</li>
<li><a href="http://railspikes.com/">Jon Dahl</a> - How Not to Present at RailsConf</li>
<li>Brian Durand - Performance Plugins</li>
<li>Jacob Dunphy - <a href="http://code.google.com/p/kablame/">KABLAME!!</a> (check a git or svn repo to find out who didn't write tests)</li>
<li>Ben Mabey - <a href=" http://www.benmabey.com/2008/02/04/rspec-plain-text-stories-webrat-chunky-bacon/">RSpec Story TM Bundle</a></li>
<li>Chad Wooley - <a href=" http://geminstaller.rubyforge.org/">Geminstaller</a></li>
<li>Aaron Campos - Automator</li>
<li>Joannou Ng - <a href="http://github.com/joannou/nstableviewftw">NSTableViewFTW</a></li>
<li>Mark Anderson - Jive Pages Plugin</li>
</ul>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/RailsConf" rel="tag">RailsConf</a>, <a href="http://www.technorati.com/tags/2008" rel="tag">2008</a>, <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/rails" rel="tag">rails</a>, <a href="http://www.technorati.com/tags/conference" rel="tag">conference</a>, <a href="http://www.technorati.com/tags/lightning+talks" rel="tag">lightning+talks</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/06/railsconf-2008-lightning-talks.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/06/railsconf-2008-lightning-talks.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">RAD</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">railsconf 2008 ruby rails rad</category>
            
            <pubDate>Sun, 01 Jun 2008 17:32:40 -0800</pubDate>
        </item>
        
        <item>
            <title>Time to Organize Recording Artists: Why an Enforcement-based Strategy is a Mistake for the Music Industry</title>
            <description><![CDATA[<p style="float:left; margin: 10px; margin-top:0; font-size: small">
	<img src="http://www.kcrw.com/etc/programs/ob/ob_335x120.jpg" title="Celia Hirschman from KCRW's On the Beat"/><br /><em>Celia Hirschman from KCRW's On the Beat</em>
</p>
<p>
	In <a href="http://www.kcrw.com/etc/programs/ob/ob080423time_to_organize_rec">the most recent On the Beat</a>, Celia Hirschman advocates for <a href="http://www.musiciansunion.org.uk/">the Musician's Union</a> to take a more active stand for musicians' rights online. In a world where <a href="http://bits.blogs.nytimes.com/2008/04/17/amazon-gains-share-of-shrinking-paid-music-market/?em&ex=1208664000&en=2e42c4bf40b0e867&ei=5087%0A&scp=2-b&sq=Amazon&st=nyt">only 42% of internet users say they pay for music</a>, she argues, the Union has a responsibility to advocate for musicians' "right to be paid for their efforts anytime their music is played". She notes the failure of legislative attempts to extract revenue for musicians from peer-to-peer file sharing, mp3 blogs, and CD burning and lays the blame at the feet of the Union as the primary organization that represents musicians.	
</p>

<p>
	I agree with half of this argument. The Musician's Union <em>has</em> been embarrassingly lax in fighting the real battles that matter for artists in the modern music distribution landscape. What has the Musician's Union done to stop the labels from <a href="http://www.techdirt.com/articles/20060428/036245.shtml">cheating artists out of revenue from iTunes downloads</a>? How about to stop them wasting their shrinking budgets on <a href="http://www.amazon.com/Rock-Office-Ballad-Dan-Kennedy/dp/1565125096/grabbit-20">glamorous perks and inflated short-run corporate profits</a> rather than developing new artists with the possibility of long and successful careers? Or what about to force them to <a href="http://nymag.com/daily/entertainment/2008/03/why_wont_the_music_business_hire.html">hire people who can figure out new business models that fit the new technology</a>?
</p>

<p>None of these battles receive the slightest mention in Hirscman's critique of the Union. She ignores the losses artists have suffered by being forced into vastly inequitable relationships with labels and instead highlights the ways in which the industry has failed to fully extract revenue from new forms of music consumption and fandom.</p>

<p>This wrong-headed focus on enforcement over transformation is symptomatic of the problems plaguing the record industry as a whole. Hirschman's catalogue of Union failings closely resembles a punchlist of <a href="http://www.riaa.com/physicalpiracy.php">RIAA complaints and talking points</a>. Focusing on missed revenue from new forms of fandom while the music industry's entire distribution and profit model sinks into irrelevance is like getting upset over a spilled glass of champagne on the deck of the Titanic.
	</p>

<p>This mistake derives directly from the principle that Hirschman articulates in the piece: that artists "have the right to be paid for their efforts anytime their music is played." This same idea was proposed recently by Peter Kirn at <a href="http://createdigitalmusic.com/2008/03/26/tech-blogger-michael-arrington-thinks-you-musicians-owe-the-web-money/">Create Digital Music</a>:
	<blockquote cite="http://createdigitalmusic.com/2008/03/26/tech-blogger-michael-arrington-thinks-you-musicians-owe-the-web-money/"> 
Recorded music has value to consumers. And, in business, if something has value somewhere, it's a business.
</blockquote>
	</p>
<p>
	This is a core principle of the industry's thinking right now and it is obviously, palpably false. In middle school, when a friend played me <a href="http://grabb.it/artists/b689fe3119f4">Sebadoh</a> off of a walkman that he'd smuggled to school, transforming me in a single moment into a lifelong fan of indie rock, was that "theft"? Should Sebadoh have gotten paid? 
	
	When I worked at <a href="http://www.pixpatisserie.com/">a local patisserie</a> I used to play my favorite CDs throughout my shifts and would often write the band names and album titles down for intrigued customers. Should the shop have had to track and regulate everything we played so they could pay royalties to the artists?
</p>

<p>This last is something of a trick question since enforcement of this kind of public performance royalty is something for which Hirschman specifically lauds rights-enforcers like <a href="http://ascap.org/">ASCAP</a>:
	<blockquote cite="http://www.kcrw.com/etc/programs/ob/ob080423time_to_organize_rec">
		If you walk into a restaurant, nightclub or boutique and hear music playing, chances are very good a performance-rights organization have demanded compensation. These rights societies literally go door-to-door to insure their members get paid for music
	</blockquote>
	</p>
<p>
	Hirschman could not have this issue more wrong. ASCAP contacted the patisserie while I worked there saying they'd observed us playing music controlled by their members and we had to either cut  it out, sign up for a very expensive pay service they were offering, or face a lawsuit. The business owners felt like they'd been shaken down by the mafia. Their response was to stop playing ASCAP music altogether and instead to put together a library of local music which we had explicit permission from the artists to play <em>without royalties</em>. Maintaining this library was a lot of work and we rapidly fell back into the old system of playing whatever we wanted, including ASCAP music, without permission, but now in an environment of greater fear and resentment. I would bet that a similar story holds for most places you actually visit beyond corporate chains: if you walk in and hear good music playing it is either local or in explicit defiance of an ASCAP threat.</p>

<p>And this story is a parable of what's wrong with focusing on enforcement. Enforcement alienates consumers and tastemakers. It tarnishes the reputations of artists and the organizations that should represent them. It forces natural music consumption and sharing patterns underground. Possibly worst, enforcement distracts artists and the industry itself from solving the huge existential issues that they face.</p>

<p>
	There is one piece of information from Hirschman's piece, however, that does hold out hope for the music industry if they do ever overcome these distractions and decide to face the real challenge of transformation: 42% of internet users pay for music. That's an enormous number. How many internet users pay for news? Or search? Or social networks? I don't hear anyone in these businesses complaining that their industry is in decline. That's an enormous number and it reflects the incredible amount of passion that exists for music online. If the industry can't find a way to transform that passion into a functional profitable business, it won't be because because the users outfoxed their enforcements efforts. They'll have only themselves to blame.
</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/music" rel="tag">music</a>, <a href="http://www.technorati.com/tags/industry" rel="tag">industry</a>, <a href="http://www.technorati.com/tags/on+the+beat" rel="tag">on the beat</a>, <a href="http://www.technorati.com/tags/Celia+Hirschman" rel="tag">Celia Hirschman</a>, <a href="http://www.technorati.com/tags/kcrw" rel="tag">kcrw</a>, <a href="http://www.technorati.com/tags/enforcement" rel="tag">enforcement</a>, <a href="http://www.technorati.com/tags/piracy" rel="tag">piracy</a>, <a href="http://www.technorati.com/tags/riaa" rel="tag">riaa</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/04/time-to-organize-recording-art.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/04/time-to-organize-recording-art.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">business</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">grabbit</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">music</category>
            
            
            <pubDate>Tue, 29 Apr 2008 14:41:47 -0800</pubDate>
        </item>
        
        <item>
            <title>RAD 0.2.2 Released: Arduino 0011 Support</title>
            <description><![CDATA[<p>On sunday night, I released version 0.2.2 of the <a href="http://rad.rubyforge.org">Ruby Arduino Development gem<a/>. The main focus of this update is compatibility with <a href="http://www.arduino.cc/en/Main/ReleaseNotes">version 0011 of the Arduino software tools</a> (follow that link for the release notes). While 0010 may still work with this new version of RAD, 0011 is now the default and upgrading is highly encourages. Download it here: <a href="http://www.arduino.cc/en/Main/Software">Arduino 0011</a></p>.
	
<p>
	This release also includes a patch to fix a problem with type-compatibility between RAD's var system and some Arduino function return values courtesy of <a href="http://blog.unnature.net/">David Michael</a>. David also gave what looks like a great talk about RAD at <a href="http://nycruby.org/wiki/">NYC.rb</a>: <a href="http://blog.unnature.net/post/31202116">Ruby Meets Worlds</a>, which includes a really nice example of using the observer pattern to communicate with an Arduino over a serial port that portends really well for one of the exciting things we've been talking about on the RAD Google Group: <a href="http://groups.google.com/group/ruby-arduino-development/browse_thread/thread/3997e7c3e91ccfd6">an interactive serial console</a>.
</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/arduino" rel="tag">arduino</a>, <a href="http://www.technorati.com/tags/rad" rel="tag">rad</a>, <a href="http://www.technorati.com/tags/0011" rel="tag">0011</a>, <a href="http://www.technorati.com/tags/computerkraft" rel="tag">computerkraft</a>, <a href="http://www.technorati.com/tags/console" rel="tag">console</a>, <a href="http://www.technorati.com/tags/serial" rel="tag">serial</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/04/rad-022-released-arduino-0011.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/04/rad-022-released-arduino-0011.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">RAD</category>
            
            
            <pubDate>Tue, 29 Apr 2008 13:15:41 -0800</pubDate>
        </item>
        
        <item>
            <title>On Politics: How Proprietary vs. Open Source is like Obama vs. Clinton and why we need to get over it and get on with the work</title>
            <description><![CDATA[<p><blockquote cite="http://itc.conversationsnetwork.org/shows/detail3522.html">
"The enemy isn't Microsoft. The enemy is non-use" 
</blockquote>
&mdash; <a href="http://asay.blogspot.com/">Matt Asay</a>, <a href="http://itc.conversationsnetwork.org/shows/detail3522.html">The Ten Commandments of Open Source</a>
</p>

<p>
For the past month, watching Hillary Clinton and Barack Obama &mdash; two relatively noble politicians who largely want the same good things for this country &mdash; say and do silly things to each other over the most superficial of disagreements in an atmosphere of ever-increasing animosity, I've been experiencing a disgust that was strangely familiar. All month I struggled to place where I'd felt this particular variety of nausea before, what other phenomenon oozes this same poison. And then I figured it out: it's the old Open Source vs. Evil Corporation flamewar. It's Slashdot all over again.
</p>

<p>
	I won't alienate <a href="http://www.realclearpolitics.com/epolls/2008/president/us/democratic_presidential_nomination-191.html">40.4 percent of you</a> by telling you which side I think is which since the key point is this: when two groups with basically the same objectives spend their best energy beating on each other those objectives are guaranteed to stay largely unaccomplished.
</p>
<p>
And just like every day that Obama and Clinton spend attacking each other leaves less hope for those good goals the two candidates share, every flamewar, every easy attack on Microsoft, every knee jerk reaction against a company that charges for its software leaves less attention available to solve the problems we all share of data interoperability, scaling, user friendliness, etc. 
<p>
	It's a fine thing to stand up for important values like openness and freedom, and, gosh knows, we have real disagreements on some topics that deserve to be debated vigorously, but the constant mutual harassment and posturing actually make these debates harder to resolve. 
	</p>
	<p>Both sides are guilty of this and we pay a measurable cost for it.</p>
	<p>On the Open Source side, we tend to rule out technologies that reek of big corporate support even when they might be the best choice for the job and on the corporate side they tend to be too cautious, holding off on new ideas until they're blessed by the vendor of choice.</p>
	<p>For example, I recently had a good old fashioned geek out with <a href="http://www.neopoleon.com">Rory Blyth</a>, a college friend who went on to work at Microsoft. We spent a few hours having two of the oldest, least productive, and most fun coding conversations around: static vs. dynamic typing and SOAP vs. REST, as well as one new one that's shaping up to acquire a similar status: relational vs. document databases. While we seem to have an unbridgeable spiritual divide on the first topic, we each managed to convince each other, at least a little bit, on the last two. Rory did a strong job arguing in favor of the value of SOAP APIs for client implementors because of the strong level of automation and framework/IDE support that they enable and convincing me that at least some of my RESTful bias is inherited unquestioned from my community. Likewise, I managed to overcome Rory's profound SQL Server loyalty to convince him that relational databases, which were designed to perform original relational algebra in order to resolve a query with an unknown answer, are a bad architectural fit for most web applications which simply use them for object persistence. He left eager to check out <a href="http://incubator.apache.org/couchdb/">CouchDB</a> and I left resolved to explore <a href="http://www.zorched.net/2006/02/09/ruby-soap4r-for-web-services/"> Ruby's SOAP options</a>.
</p> 

<p>This is exactly the kind of outcome that gets crowded out of most online discourse by the flamewars and name calling. The animosity and ugliness pushes us deeper into our own camps, just as moderate politicians tend to head to the extremes of their own party during a hard fought primary.  
	</p>


<p>Well, the primary's over. I hereby declare it to be the general election. There's a world out there with real problems. From <a href="http://www.amazon.com/Worldchanging-Users-Guide-21st-Century/dp/0810930951/grabbit-20">global warming</a> to <a href="http://www.bloomberg.com/apps/news?pid=20601086&sid=aMvxEl_rz3Yk&refer=latin_america">the growing international food crisis</a> to <a href="http://www.riaa.com/whatwedo.php?content_selector=whatwedo_fbi_seal">the war on free speech</a>, the world faces serious challenges that can only be overcome by radically great technology, the license it's released under be damned.
</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/microsoft" rel="tag">microsoft</a>, <a href="http://www.technorati.com/tags/open" rel="tag">open</a>, <a href="http://www.technorati.com/tags/source" rel="tag">source</a>, <a href="http://www.technorati.com/tags/politics" rel="tag">politics</a>, <a href="http://www.technorati.com/tags/rory+blyth" rel="tag">rory blyth</a>, <a href="http://www.technorati.com/tags/soap" rel="tag">soap</a>, <a href="http://www.technorati.com/tags/rest" rel="tag">rest</a>, <a href="http://www.technorati.com/tags/couchdb" rel="tag">couchdb</a>, <a href="http://www.technorati.com/tags/flamewar" rel="tag">flamewar</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/04/on-politics-how-obama-vs-clint.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/04/on-politics-how-obama-vs-clint.html</guid>
            
            
            <pubDate>Thu, 24 Apr 2008 22:29:11 -0800</pubDate>
        </item>
        
        <item>
            <title>RAD 0.2.1 Announcement and Dorkbotpdx 0x01 demo</title>
            <description><![CDATA[<p>
It's been an active few weeks in the world of <a href="http://rad.rubyforge.org">RAD</a>! First off, RAD 0.2.1 was released last week which includes a bunch of small features and bug-fixes:

<ul>                                                                 
<li>added <a href="http://rad.rubyforge.org/rdoc/">first significant documentation</a>                            </li>
<li>fixed require 'yaml' bug in makefile.rb                          </li>
<li>added <a href="http://rad.rubyforge.org/examples">examples directory</a> to the website</li>
<li>applied <a href="http://www.wulfden.org/TheShoppe.shtml">Brian Riley</a>'s SWSerLCDpa patch                           </li>
<li>experimental libraries system in vendor/libraries                </li>
<li>enhancements to the rad command: can set project config.         </li>
</ul>

The documentation and examples should be lots of help for those of you are just getting started. If you've got successful sketches, send them to me and I'll add them!
</p>
<p>I setup a <a href="http://groups.google.com/group/ruby-arduino-development">Ruby Arduino Development Google Group</a> for discussion amongst the growing group of contributors and users of the project. We've already got some fun stuff brewing there including someone working on a serial console, so drop by if you've got questions or want to participate.</p>
<p>
	Also, big thanks to <a href="http://www.wulfden.org/TheShoppe.shtml">Brian Riley of Really Bare Bones Arduino supplier Wulfden.org</a>. His patch here for SWSerLCDpa support hopefully marks the start of a great collaboration to get a bunch of important Arduino libraries ported to RAD including OneWire and I2C. Plus, he sent me a totally awesome data logging kit to play with!   
<a href="http://www.flickr.com/photos/unavoidablegrain/2385314571/" title="Wulfden Arduino Kit Unboxing: data logging kit by atduskgreg, on Flickr"><img src="http://farm4.static.flickr.com/3003/2385314571_6339690272.jpg" width="400"  alt="Wulfden Arduino Kit Unboxing: data logging kit" /></a>
</p>


<p>
	Last, but definitely not least, I presented about RAD at <a href="http://dorkbotpdx.org/wiki/dorkbotpdx_0x01">Dorkbotpdx 0x01</a> last week. I was fortunate enough to be in the good company of Ward Cunningham (who gave an amazing talk about his biologically-inspired <a href="http://c2.com/cybords/">Cybords</a> project) and many others. Jared from Dorkbotpdx shot video of the event which is now online. I did two demos, the basic blinky-LED hello world and a more advanced assembler sketch that drove a 7-segment LED and serial output (my segment starts at about 4:46):

<object type="application/x-shockwave-flash" width="400" height="225" data="http://www.vimeo.com/moogaloop.swf?clip_id=858480&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=">	<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=858480&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=" /></object>
</p>
<p>
	Watch the rest of the videos from the event here: <a href="http://www.vimeo.com/album/10961">Dorkbotpdx 0x01 on Vimeo</a>.
</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/arduino" rel="tag">arduino</a>, <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/rad" rel="tag">rad</a>, <a href="http://www.technorati.com/tags/dorkbotpdx" rel="tag">dorkbotpdx</a>, <a href="http://www.technorati.com/tags/wulfden" rel="tag">wulfden</a>, <a href="http://www.technorati.com/tags/electronics" rel="tag">electronics</a>, <a href="http://www.technorati.com/tags/physical" rel="tag">physical</a>, <a href="http://www.technorati.com/tags/computing" rel="tag">computing</a>, <a href="http://www.technorati.com/tags/portland" rel="tag">portland</a>, <a href="http://www.technorati.com/tags/oregon" rel="tag">oregon</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/04/rad-021-announcement-and-dorkb.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/04/rad-021-announcement-and-dorkb.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">RAD</category>
            
            
            <pubDate>Mon, 07 Apr 2008 13:33:00 -0800</pubDate>
        </item>
        
        <item>
            <title>Guide to Getting Started with Merb and ActiveRecord</title>
            <description><![CDATA[<p><img src="http://www.merbivore.com/img/header_logo.png" style="float:left; margin: 10px"/></p>
<p>Spent a while today getting up and running with <a href="http://www.merbivore.com/">Merb</a>, the minimalist modular alternative Ruby framework from Ezra and the good people at <a href="http://www.engineyard.com/">Engine Yard</a>. Merb has been in a bit of chaos these recent months as it's gone through a major reworking to acheive a whole new level of performance as well as honest-to-goodness modularity, including choosing your own ORM and templating system. I've been watching Merb's development for some time waiting for it to get to a level of stability that looked safe enough to dive in; their most recent release, 0.9.2, combined with pressing needs in a few exciting new <a href="http://grabb.it">Grabb.it</a> features, made today the day.</p>

<p>
My first day with Merb has been mostly great, but the one thing I found really sorely missing was a tutorial on how to get started. In all fairness, the Merb team promises left and right that copious documentation will be coming as they settle down to 1.0. In the meantime, I thought I'd pitch in for any brave early adopters out there with this Guide to Installing Merb and ActiveRecord.  
</p>

<h4>Acquire and Install the Source</h4>

<p>
 So, my goal here was to get from 0 (no Merb on my machine whatsoever), to running a hello world for accessing the database from an existing Rails project using ActiveRecord from within Merb. The first step was to acquire the source. One of the downsides to Merb's modular architecture is the complexity involved with installing it (again, all relevant disclaimers here about how the merb team will, I'm sure, be working to simplify and improve the process as they reach 1.0). At least for now, you actually have to get your hands on three different packages: merb-core (the base of the framework, a requirement), merb-more (has more advanced features like the command for actually creating a new app), and merb-plugins (this is where things like ORMs and templating systems live). Let's do that:

<code>
$ git clone git://github.com/wycats/merb-core.git
$ git clone git://github.com/wycats/merb-more.git
$ git clone git://github.com/wycats/merb-plugins.git
</code>

That'll get us the bleeding edge trunk version (about which more <a href="http://www.merbivore.com/get_merb.html#trunk
">here</a>).
</p>

<p>
Now that we've got the pieces, we need to install them, thusly:
<code>
$ cd merb-core ; rake install ; cd ..
$ cd merb-more ; rake install ; cd ..
$ cd merb-plugins/merb_activerecord; rake install; cd ..
</code>
</p>

<h4>Create a New Project and Configure it for Active Record</h4>

<p>We've got all the pieces; it's time to create our project and get it setup to use ActiveRecord. Go to the place you want to create your app and do this:
<code>
$ merb-gen app my_app
</code>

This is equivalent to the 'rails' command and will create your project directoy with <em>most</em> of what you need. But since a basic project in Merb is assumed to be simpler than a basic project in Rails, you'll quickly notice that you don't have a models directory. Since we're actually going to need a model if we want to connect up to a database with ActiveRecord, go ahead and create that directory and create a file inside if for your model just as you would in Rails, for example my_resourece.rb, which could look like this:
<code lang="ruby">
class MyResource &lt; ActiveRecord::Base
end
</code> 
</p>
<p>We'll probably want a controller as well, so create a new file: controllers/my_resources.rb:
<code lang="ruby">
class MyResources &lt; Application
  def show
    r = MyResource.find :first
    render r.some_method
  end
end
</code>
Notice that all Merb controllers inherit from Application just like Rails controllers inherit from Application::Controller. The naming choice there is kind of interesting because it reveals Merb's controller-centric history and philosophy (remember that the framework doesn't assume that we need models by default; it turns out there's a lot you can do with just controllers).
</p>
</p>
<p>
	Since we're using ActiveRecord, we'll obviously need to tell Merb that we want it to go ahead and actually load AR as our ORM. Go into config/init.rb in your project and uncomment the line that says "use_orm :activerecord".
</p>
<p>We're almost there! These last few steps will feel familiar from setting up a Rails app: letting the framework know about our route and database configuration. To set up your route, open up config/router.rb and, inside the 'prepare' block, add a line like this:
	
<code>
r.resources :my_resources
</code>
	
Merb's routes work pretty much like Rails's, but with a few more advanced features some of which are explained in the comments at the top of that file. If you need something other than standard RESTful routing, read those.	
</p>
<p>Finally, all we've got to do is configure database access and we'll be ready to roll. In Merb this looks exactly like Rails, in fact, I simply copied the database.yml file over from the Rails project that usually manages the db I wanted to access, dropped it in config/databse.yml and it worked straight out of the box.</p>

<p>Ok! If you've made it this far, then you're probably more than ready for the big reveal. In you project directory do this:
	
<code>
$ merb
</code>

The server will start and you'll get a few log messages in your terminal that look like this:
<code>
$ merb
 ~ Loaded DEVELOPMENT Environment...
 ~ loading gem 'merb_activerecord' from  ...
 ~ loading gem 'activerecord' from  ...
 ~ Connecting to database...
 ~ Compiling routes...
 ~ Using 'share-nothing' cookie sessions (4kb limit per client)
 ~ Using Mongrel adapter
</code>	

Once that settles down, browse to <a href="http://localhost:4000">http://localhost:4000</a> and you should see the Merb welcome screen. Go to your expected url to see the result of your handiwork: i.e. http://localhost:4000/my_resources/7
</p>
<p>If this works, you're officially up and running with Merb and ActiveRecord. If not, you'll see one of Merb's very stylish error screens and it'll be time to go to #merb on irc.freenode.net where all the friendly merbfolk hang out and are more than willing to help.</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/merb" rel="tag">merb</a>, <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/web" rel="tag">web</a>, <a href="http://www.technorati.com/tags/framework" rel="tag">framework</a>, <a href="http://www.technorati.com/tags/install" rel="tag">install</a>, <a href="http://www.technorati.com/tags/0.9.2" rel="tag">0.9.2</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/04/guide-to-getting-started-with.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/04/guide-to-getting-started-with.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
            <pubDate>Thu, 03 Apr 2008 21:35:15 -0800</pubDate>
        </item>
        
        <item>
            <title>Announcing RAD 0.2: Software Serial Support, Inline Assembler, and More!</title>
            <description><![CDATA[<p>
	I'm proud to announce a new release of the <a href="http://rad.rubyforge.org">Ruby Arduino Development gem (RAD)</a>! This release brings two major new features (software serial serial support and inline assembler), a major revamping of the hardware serial library, and a raft of other small features and bug fixes. I've got lots of details below, but first I wanted to thank Scott Windsor who contributed the software serial support as well as all the other people who wrote in with bug reports, ideas, and comments, and of course <a href="http://blog.bleything.net/">all the members of the RAD core team</a>. It's exciting to see RAD starting to support physical computing scenarios I've never had the hardware to work with myself.
</p>  

<h4>Inline Assembler</h4>

<p>
	I'm starting with this new feature not because it's necessarily the most import or most broadly useful, but just because I think it's the sexiest (which probably says something sick about me, but there you go)! RAD now offers a class method to all sub-classes of ArduinoSketch for writing routines in assembly language. You give the method three arguments: the name of the routine, its signature, and the assembly code you'd like to consitute its body. Here's an example script showing the method in action:
	
<code lang="ruby">
class AssemblerTest &lt; ArduinoSketch
  serial_begin
  
  def loop
    serial_println product(10,4)
  end
  
  assembler( :product, &quot;int product(int a, int b);&quot;,
    &lt;&lt;-CODE
    product:
      	mov  r18,r24	; move a to another register
      	ldi  r24,0		; clear running sum, used to coalesce product
      	ldi  r25,0		; sum = 0
      
      .loop:
      	tst  r18		  ; is a = 0? if so, we&#x27;re done
      	breq .end
      
      	mov  r19,r18	; copy a
      	andi r19,1		; is a % 2 == 0
      	breq .skip		
      
      	add  r24,r22	; add b to sum
      	adc  r25,r23
      
      .skip:
      	lsr  r18		  ; divide a by 2
      
      	clc			
      	rol  r22		  ; multiply b by 2
      	rol  r23
      	rjmp .loop
      
      .end:
      	ret
      	.size product, .-product
    CODE
  )
end

</code>

As you can see, the body of the assembly code is simply passed as a string to the 'assembler' method. In this case, all I'm doing is implementing multiplication of two integers. RAD takes your assembly code, adds some architecture-specific headers and other boilerplate, writes it to a source file, and makes sure that the compiler knows to compile it into object code and link it into your project during the build process. 
</p>
<p>I'm an asm newbie and I found that the hardest part of getting started learning the stuff was bootstrapping an environment where you could actually run your code and see the results. Hopefully this addition to RAD will smooth that process for people in a similar situation. Now all you've got to do is put your assembly code in an ArduinoSketch model like the one above, upload it to your Arduino, and read the board's serial output (for example by attaching to it with <a href="http://en.wikipedia.org/wiki/GNU_Screen">screen</a>). You can be writing (and debugging) your first assembler routines in seconds.</p>
	
<p>
	<em>It's worth noting that this feature wouldn't have been possible without <a href="http://people.reed.edu/~jimfix/">Reed College math professor Jim Fix</a> teaching me the basics of AVR assembler and the avr-gcc build process. Thanks, Jim!</em>
</p>

<h4>Software Serial Support</h4>
	<p>This feature came in as a patch from Scott Windsor. Scott was working on hooking up his <a href="http://www.ladyada.net/make/boarduino/">Boarduino</a> (an Arduino-compatible clone from <a href="http://www.ladyada.net">Lady Ada</a>) to a GPS module and a Serial LCD both of which require serial connections. Thankfully, Arduino provides a <a href="http://www.arduino.cc/en/Tutorial/SoftwareSerial">SoftwareSerial library</a> for doing serial connection on any of the board's digital i/o pins. Scott's patch gives you really convenient access to this functionality, thusly:

<code lang="ruby">
class MySketch &lt; ArduinoSketch
  output_pin 13, :as =&gt; :led
  software_serial 6, 7, :as =&gt; :gps
  serial_begin

  def loop
    digitalWrite(led, true)
    serial_print(gps.read)
  end
end
</code>
	As you can see, he configures ports 6 and 7 as a software seria connetion called "gps" and then he simply says "gps.read" to read the data his device is sending over that connection. Scott also implemented "print" and "println" methods for outputting to serial-connected devices such as his LCD, which work in the same way.
			</p>
			<p>
				I was especially psyched to see this patch since I haven't gotten to work with any devices that communicate over software serial yet, which had meant that I couldn't really test and add this functionality myself. I'm planning to get my hands on some of that soon and so I'm excited to play with the clean simple API Scott's provided here.
			</p>
<h4>Fixed Hardware Serial Support</h4>
		
		<p>In previous releases of RAD, hardware serial support had been, uh, perfunctory. The trouble stemmed from the wide variety of functionality hidden behind Arduino's elegant serial API. Serial.read(), Serial.print(), and their brethren do subtle things to act correctly when called with different arguments, from integers to individual characters to full strings (or arrays of characters, as C would have it). The result was that RAD's versions of these methods would sometimes do strange things like returning ASCII-value integers when sent characters. That should no longer be happening. For example if your run the following sketch:

<code lang="ruby">
class SlowTypewriter &lt; ArduinoSketch
	serial_begin
	
	def loop
		serial_print serial_read
	end
end
</code>

and attach to the serial output with screen, you'll see the characters you type successfully roundtripping to the Arduino and coming back with their encoding preserved. It's the world's slowest typewriter!
	</p>
		
<h4>A Panoply of Small Features, Tweaks and Bug Fixes</h4>
<p>
	Including, but not limited to:
	<ul>
		<li>Made 'rake make:upload' default to skipping the prompt for reseting the board. The older NG boards that require the reset are getting rare and I recently <a href="http://flickr.com/photos/unavoidablegrain/2310821792/">modded mine to no longer require it</a>. The reset is still available as an option by editing the "physical_reset" option in config/hardware.yml.</li>
		<li>Added support for HIGH/LOW and ON/OFF constants. This is a nice feature of the Arduino API that I hadn't been able to sneak throug the RubyToC translation stage until now.</li>
		<li>Support for variables that are not local to the loop method. It's a common desire to be able to initialize variables outside of the loop method of a sketch so that they will not be constantly re-initialized with each run, for example to define environmental constants or initialize counters. Since RAD replaces the Arduino setup functions and global declarations with ArduinoSketch class methods (such as output_pin), this wasn't previously possible. As of this release, you can use the 'vars' method to initialize variables in this scope thusly:
<code lang="ruby">
class VarTest &lt; ArduinoSketch
	vars :a =&gt; :int, :b =&gt; 7, :c =&gt; &quot;hello&quot;
	
	def loop
		a = 1
		serial_print a
		serial_print b
		serial_println c
	end
end	
</code>
	This will produce output like:
<pre>
17hello
17hello
17hello
17hello
[...]
</pre>
 As you can see, the vars method takes a hash where each key is the name of the variable you'd like to initialize and the value and be either a type (rendered as a symbol, i.e. ":int"), or an actual value if you want the var to be initialized to something (i.e. "hello").
			</li>
			<li>Changed default Arduino location to be /Applications/arduino-00010, which seems to be where most people (now including me) have it.</li>
			<li>Plus too many small bug fixes to list here!</li>
	</ul>
</p>	

<h4>What's Next?</h4>
<p>
	There's all kinds of things big and small on the immediate roadmap for RAD. There's the administrative: putting the RAD source on <a href="http://github.com">Git Hub</a>, adding sorely needed documentation to the core ArduinoSketch methods, organizing an email list for the growing group of people wanting to be kept up-to-date on the project, etc. There's the lofty: I've got the beginnings of a plan for putting building a testing and simulation framework on top of RAD that would let you run your sketch against a software version of the Arduino hardware while developing (with a visualization/interactive app built on <a href="http://code.whytheluckystiff.net/shoes/">Shoes</a>!), etc.
</p>
<p>And then there's your contribution: send me your patches and RAD can become whatever your want it to! As always, if you've got any questions, ideas for contributions, or run into any troubles running RAD, feel free to email me: greg [dot] borenstein [at] gmail [dot] com or comment here; I'd especially love to see/hear what projects people are building with RAD. Happy hacking!</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/rad" rel="tag">rad</a>, <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/arduino" rel="tag">arduino</a>, <a href="http://www.technorati.com/tags/c" rel="tag">c</a>, <a href="http://www.technorati.com/tags/assembly" rel="tag">assembly</a>, <a href="http://www.technorati.com/tags/reed" rel="tag">reed</a>, <a href="http://www.technorati.com/tags/gem" rel="tag">gem</a>, <a href="http://www.technorati.com/tags/release" rel="tag">release</a>, <a href="http://www.technorati.com/tags/physical+computing" rel="tag">physical computing</a>, <a href="http://www.technorati.com/tags/framework" rel="tag">framework</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/03/announcing-rad-02-software-ser.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/03/announcing-rad-02-software-ser.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">RAD</category>
            
            
            <pubDate>Sun, 16 Mar 2008 15:51:10 -0800</pubDate>
        </item>
        
        <item>
            <title>Automating Firefox for Web Application Integration</title>
            <description><![CDATA[<p><em>This post explains how to control Firefox from the command line with Telnet and Ruby. After presenting some context to explain why I think this hack represents an important area of concern in contemporary web application development, I'll show how to execute it with actual install directions and code samples.</em></p>

<p>
	Ok, I'll say it: I think JavaScript is cool. One of my favorite effects of the move to the modern AJAX-oriented web application architecture has been the opportunity to move ever more functionality into the client. At <a href="http://grabb.it">Grabb.it</a>, we like to say, "Anything you can implement in JavaScript is free." Instead of running on our servers, the JavaScript portion of our app runs on a distributed grid of thousands of machines maintained for us by our users. Also, despite the reputation given it by the Browser Wars, JavaSript is incredibly fun to develop in: it's lightweight and extremely flexible in a unique way that somehow forces you to constantly keep your code very closely tied to the data it's manipulating. 
</p>
<p>
	The one big downside to JavaScript is its runtime environment. Not only does code running in the browser confront a Gordian Knot of browser compatibility problems, but it's also irretreviably isolated from interoperating with other application code. While javascript libraries (like the inestimable <a href="http://docs.jquery.com/Main_Page">jQuery</a>) are increasingly proving the <a href="http://en.wikipedia.org/wiki/Gordian_Knot#Legend">Alexander's sword</a> of the browser compatibility Knot, the issue of lack of application interoperability is only just beginning to get serious. As JavaScript's innate advantages lure more and more application code into the browser, the question will be unavoidable: How do you get modules implemented in JavaScript to interact with those built in other languages that live in more traditional environments? How do you avoid duplicating all functionality that you put into the JavaScript portion of the application so that you can call it from outside the browser?
</p>
<p>
	This week, trying to solve exactly these types of problems, I discovered a tantalizing avenue towards addressing some of these questions: browser automation from the command line and from scripting languages. Here was my situation.
	</p>
	<p>
	As part of <a href="http://go.grabb.it">an upcoming Grabbit project</a>, I've built a <a href="http://go.grabb.it/demo">a highly interactive data browser</a> for our customers. The JavaScript running on that page makes a series of JSON GET requests to gather all of the necessary information to compose its display and it makes a few AJAX POST requests to report back to the server on certain bits of status. But now, I wanted to trigger those POSTs programatically on a schedule rather than waiting for customers to trigger them. The dilemma is that I'd already written this relatively sophisticated JavaScript application that makes all the necessary requests, implements the business logic, and knows how to POST in the data. I had two options: redo all of that work again in my server-side application (ick!) or figure out a way to trigger this JavaScript code by automating its runtime enviornment (the browser).
</p>

<p>
		After a half day's research, here's what I discovered: there's a Firefox extension that allows other applications to <a href="http://www.croczilla.com/jssh">establish JavaScript shell connections to a running Mozilla process via TCP/IP</a>. It's called JSSH. Once you've got JSSH installed and running in Firefox, you can open a telnet connection to the browser that allows you to automate it using JavaScript commands to do things like load new pages or even manipulate the DOM on pages you've loaded. You can then automate this interaction using any scripting language with a telnet library. For the remainder of this post, I'll provide step-by-step instructions for running JSSH and for automating it with Ruby.
		</p>
		<h4>Install JSSH</h4>
		<p>
		The easiest way to install JSSH is to download the <a href="http://alephzarro.com/files/jssh-20070312-linux.xpi">JSSH.xpi</a> and open it with Firefox which will offer to install the extension (if you're interested in compiling Firefox with it from scratch or installing an existing binary, you should read <a href="http://crasch.livejournal.com/550521.html">these instructions</a>).
		</p>
		<h4>Start Firefox with JSSH</h4>
		<p>
			 Once you've got a copy of Firefox with JSSH installed, you'll need to run it. You can do this by providing the correct options when launching Firefox from the command line. On Mac OS X, that looks like this:
			<code>
/Applications/Firefox.app/Contents/MacOS/firefox -jssh &
			</code>
			The "&" at the end of that line will background your command so it doesn't take over your terminal session.
		</p>
		<h4>Telnet into the JavaScript Shell</h4>
		<p>
			Once Firefox is running, we can use telnet to log into JSSH like so:
<code>
$ telnet localhost 9997
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the Mozilla JavaScript Shell!

&gt;
</code>
	</p>

	<h4>Load a URL from JSSH</h4>
	<p>
		Now that we're in, we can tell Firefox to load pages for us, thusly:
<code>
var w0 = getWindows()[0]
var browser = w0.getBrowser()
browser.loadURI("http://www.urbanhonking.com/ideasfordozens")	
</code>

	And that's it! If the JavaScript application I wanted to run lived at "http://urbanhonking.com/ideasfordozens", we'd be done. That command would load the page and Firefox would interpret and run the JavaScript it found there.
	</p>
	<p>
	Now, all we've got left to do is make it so that we can trigger this process from our application code. So, we'll...
	</p>
	<p>
		<h4>Automate the Process with Ruby</h4>
			<p>
				Like any good scripting language, <a href="http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/index.html">Ruby has a telnet library</a>, which means that once we've got an instance of Firefox running with JSSH enabled, we can talk to it from Ruby whenever we want. Here's an example script that logs into the telnet shell and loads a series of URLs one at a time:
<code lang="ruby">
require 'net/telnet'
my_urls = ["http://urbanhonking.com/ideasfordozens", "http://atduskmusic.com", "http://grabb.it", "http://pdxpopnow.com"]

# start telnet session with the Firefox javascript shell and setup browser object
puts "starting telnet session"
firefox = Net::Telnet::new("Host" => "localhost", "Port" => 9997)
firefox.cmd "var w0 = getWindows()[0]"
firefox.cmd "var browser = w0.getBrowser()"

# load each page
my_urls.each do |url|
  puts "loading...#{url}"
  firefox.cmd "browser.loadURI('#{url}')"
  sleep 10 # so that the browser has time to load even if the page is slow
end

firefox.close
</code>
			</p>
			<h4>Further Research: Screen Scraping JavaScript Heavy Sites</h4>
			<p>
				What else might this rickety bridge we've built to the JavaSript runtime environment be good for? One thing that immediately occurs to me is: screen scraping for sites with a lot of JavaScript. Another side effect of the rise of rich JavaScript applications has been to create intractable problems for people trying to do screen scraping. If the data you want is not in the page's HTML when you request it in the first place but is only written in later when the page's JavaScript runs then traditional spidering and screen scraping techiques will fail to find it. <a href="http://www.freebase.com/">Freebase</a>, the open database application built by Danny Hillis and his team, for example, uses a highly dynamic interface for presenting its data that is almost entirely based in JavaScript. Or, on the low-brow side, <a href="http://myspace.com">MySpace</a> uses JavaScript throughout the forms in its interface to help with date picking and such. If you wanted to scrape or automate interaction with either of these sites, you'd need access to a runtime environment that could execute JavaScript.
			</p>
			<p>
				I haven't really tackled this problem with JSSH, but I do have some leads. For example, here's how you get the html of the document:
<code>
&gt; browser.contentDocument
[object XPCNativeWrapper [object HTMLDocument]]
&gt; domDumpFull(domNode(browser.contentDocument))
&lt;HTML&gt;&lt;HEAD&gt;&lt;META content=&quot;text/html...
</code>

If you want to explore this avenue further, one of the best places to look is <a href="http://code.google.com/p/firewatir/">Firewatir</a>, a project to add Firefox support to the <a href="http://www.openqa.org/watir/">WATIR browser testing framework</a>. They do lots of click-by-click automation and checking for results, so I'm sure they've figured out approaches for a lot of what you'd confront when screen scraping. <a href="http://www.croczilla.com/jssh">The JSSH documentation</a> itself is useful and clear but not the most in depth. 
				</p>
				<p>
					Happy automating! Let me know what you discover...
				</p>
				<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/firefox" rel="tag">firefox</a>, <a href="http://www.technorati.com/tags/jssh" rel="tag">jssh</a>, <a href="http://www.technorati.com/tags/javascript" rel="tag">javascript</a>, <a href="http://www.technorati.com/tags/automation" rel="tag">automation</a>, <a href="http://www.technorati.com/tags/browser" rel="tag">browser</a>, <a href="http://www.technorati.com/tags/ajax" rel="tag">ajax</a>, <a href="http://www.technorati.com/tags/json" rel="tag">json</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/03/automating-firefox-for-web-app.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/03/automating-firefox-for-web-app.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
            <pubDate>Fri, 07 Mar 2008 10:54:34 -0800</pubDate>
        </item>
        
        <item>
            <title>Developing Single Serving Sites using Ruby CGI scripts on Dreamhost</title>
            <description><![CDATA[<p>
	There's been a lot of hullabaloo lately about <a href="http://www.kottke.org/08/02/single-serving-sites">Single Serving Sites</a>. Stimulated by the inexplicable runaway success of <a href="http://barackobamaisyournewbicycle.com/">Barack Obama is Your New Bicylce</a>, these simple sites that provide a small dollop of amusement (<a href="http://www.isitchristmas.com/">isitchristmas.com</a>) or utility (<a href="http://istwitterdown.com">istwitterdown.com</a>) have become all the rage.
</p>
<p>Of course, I've been making them for awhile now, e.g. <a href="http://largeheartedgoat.com">Largehearted Goat</a> and <a href="http://thenytimesexplainstheratings.com">The NY Times Explains the Ratings</a>. At first, creating a new SSS is a satisfying experience. You have a whacky idea and withing a few hours, you've registered a domain, written some simple code, and put something up. But, over time, each one gets to be more and more of a burden. My ideas, at least, have involved sites that need to be constantly updated with new information over time. Since I've always implemented these sites with simple ruby scripts that run on my local machine and then upload the static finished versions of the sites, this has meant keeping an eye on unreliable cron jobs and, sometimes, hand maintenance. And, over the years, I've wondered if there was a better solution.
	</p>
<p>
	Today, I took the first steps towards finding one. It turns out that <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface">good-ole CGI scripts</a> &mdash; so foreign to those of us who's main experience has taken place in the age of sophisticated web frameworks like Rails &mdash; make a great basis for SSS development. What follows is a basic introduction to writing and running CGI scripts with Ruby. I'll focus on Dreamhost as a deployment target since it's the service I have access to for this kind of thing and also the issues that arise there are probably not that dissimilar from what comes up with the other shared hosting services that are the natural habitat of SSSes.
</p>

<h4>Step One: Get Ruby and Rubygems up and running</h4>

<p>If you plan on keeping your SSSes extremely spartan simple, you might be able to skip this step. Dreamhost accounts come with an old version of Ruby already installed. If you don't need to install any custom gems for your scripts or control anything else about your ruby environment, you can skip straight down to the step two. However, if you plan on doing anything the least bit more sophisticated &mdash; from installing one individual gem all the way up to using Rails itself &mdash; you've got a bit of work to do beforey you can get started on the fun part.</p>

<p>
	Being far from an expert on unix build process and dependencies, I followed <a href="http://nateclark.com/articles/2006/10/20/dreamhost-your-own-packages-and-gems">Nate Clark's excellent instructions for building Ruby and Rubygems on Dreamhost</a> with just a few discrepancies. My biggest note is that the version of the Ruby source to which he links is out-of-date. I changed his line for download the Ruby source to:
	<code>
$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
	</code>
	But, don't trust me! The most recent version of Ruby changes all the time and you can always find <a href="http://www.ruby-lang.org/downloads">the most recent version of Ruby at ruby-lang.org</a>. The one other thing worth noting that I discovered was that in any of the compilations make may die by timeout (Dreamhost kills processes that last longer than a given interval, a major pain point we'll be returning to in a moment when we try to install individual gems). It won't always be clear that a timeout was at fault so if you see a 'configure', 'make', or 'make install' command die mysteriously, just go ahead and try again. 
</p>

<h4>Step Two: CGI Hello World with Ruby</h4>

<p>
	Now that we've got Ruby and Rubygems installed, the first thing we want to do is to just run a basic 'hello world' CGI script to make sure that we've got things configured correctly. Here are the steps:
	<ol>
		<li>Log into dreamhost over ssh.</li>
		<li>Navigate to the desired directory within your web space.</li>
		<li>Create a new file, e.g. test.cgi.</li>
		<li>Fill it with the following content (if you skipped Step One and are using the build-in DH Ruby, the first 'shebang' line should read: "#!/usr/bin/ruby" instead of what is shown):
			<code>
#!/usr/bin/env ruby
require "cgi"
cgi = CGI.new("html3")
cgi.out("text/plain"){
  "Hello World #{Time.now}"
}
			</code>
			</li>
			<li>Change the permissions of that file by running:
			<code>
$ chmod 775 test.cgi
			</code>
			</li>
	</ol>
	That should do it. Navigate to that path in your browser and you should see output that looks something like this:
<code>
Hello World Sat Mar 01 19:04:53 -0800 2008
</code>
</p>

<h4>Step Three: Install Gems by Hand</h4>

<p>Now, if you plan on doing anything more interesting than displaying the date, the odds are you're going to want to take advantage of Ruby's great and growing weatlh of libraries made available as Gems. Unfortunately, the RubyGems server system running at <a href="http://rubyforge.org">RubyForge</a> has lately become incredibly slow. In order to find packages and detect dependecies, the default 'gem install' command has to communicate with that server and so becomes subject to the ruthless Dreamhost killing of long-running processes. In my experience, trying to install gems on Dreamhost will universally end in frustration:

<code>
$ gem install feedalizer
Bulk updating Gem source index for: http://gems.rubyforge.org
Killed
</code>
What to do?
</p>
<p>Fortunately, in addition to using the RubyForge server to search for gems, it's possible to install them directly from .gem files if you can find them for your desired packages. For example, when building a recent SSS I wanted to use <a href="http://termos.vemod.net/feedalizer">Feedalizer</a> &mdash; a great library that scrapes web pages and automatically creates RSS feeds from the resulting content &mdash; so I hunted down the .gem file via the <a href="http://rubyforge.org">RubyForge website</a>, downloaded it, attempted local installation, and then (when that failed) chased down the sources for the dependencies (in this case just <a href="http://code.whytheluckystiff.net/hpricot/">Hpricot</a>) to follow the same process. To give you a taste of things here were the gory details:</p>

<p>Installing Feedalizer:
<code>
$ wget http://rubyforge.org/frs/download.php/13797/feedalizer-0.1.0.gem
$ gem install feedalizer-0.1.0.gem
</code>
which threw an error complaining about the need for the Hpricot dependency, so:
<code>
$ wget http://code.whytheluckystiff.net/dist/hpricot-0.5.140.tgz
$ tar xzf hpricot-0.5.140.tgz 
$ cd hpricot-0.5.140
$ rake gem
$ gem install pkg/hpricot-0.5.gem
</code> 
The 'rake gem' step there is necessary because _why only makes the source directory available for direct download rather than an explicit .gem file. After this completes successefully, return to the 'gem install' step for Feedalizer above (be sure to the return to the directory into which you dowmloaded the Feedalizer .gem before running it).
</p>
<p>
	Much bumpier than the smooth ride normally provided by 'gem install', but it'll get the job done. You could clamber your way down similar rutted paths for most any other gem you needed for you script.
</p>

<p>And that should be more than enough to get you started. If you run into any troubles, dive into the comments here and on the other blog posts linked for help. Also, if anyone has any experience using lightweight persistence strategies in this context, I'd love to hear about them, espcially if they're file-system only; a lot of my scripts requiring saving records and I tend to use a rickety YAML-based system for them that could stand improving.</p>

<p><em>Note: Thanks to <a href"http://henrik.nyh.se/2007/12/dilbert-blog-rss-with-full-entries">The Pug Automatic</a> for inspiring me to start down this path in the first place.</em></p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/ruby" rel="tag">ruby</a>, <a href="http://www.technorati.com/tags/cgi" rel="tag">cgi</a>, <a href="http://www.technorati.com/tags/dreamhost" rel="tag">dreamhost</a>, <a href="http://www.technorati.com/tags/rubygems" rel="tag">rubygems</a>, <a href="http://www.technorati.com/tags/sss" rel="tag">sss</a>, <a href="http://www.technorati.com/tags/single+serving+sites" rel="tag">single+serving+sites</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/03/developing-single-serving-site.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/03/developing-single-serving-site.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">learns_to</category>
            
            
            <pubDate>Sat, 01 Mar 2008 19:27:22 -0800</pubDate>
        </item>
        
        <item>
            <title>Using Sandy with Web Snippets</title>
            <description><![CDATA[<p>
	Welcome to the third in my series of tutorials on getting the most out of <a href="http://iwantsandy.com">I Want Sandy</a>, the "virtual personal assitant" from Portland company Values of N. In the last two installments, I covered <a href="http://www.urbanhonking.com/ideasfordozens/archives/2008/01/i_want_sandy_wi.html">how to communicate with Sandy on the go using SMS and Twitter</a> and outlined <a href="http://www.urbanhonking.com/ideasfordozens/archives/2008/02/an_iwantsandy_p.html">a Sandy-specific version of the Quicksilver append trick</a>. This time, I'm going to show you how I use Safari's new 'web snippets' feature so that I always have quick access to all the stuff I've stored with Sandy.</p>
	<p>I know what you're saying: 'Web snippets? Isn't that a Dashboard feature? Personally, I'd be perfectly happy if Dashboard never launched again!' I know, I know; before figuring out this little trick I felt similarly. But, believe it or not the combination of Sandy and web snippets has actually made Dashboard useful to me for the first time since its inception. So put your well-deserved Dashboard skepticism aside for a moment and listen up.</p>
	<p>
		Now that you've been using my first two tips for awhile, Sandy's starting to know about a lot of your appointments and all your other little tidbits, but what's the best way for her to give you easy access to them? Sure, you can query Sandy for individual bits of information when you're on the go, but there are some things &mdash; like your calendar and TODO list &mdash; that you've just got to have close at hand in full. Creating web snippets out of Sandy's monthly and tag views is the best way I've found to accomplish this.
	</p>
	<p><a href="http://img.skitch.com/20080212-kqtdnsfb19usc53nyxfu44q43u.jpg"><img src="http://img.skitch.com/20080212-kqtdnsfb19usc53nyxfu44q43u.preview.jpg" alt="Skitch.com > atduskgreg" /></a></p>
	<p>
		A 'web snippet' is simply a chunk of a web page that you select from Safari. Safari then creates a Dashboard widget that will be constantly kept up to date with the current content of that little bit of the web. What we want to do is to create web snippets out of the pages on Sandy that have our most relevant information. For my part, I've settled on the Monthly view and the view for my @computer tag (more about that in a minute). Here's how I got those created:
	</p>
	<ol>
		<li>Login to <a href="http://iwantsandy.com/home">IWantSandy.com/home</a>.</li>
		<li>Click on Daily Digest &gt; This Month (the 'This Month' link under the Daily Digest drop down).</li>
		<li>Click the web snippet icon as shown above.</li>
		<li>Drag the highlight box around the yellow pad part of the screen containing your reminders. Sometimes, the box will lock onto individual sub-portions of the page making selection easier, but you can also drag its corners around as well.</li>
		<li>Click the "Add" button in the top right.</li>
		<li>Dashboard will launch. You're done.</li>
	</ol>
	<p>Now, you'll have a custom-made widget with all of your reminders for the month available anytime you invoke Dashboard.</p>
	<p>So, how do I use this? And what's so great about it? Couldn't I just visit Sandy's perfectly nice website anytime I wanted to view my stuff?</p>
	<p>I've made two Sandy-related widgets: one for my appointments for the month and one for my items tagged @computer. I use the @computer tag in a GTD-ish manner to specify TODO items that I can accomplish at my computer (click on the image below to see a larger version):</p>
	<p><a href="http://img.skitch.com/20080212-p3euj7y996d4u5uu525ahpissy.jpg"><img src="http://img.skitch.com/20080212-p3euj7y996d4u5uu525ahpissy.jpg.preview.jpg" title="sandy in web snippets" width="400px"/></a></p>
	<p>Each of these uses demonstrates a different big advantage of accessing Sandy from Dashboard. The key is: <em>the AJAX bits of Sandy's interface still work here</em>, so I can edit items and mark them as done <em>directly from these widgets</em>.</p>
	<p>For example, when I complete an item from my @computer TODO list, I simply click the 'x' next to its entry in the relevant widget and the item gracefully fades away never to return:</p>
	<p>
	<a href="http://img.skitch.com/20080212-d377maifw882y3bex97b8pcrj6.jpg"><img src="http://img.skitch.com/20080212-d377maifw882y3bex97b8pcrj6.preview.jpg" title="marking an item as complete from Dashboard" /></a>
	</p>
	<p>Similarly, I can edit details of appointments if they change, simply by clicking on an item from my monthly calendar. The first click pops up a box with some more details:</p>
		<p><a href="http://img.skitch.com/20080212-rhbghsephmfwtm1h93w7r7fu1p.jpg"><img src="http://img.skitch.com/20080212-rhbghsephmfwtm1h93w7r7fu1p.jpg.preview.jpg" title="click an item to view or edit details" width="400px"/></a></p>
		<p>Clicking 'Edit' brings up a form where you can change everything from the date to the description to when you want Sandy to send your reminder:</p>
	<p><a href="http://img.skitch.com/20080212-1rsbhfff599q9eac7k8eid9xhs.jpg"><img src="http://img.skitch.com/20080212-1rsbhfff599q9eac7k8eid9xhs.jpg.preview.jpg" title="editing details on an item from web snippets" width="400px"/></a></p>
	<p>
		Each of these web snippets really starts to feel like a tiny little custom desktop client for a single specific bit of Sandy's functionality.	
		</p>
		<p>
		One of the big lessons I've learned from my attempts at doing GTD has been the importance of putting your inboxes and other TODOs directly in your path, someplace you'll stumble over them in the course of your normal daily operations. And these little applications are a really lightweight way to do just that, eliminating nearly all the friction involved in maintaining and making reference to my lists and reducing the opportunity for fiddling to a minimum.
	</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/sandy" rel="tag">sandy</a>, <a href="http://www.technorati.com/tags/gtd" rel="tag">gtd</a>, <a href="http://www.technorati.com/tags/safari" rel="tag">safari</a>, <a href="http://www.technorati.com/tags/web+snippets" rel="tag">web+snippets</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/02/using-sandy-with-web-snippets.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/02/using-sandy-with-web-snippets.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">useful web</category>
            
            
            <pubDate>Mon, 11 Feb 2008 18:40:46 -0800</pubDate>
        </item>
        
        <item>
            <title>Ideas for Dozens&apos; Third Annivesary</title>
            <description><![CDATA[<p>Today I'm proud to celebrate the third anniversary of Ideas for Dozens. In the the three years of this blog's existence, I've written 197 entries (or about 1 post every 5 and a half days) using three different blog engines (after a brief flirtation with Blogger I moved to a <a href="http://www.blosxom.com/">Blosxom</a> install for more control before joining <a href="http://urbanhonking.com">Urban Honking</a> and learning about the many mysteries of Moveable Type).</p>

<p>In that time, I've covered topics from <a href="http://www.urbanhonking.com/ideasfordozens/archives/learns_to/">art</a> to <a href="http://www.urbanhonking.com/ideasfordozens/archives/learns_to/">Ruby on Rails</a> to a <a href="http://www.urbanhonking.com/ideasfordozens/archives/2006/10/largehearted_go.html">series</a> of <a href="http://www.urbanhonking.com/ideasfordozens/archives/tshirtaday/">eccentric</a> <a href="http://www.urbanhonking.com/ideasfordozens/archives/2007/02/the_ny_times_ex.html">projects</a>. And you all have responded, writting 286 comments for an average 1.45 comments per entry. My posts have been picked up by <a href="http://www.boingboing.net/2005/08/12/theres-no-place-like.html">BoingBoing</a>, <a href="http://www.43folders.com/2005/05/27/guest-check-pda">43 Folders</a>, and many others.</p>

<p>
	Anyway, I've got lots of exciting stuff in the works including a series on the basics of microcontroller architecture and assembler programming, a few ideas for  phsycial/ubiquitous computing projects, and a few other non-tech projects starting up as well. 
</p>

<p>So stay tuned and keep those comments coming&hellip;</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/idfdz" rel="tag">idfdz</a>, <a href="http://www.technorati.com/tags/meta" rel="tag">meta</a>, <a href="http://www.technorati.com/tags/thrid" rel="tag">thrid</a>, <a href="http://www.technorati.com/tags/anniversary" rel="tag">anniversary</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/02/ideas-for-dozens-third-annives.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/02/ideas-for-dozens-third-annives.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">meta</category>
            
            
            <pubDate>Sat, 09 Feb 2008 16:54:49 -0800</pubDate>
        </item>
        
        <item>
            <title>An iwantsandy Port of the Quicksilver Append Trick</title>
            <description><![CDATA[<img alt="append_to_sandy.jpg" src="http://www.urbanhonking.com/ideasfordozens/append_to_sandy.jpg" width="400" />

<p>As a follow up to my last post on <a href="http://www.urbanhonking.com/ideasfordozens/archives/2008/01/i_want_sandy_wi.html">mobile communication with Sandy</a>, here's a trick I use to communicate with her when I'm sitting in front of my computer.</p>

<p>My favorite super-fast way to tell Sandy about new reminders is nearly identitcal to <a href="http://www.43folders.com/2004/09/04/quicksilver-append-to-a-text-file-from-anywhere" title="Quicksilver: Append to a text file from _anywhere_ | 43 Folders">the famous Quicksilver append trick</a>. In that legendary tip, Merlin Mann advised combining Quicksilver's raw text entry option with it's ability to append information to existing text files in order to quickly add items to lists for tracking everything from TODOs to groceries. My Quicksilver-Sandy technique is almost exactly the same, but here, instead of popping our text on the end of an existing file, we're going to have Quicksilver stick it in an email and send it off to our favroite fictional personal assistant.</p>

<p>If you're experienced with Quicksilver, you can probably figure this out for yourself, but for the rest of you here are the gritty details:</p>

<ol>
	<li>Invoke quicksilver.</li>
	<li>Hit period so the first pane goes into text mode.</li>
	<li>Type your message to Sandy (i.e. "reminder thrusday meeting with mikey").</li>
	<li>Hit tab to bring up the second pane for selecting an action.</li>
	<li>Type "e", "m" (enough for Quicksilver to pick "Email To...(Send)" as the action). <em>Caveat: Make sure you have the "Email To...(Send)" option checked in Quicksilver's Actions preference pane or it won't be available.</em></li>
	<li>Hit tab to move to the third, "indirect object", pane.</li>
	<li>Type "s", "a" (enough for Quicksilver to select Sandy from your contacts (obviously, this presupposes that Sandy is amongst your contacts &mdash; which happened for me simply from emailing her a lot; I don't use Address Book).</li>
	<li>When all three panes look right, hit enter.</li>
	<li>There is no step 9.</li>
</ol>

<p>That's it. Just like the tips for mobile Sandy communication, I really like this way of telling Sandy about my stuff because it reduces for adding new information so much that it makes it easy for me to actually achieve the "ubiquitous capture" the GTD geeks are always talking about.</p>

<p>Next time, to complete my trifecta of Sandy-related posts, I'll talk about how I access the info that Sandy's storing for me using the new Dashboard "web snippets" feature so that it's always easily available to me.</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/iwantsandy" rel="tag">iwantsandy</a>, <a href="http://www.technorati.com/tags/quicksilver" rel="tag">quicksilver</a>, <a href="http://www.technorati.com/tags/append" rel="tag">append</a>, <a href="http://www.technorati.com/tags/43folders" rel="tag">43folders</a>, <a href="http://www.technorati.com/tags/email" rel="tag">email</a>, <a href="http://www.technorati.com/tags/gtd" rel="tag">gtd</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/02/an-iwantsandy-port-of-the-quic.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/02/an-iwantsandy-port-of-the-quic.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">useful web</category>
            
            
            <pubDate>Fri, 08 Feb 2008 18:14:41 -0800</pubDate>
        </item>
        
        <item>
            <title>I Want Sandy with SMS and Twitter</title>
            <description><![CDATA[<p>
	<img src="http://img.skitch.com/20080122-x9xnc5xbnytif6cabt38igtsbq.jpg" alt="sandy" style="float:left; margin: 10px; margin-top:0; margin-bottom: 0"/>
	I've been happily using <a href="http://iwantsandy.com/">I Want Sandy</a>, the virtual email-based personal assistant from Portland-based <a href="http://valuesofn.com/" title="values of n">Values of N</a> for some time now. <em>(Disclaimer: Sandy is the brainchild of Rael Dornfest who I'm proud to count a friend.)</em> The service's friendly avatar-driven interface masks a powerful task and event storage and reminder system that actually feels surprisingly similar to the Ruby Golbergian contraption of <a href="http://rake.rubyforge.org/" title="ruby make">Rake tasks</a>, <a href="http://www.43folders.com/taxonomy/term/3560?page=2" title="Mac OS X | 43 Folders">Remind</a>, and <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/17621">Geek Tool</a> that I'd previously hand-rolled for myself.</p>

<p>
	Until recently, the one part of my interaction with Sandy that hadn't left me totally satisfied was the ability to add tasks and reminders from my phone. Since I've been a straggler in the iPhone stampede, the main interface I use to get data to and from my phone is SMS. It was a synch to teach Sandy to send reminders via SMS, but I had never been able to close the loop on sending new information <em>to</em> Sandy via text. 
</p>
<p>It turns out the problem was mostly me. There are actually two different ways to get setup to send your reminders to Sandy from SMS: via the secondary email address and via Twitter. Both of these are relatively easy to setup and have different uses depending on the context. Here's what I did to get them working:</p>

<h5>Setting Sandy up with SMS</h5>

<ol>
	<li>
		<a href="http://www.iwantsandy.com/login">Login to iwantsandy.com</a>
	</li>
	<li>
		Navigate to <a href="http://www.iwantsandy.com/settings">the settings page</a>.
	</li>
	<li>
		Under the heading "Secondary email address", enter the email address that your carrier redirects to your phone via SMS. For Verizon users this will take the form &lt;YOUR PHONE NUMBER&gt;@vtext.com and other carriers have similar services. If you don't know what yours is, try sending a text message to your own email address and seeing what the from address turns out to be.
		</li>
		<li>
			Once you save your settings with your phone's email address, Sandy will send you a message with a link to confirm the address. When the message arrives in your phone &mdash; it will be in the form: iwantsandy.com/confirm/&lt;SHORT CODE&gt; &mdash; visit the url in the browser.
		</li>
		<li>
			That's it, you're ready to go! Add Sandy as a contact on your phone (enter the address listed as "Sandy's Email Address" as her email address) and you can send her info in just a few clicks any time.
		</li>
</ol>

<h5>Setting Sandy up with Twitter</h5>

<ol>
	<li>Go to <a href="http://twitter.com/s">Sandy's Twitter page</a> and click the button to follow her.</li>
	<li>Go to <a href="http://www.iwantsandy.com/settings/twitter">your Twitter settings page on Sandy</a>.</li>
	<li>Tell Sandy your Twitter account name.</li>
	<li>She'll send you a direct message on Twitter with a confirmation code.</li>
	<li>When that message arrives, return to <a href="http://www.iwantsandy.com/settings/twitter">your Twitter settings page on Sandy</a> and enter the code in the box.</li>
	<li>That's it. You're ready to go! You can now send Sandy a Twitter message in the form of "d s remember that I left my cell phone at the bar" from anywhere you can send Twitter messages: <a href="http://iconfactory.com/software/twitterrific" title="Iconfactory : Software : Twitterrific">Twitterriffic</a>, the web, IM, by texting to 40404, through the Twitter API, etc. Note: they use "s" as Sandy's Twitter name because it's fewer characters to type on a phone.</li>
	<li>Sandy will respond to your Twitter message telling you what she gleaned from it.</li>
</ol>
<p>
	While both of these processes are somewhat lengthy to describe, they each only take a minute to actually execute. And the result of doing so, at least for me, was a major imrpovement in not forgetting things. Instead of writing things down and then sending them to Sandy later when I return to my computer, I just tell her about them immediately when they come up. Plus, now I can access all the stuff I have Sandy store from anywhere. If I want to know what errands I'm supposed to do while I'm out doing them, I just text/twitter "lookup @errands" and Sandy replies with everything I've tagged as an errand.
</p>

<span class='technoratitag'>Tagged: <a href="http://www.technorati.com/tags/sandy" rel="tag">sandy</a>, <a href="http://www.technorati.com/tags/twitter" rel="tag">twitter</a>, <a href="http://www.technorati.com/tags/sms" rel="tag">sms</a>, <a href="http://www.technorati.com/tags/reminder" rel="tag">reminder</a>, <a href="http://www.technorati.com/tags/email" rel="tag">email</a></span>]]></description>
            <link>http://www.urbanhonking.com/ideasfordozens/2008/01/i-want-sandy-with-sms-and-twit.html</link>
            <guid>http://www.urbanhonking.com/ideasfordozens/2008/01/i-want-sandy-with-sms-and-twit.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">useful web</category>
            
            
            <pubDate>Mon, 21 Jan 2008 17:48:45 -0800</pubDate>
        </item>
        
    </channel>
</rss>
