<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>High Earth Orbit &#187; Programming</title>
	<atom:link href="http://highearthorbit.com/category/technology/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://highearthorbit.com</link>
	<description>Transmitting ideas, observations, and images from 42,000 km.</description>
	<lastBuildDate>Thu, 27 Oct 2011 17:23:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Git as a tool for distributed crisis management tools</title>
		<link>http://highearthorbit.com/git-as-a-tool-for-distributed-crisis-management-tools/</link>
		<comments>http://highearthorbit.com/git-as-a-tool-for-distributed-crisis-management-tools/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 13:31:07 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/git-as-a-tool-for-distributed-crisis-management-tools/</guid>
		<description><![CDATA[Through my help with VoteReport.in I have been diving much more into supporting and deploying the Ushahidi platform as part the front-end for user contributed reports. Ushahidi itself started out as a quick mashup a year ago and since then has blossomed into a much fuller platform that is being utilized in dozens of initiatives [...]]]></description>
			<content:encoded><![CDATA[<p>Through my help with <a href="http://votereport.in" title="Vote Report India">VoteReport.in</a> I have been diving much more into supporting and deploying the <a href="http://www.ushahidi.com/" title="Ushahidi :: Crowdsourcing Crisis Information (FOSS)">Ushahidi</a> platform as part the front-end for user contributed reports. Ushahidi itself started out as a quick mashup a year ago and since then has blossomed into a much fuller platform that is being utilized in dozens of initiatives and projects.</p>
<p>Each of these projects evolves the platform, adding new customization capabilities, more input types, browser support, and more. These modifications may be happening in rapid succession without the main Ushahidi development team even being aware of these changes. And the system may even be running in a remote area with little connectivity.</p>
<p>Traditionally, this has meant that a deployment would download a copy of the current release version, or maybe a development snapshot if there was some emminent new feature that was very useful, and then go off, make modifications &#8211; probably on a live server, and maybe email these changes back way after the event in hopes that some of the changes are accepted back into the platform. Updates to the main code base wouldn&#8217;t be easily applied to these heavily modified derivatives &#8211; so essentially every deploy is a fork of the code.</p>
<h3>How Git can save the day</h3>
<p><img src="http://highearthorbit.com/wp-content/uploads/2009/04/ushahidi-git1.png" width="421" height="375" alt="Ushahidi Git.png" style="float:right; padding-top:5px; padding-bottom:5px; padding-left:5px;" />Fortunately, Ushahidi chose Git as the code repository server, although the installation instructions still suggest that you <a href="http://wiki.ushahididev.com/doku.php?id=update_your_ushahidi_instance" title="update_your_ushahidi_instance [Ushahidi]">download the code</a>. Git is meant to support just this kind of distributed workflow and collaboration.</p>
<p>If you&#8217;re not familiar with Git, I highly recommend checking out <a href="http://peepcode.com/products/git-internals-pdf" title="Git Internals PDF | PeepCode Screencasts for Web Developers and Alpha Geeks">Git Internals</a>. But to summarize, it is a versioning control system that is fast, efficient, has local indexes (stored in a local .git directory) and can reference any number of remote indexes to share commits, branches, and files. Where in traditional systems there is an &#8216;official&#8217; host repository &#8211; in Git all repositories are equal and can quickly connect and syncronize.</p>
<p>What this means in a system like Usahidi is that any deployment would first just get a local <em>clone</em> of the official Ushahidi repository to their local system and setup and get running. If they make changes to this code they can just do a commit into their local index. In order to share this code with other developers on this same deployment they could just provide them with the Git link to this repository, or make a branch and add a deployment specific &#8220;remote&#8221; index that multiple developers could all push into.</p>
<p>Along the way as new code is released in the Ushahidi repository, these deployments could merge in these changes to their local branches without losing their local modifications. And conversely, local modifications could be merged and pushed back into the Ushahidi master index very easily.</p>
<h3>Moving sideways</h3>
<p>Now lets think about some <em>really</em> powerful uses of the Git architecture. Since the entire index is stored locally in a .git folder &#8211; it is easy to put an Ushahidi deploy on a USB stick or archived folder, send it around, make modifications in the field and continue to commit these changes to a local repository even while <em>offline</em>. Then when connectivity is restored, or the USB stick can be brought back to a networked computer, the modifications that had been made, and tracked, could be pushed back to a deployment or Ushahidi instance.</p>
<p>And with arbitrary remote indexes &#8211; individual deployments could share code and modifications between themselves without having to go through an Ushahidi instance. Local networks around an incident, culture, language, or feature set could easily collaborate and iterate the code. Imagine if in Gaza, the Al Jazeera instance could have shared code to other local organizations running similar systems.</p>
<p>I think there are even more potential applications of Git to distributed architectures that would be useful for document and database sharing that occur in fast paced situations. However, Git itself will have to work on some of the usability and interface design issues that make it a difficult tool for novice users.</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/git-as-a-tool-for-distributed-crisis-management-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails interfaces to Mac Applications</title>
		<link>http://highearthorbit.com/rails-interfaces-to-mac-applications/</link>
		<comments>http://highearthorbit.com/rails-interfaces-to-mac-applications/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 14:26:57 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/rails-interfaces-to-mac-applications/</guid>
		<description><![CDATA[The new version of Mac OS X, Leopard, came with a much anticipated feature &#8211; an officially supported set of Ruby bridges to Cocoa (the Mac OS X Framework) and AppleScript. Digging around I couldn&#8217;t find the pre-installed versions, but it was easy enough to gem install rb-appscript
I&#8217;ve been playing around with the very complete [...]]]></description>
			<content:encoded><![CDATA[<p>The new version of Mac OS X, Leopard, came with a much anticipated feature &#8211; an officially supported set of Ruby bridges to Cocoa (the Mac OS X Framework) and AppleScript. Digging around I couldn&#8217;t find the pre-installed versions, but it was easy enough to <code>gem install rb-appscript</code></p>
<p>I&#8217;ve been playing around with the very complete examples over the last couple of days and am really impressed with how easy it is to build <em>Cocoa</em> apps in just a few lines of Ruby code and using the new InterfaceBuilder. You get full-fledged support of all OS X&#8217;s goodness without having to worry about Objective-C. </p>
<p>However, I hadn&#8217;t fully considered some of the implications of this until I was stumbled across the open-source <a href="http://omnifocus-ui.rubyforge.org/svn/trunk/README" title="">OmniFocus-UI</a>. It is a Rails app written as an iPhone interface to the Productivity application (<abbr title="Getting Things Done">GTD</abbr>) <a href="http://www.omnigroup.com/applications/omnifocus/" title="The Omni Group - OmniFocus">OmniFocus</a>. It essentially provides a very lightweight web interface to the application by way of the AppleScript interface. <a href="http://rb-appscript.rubyforge.org/" title="rb-appscript">rb-appscript</a> and <a href="http://rubyosa.rubyforge.org/" title="RubyOSA: Ruby/AppleEvent Bridge">RubyOSA</a> are two Ruby AppleScript bridges that make AppleScript actually really nice to work with. </p>
<p>The fact that it&#8217;s a Rails app is almost silly. There is no database connection to speak of. All storage and primary functionality is handled by the app itself. OmniFocus-UI could probably be rewritten as a Camping or Merb application very easily with a much smaller footprint. </p>
<p>The way the Rails app works is that the controllers just route commands via rb-appscript. So when you want a list of contexts (organization of todos), the Rails app just needs to do the following in Ruby:</p>
<pre>
require 'appscript'
doc = Appscript.app("OmniFocus").default_document
doc.contexts.get.length
</pre>
<p>Or to see how many Inbox items you have:</p>
<pre>
doc.inbox_tasks.count
</pre>
<p>If instead you want to use RubyOSA, it&#8217;s really just the Class name that changes (and some more underlying bits):</p>
<pre>
require 'rbosa'
doc = OSA.app("OmniFocus").default_document
</pre>
<p>What this means is, it&#8217;s very easy to build web interfaces on top of any AppleScript-able Mac application. The one difficulty, however, is configuring your Mac to make it easily externally accessible from anywhere on the Web. If you&#8217;re handy on IT, you can always setup port-forwarding on your router. </p>
<p>However, if you just want setup &amp; forget, you should check out <a href="http://goprism.com" title="Prism">Prism</a> (<a href="http://goprism.com" title="Prism">http://goprism.com</a>) &#8211; which creates secure, private web accessible connections to your home computer. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/apple" title="See the Technorati tag page for 'apple'." rel="tag">apple</a>, <a href="http://technorati.com/tag/macosx" title="See the Technorati tag page for 'macosx'." rel="tag">macosx</a>, <a href="http://technorati.com/tag/leopard" title="See the Technorati tag page for 'leopard'." rel="tag">leopard</a>, <a href="http://technorati.com/tag/rails" title="See the Technorati tag page for 'rails'." rel="tag">rails</a>, <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/rubyosa" title="See the Technorati tag page for 'rubyosa'." rel="tag">rubyosa</a>, <a href="http://technorati.com/tag/scripting" title="See the Technorati tag page for 'scripting'." rel="tag">scripting</a>, <a href="http://technorati.com/tag/bridge" title="See the Technorati tag page for 'bridge'." rel="tag">bridge</a>, <a href="http://technorati.com/tag/prism" title="See the Technorati tag page for 'prism'." rel="tag">prism</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/rails-interfaces-to-mac-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug in open-uri when dealing with multiple headers</title>
		<link>http://highearthorbit.com/bug-in-nethttp-when-dealing-with-multiple-headers/</link>
		<comments>http://highearthorbit.com/bug-in-nethttp-when-dealing-with-multiple-headers/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 15:45:56 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/bug-in-nethttp-when-dealing-with-multiple-headers/</guid>
		<description><![CDATA[I just discovered a bug in Ruby&#8217;s open-uri library, caused by the Net::HTTP library, or at best really annoying behavior that will break when you try and use it. The problem lies in dealing with an HTTP request that returns multiple values for a field. This forum topic discusses that having multiple instances of a [...]]]></description>
			<content:encoded><![CDATA[<p>I just discovered a bug in Ruby&#8217;s open-uri library, caused by the Net::HTTP library, or at best really annoying behavior that <em>will break</em> when you try and use it. The problem lies in dealing with an HTTP request that returns multiple values for a field. <a href="http://rubyforge.org/tracker/?func=detail&amp;aid=12775&amp;group_id=1306&amp;atid=5145" title="RubyForge: Multiple x-forwarded-for header fields">This forum topic discusses</a> that having multiple instances of a field is valid in HTTP1.1 (RFC2616). </p>
<p>So when you use Net::HTTP to fetch a document like this, it will create an array for every field, holding each value found for the field. That&#8217;s great. However, in open-uri#last_modified then gets this array and joins the values together to get a single string. </p>
<p>The example I ran into is the <em>Last-Modified</em> field. Given HTTP headers like this:</p>
<pre>
HTTP/1.1 200 OK
Server: Undisclosed-Webserver/0.1
Date: Tue, 14 Aug 2007 15:03:29 GMT
Last-modified: Tue, 14 Aug 2007 15:03:29 GMT
Content-type: application/vnd.google-earth.kml+xml
Last-modified: Wed, 08 Aug 2007 18:34:55 GMT
Connection: close
</pre>
<p>And then calling <code>response.each_header {|f,v| puts "#{f}: #{v}"}</code> will result in <code>Last-Modified: "Tue, 14 Aug 2007 15:21:22 GMT, Wed, 08 Aug 2007 18:34:55 GMT"</code>. Go ahead and try throwing <code>Time.httpdate</code> at that. You&#8217;ll get <code>ArgumentError: not RFC 2616 compliant date:</code>. </p>
<p>To simply recreate this bug, try the following ruby code:</p>
<pre>
require 'open-uri'
res = open("http://popsci.com/popsci/kml/popsci_future_environment.kml")
res.last_modified
</pre>
<p>A simple solution, or workaround, is to just get the hash and deal with it yourself: <code>response.to_hash.each {|f,v| puts "#{f}: #{v}"} # => last-modified: "Tue, 14 Aug 2007 15:21:22 GMT</code> </p>
<p>I&#8217;m not going to mention any names on this particular offending party that was silly to include 2 Last-Modified dates, but <a href="http://www.popsci.com/" title="Popular Science">you know who you are</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/bug-in-nethttp-when-dealing-with-multiple-headers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TwitterVision (geo-twitter) API</title>
		<link>http://highearthorbit.com/twittervision-geo-twitter-api/</link>
		<comments>http://highearthorbit.com/twittervision-geo-twitter-api/#comments</comments>
		<pubDate>Thu, 19 Apr 2007 16:12:55 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Geo]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/twittervision-geo-twitter-api/</guid>
		<description><![CDATA[I haven&#8217;t gotten a chance to play with it much yet, as I&#8217;m still on travel, but Dave Troy released a simple, effective API to his TwitterVision work with geolocating twits. 
The TwitterVision API looks like it was built on Rails, which means it is probably a very slick/simple addition for him to expose the [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t gotten a chance to play with it much yet, as I&#8217;m still on travel, but Dave Troy released a simple, effective API to his <a href="http://twittervision.com">TwitterVision</a> work with geolocating twits. </p>
<p>The <a href="http://api.twittervision.com/api.html" title="TwitterVision API">TwitterVision API</a> looks like it was built on Rails, which means it is probably a very slick/simple addition for him to expose the data in XML, YAML, and JSON.</p>
<p>No sign of GeoRSS explicitly yet, so you can&#8217;t subscribe to just a feed of your friends&#8217; locations, but that would again be something simple to add (and he does hint there is more coming), or for someone else to build on using his API. </p>
<p>One issue that still remains is if forcing a user to specify the &#8220;l:&#8221; prefix to a location is a usable/effective mechansism. Typing a colon (:) on a mobile phone isn&#8217;t the easiest thing to do, but at the same time using other characters such as a tilde (~) are often stripped out or munged by SMS gateways.</p>
<p>A more natural language parsing option would be interesting, but processing is intense with potentially very unclear results (&#8217;Sitting at the bar&#8217;, &#8216;Leaving home to go into town&#8217;) and also privacy or desire of the user to sometimes not share their location.</p>
<p>Using simple symbols, like parenths: Caffeine good (Sweetwaters Cafe)<br />
would be a good option, since the location may not actually be part of my message, but I do want to share it.</p>
<p>As for parsing, something like <a href="http://thinkwhere.wordpress.com/2006/11/26/flickr-geocodr-a-k-means-cluster-enabled-geocoder/">Geocodr</a> would provide a very robust geocoding system where the system could parse both odd areas (Soma), buildings/areas (Empire State Building), or even events (Web2.0 Expo).</p>
<p>So the main points are to allow opt-in based on my desire to share location (or destination), simple to enter on a mobile/laptop/brain implant, and optional location specification outside of the actual primary message content. And the issue applies outside of just Twitter, which really just serves as a good context. How would this be done in voice command for directions or location?</p>
<p>But again, needs to be simple and understandable. Don&#8217;t you like simple problems? </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/twittervision-geo-twitter-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails case study</title>
		<link>http://highearthorbit.com/ruby-on-rails-case-study/</link>
		<comments>http://highearthorbit.com/ruby-on-rails-case-study/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 13:56:01 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/ruby-on-rails-case-study/</guid>
		<description><![CDATA[Allan from the NonProfitTechBlog pointed me to this article on infoQ, Ruby on Rails case study: ChangingThePresent.org.
The article does a full walk-through, from concept, through development, and to scalability, deliverability, and maintainability, of a Ruby on Rails site/service. 
Discussions (arguments) between the various languages and their frameworks are common. It&#8217;s helpful to see such a [...]]]></description>
			<content:encoded><![CDATA[<p>Allan from the <a href="http://www.nonprofittechblog.org/" rel="coworker">NonProfitTechBlog</a> pointed me to this article on infoQ, <a href="http://www.infoq.com/articles/changing-the-present-case-stud" title="Ruby on Rails case study: ChangingThePresent.org">Ruby on Rails case study: ChangingThePresent.org</a>.</p>
<p>The article does a full walk-through, from concept, through development, and to scalability, deliverability, and maintainability, of a Ruby on Rails site/service. </p>
<p>Discussions (arguments) between the various languages and their frameworks are common. It&#8217;s helpful to see such a readable and poignant presentation of the entire process to address the various issues other developers bring up about the platform. </p>
<p>I have definitely seen the same effects he talks about in the article. Development and updates occur much faster. I can be more productive creating my ideas and getting them to a working prototype. The code is easy to read and small, so its also easy to maintain the code to optimize or extend with new features. </p>
<p>I&#8217;m not saying that the other languages or frameworks fail at this, I know that for me, it feels like its the fastest development I can do short of natural language requirements into code (&#8221;Make me a Map&#8221; <ding!>)</p>
<p class="tags">Tags: <a href="http://technorati.com/tag/rubyonrails" title="See the Technorati tag page for 'rubyonrails'." rel="tag">rubyonrails</a>, <a href="http://technorati.com/tag/casestudy" title="See the Technorati tag page for 'casestudy'." rel="tag">casestudy</a>, <a href="http://technorati.com/tag/business" title="See the Technorati tag page for 'business'." rel="tag">business</a>, <a href="http://technorati.com/tag/webdevelopment" title="See the Technorati tag page for 'webdevelopment'." rel="tag">webdevelopment</a>, <a href="http://technorati.com/tag/infoq" title="See the Technorati tag page for 'infoq'." rel="tag">infoq</a>, <a href="http://technorati.com/tag/changingthepresent" title="See the Technorati tag page for 'changingthepresent'." rel="tag">changingthepresent</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/ruby-on-rails-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>open-uri and can&#8217;t convert Hash into String</title>
		<link>http://highearthorbit.com/open-uri-and-cant-convert-hash-into-string/</link>
		<comments>http://highearthorbit.com/open-uri-and-cant-convert-hash-into-string/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 04:03:06 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/open-uri-and-cant-convert-hash-into-string/</guid>
		<description><![CDATA[I&#8217;m posting this in hopes that search engines grab it and put it at the top of their list when other poor soul&#8217;s run into this problem.
If you&#8217;re trying to grab a web resource using Open-URI, and you are using basic authentication (username/password) then you&#8217;ll need to make sure to require 'open-uri' or you&#8217;ll get:

open("http://example.com/site", [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m posting this in hopes that search engines grab it and put it at the top of their list when other poor soul&#8217;s run into this problem.</p>
<p>If you&#8217;re trying to grab a web resource using <a href="http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/classes/OpenURI.html">Open-URI</a>, and you are using basic authentication (username/password) then you&#8217;ll need to make sure to <code>require 'open-uri'</code> or you&#8217;ll get:</p>
<pre>
open("http://example.com/site", :http_basic_authentication => ["username", "password"])
TypeError: can't convert Hash into String
</pre>
<p>Of course, then you toss some yummy <a href="http://code.whytheluckystiff.net/hpricot/" title="Hpricot">Hpricot</a> into the mix for parsing/scraping the good bits of the HTML.</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/open-uri-and-cant-convert-hash-into-string/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Sunlight Datakit &#8211; Congress in your App</title>
		<link>http://highearthorbit.com/sunlight-datakit-congress-in-your-app/</link>
		<comments>http://highearthorbit.com/sunlight-datakit-congress-in-your-app/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 16:09:24 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Mashup]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/sunlight-datakit-congress-in-your-app/</guid>
		<description><![CDATA[Sunlight Labs has released a public API, their Sunlight Datakit. It&#8217;s a straight-forward, simple API for getting access to their Civic data, like Congressional Representatives, zipcodes, timezones, and some geographic information.

There is some basic information about elected representatives that makes politico mashups easier: the ability to tie a name to a state, the district and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sunlightlabs.com" title="Sunlight Labs homepage">Sunlight Labs</a> has released a public API, their <a href="http://sunlightlabs.com/datakit/" title="Sunlight Labs Datakit">Sunlight Datakit</a>. It&#8217;s a straight-forward, simple API for getting access to their Civic data, like Congressional Representatives, zipcodes, timezones, and some geographic information.</p>
<blockquote><p>
There is some basic information about elected representatives that makes politico mashups easier: the ability to tie a name to a state, the district and zip codes that they represent, their office telephone number, and so on. We have put together a simple labs &#8220;datakit&#8221; that does this for us, drawing from several publicaly available data sources. We are making this fully available and have provided a fully documented API for the methods we have developed for those sources. Find out about the datakit here.
</p></blockquote>
<p>Of course, any API needs a nice little client to tie it into your applications. Here is my Ruby client. It&#8217;s very simple, because is uses the fallback <code>method_missing</code> to handle any function passed to the class. This also allows the class to be extended by implementing specific methods if more processing of the response is needed.</p>
<pre><span class="ident">require</span> <span class="punct">'</span><span class="string">open-uri</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">rexml/document</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">cgi</span><span class="punct">'</span>
<span class="constant">SUNLIGHT_HOST</span> <span class="punct">=</span> <span class="punct">'</span><span class="string">http://sunlightlabs.com/datakit/</span><span class="punct">'</span>

<span class="keyword">class </span><span class="class">Sunlight</span>
  <span class="keyword">def </span><span class="method">self.method_missing</span><span class="punct">(</span><span class="ident">service_method</span><span class="punct">,</span> <span class="punct">*</span><span class="ident">args</span><span class="punct">)</span>
    <span class="ident">params</span> <span class="punct">=</span> <span class="ident">args</span><span class="punct">[</span><span class="number">0</span><span class="punct">].</span><span class="ident">collect</span> <span class="punct">{|</span><span class="ident">k</span><span class="punct">,</span><span class="ident">v</span><span class="punct">|</span> <span class="constant">CGI</span><span class="punct">.</span><span class="ident">escape</span><span class="punct">(</span><span class="ident">k</span><span class="punct">.</span><span class="ident">to_s</span><span class="punct">)</span> <span class="punct">+</span> <span class="punct">'</span><span class="string">=</span><span class="punct">'</span> <span class="punct">+</span> <span class="constant">CGI</span><span class="punct">.</span><span class="ident">escape</span><span class="punct">(</span><span class="ident">v</span><span class="punct">.</span><span class="ident">to_s</span><span class="punct">)}.</span><span class="ident">join</span><span class="punct">('</span><span class="string">&amp;</span><span class="punct">')</span>
    <span class="ident">url</span> <span class="punct">=</span> <span class="constant">SUNLIGHT_HOST</span> <span class="punct">+</span> <span class="ident">service_method</span><span class="punct">.</span><span class="ident">to_s</span> <span class="punct">+</span> <span class="punct">&quot;</span><span class="string">?</span><span class="punct">&quot;</span> <span class="punct">+</span> <span class="ident">params</span>
    <span class="ident">open</span><span class="punct">(</span><span class="ident">url</span><span class="punct">).</span><span class="ident">read</span><span class="punct">.</span><span class="ident">split</span><span class="punct">(&quot;</span><span class="string">|</span><span class="punct">&quot;)</span>
  <span class="keyword">end</span>
<span class="keyword">end</span>

<span class="ident">resp</span> <span class="punct">=</span> <span class="constant">Sunlight</span><span class="punct">.</span><span class="ident">getDistrictFromZip5</span><span class="punct">({</span><span class="symbol">:zip</span> <span class="punct">=&gt;</span> <span class="number">20740</span><span class="punct">})</span>
<span class="ident">puts</span> <span class="ident">resp</span><span class="punct">.</span><span class="ident">inspect</span>
  <span class="comment"># MD:5</span>
  <span class="comment"># MD:4</span>

<span class="ident">resp</span> <span class="punct">=</span> <span class="constant">Sunlight</span><span class="punct">.</span><span class="ident">getRepresentativeNameFromCityState</span><span class="punct">({</span><span class="symbol">:city</span> <span class="punct">=&gt;</span> <span class="punct">'</span><span class="string">Detroit</span><span class="punct">',</span> <span class="symbol">:state</span> <span class="punct">=&gt;</span> <span class="punct">&quot;</span><span class="string">MI</span><span class="punct">&quot;})</span>
<span class="ident">puts</span> <span class="ident">resp</span><span class="punct">.</span><span class="ident">inspect</span>
  <span class="comment"># Kilpatrick, Carolyn C.</span>
  <span class="comment"># Conyers, John  Jr.</span>
  <span class="comment"># Levin, Sander M.</span>
  <span class="comment"># McCotter, Thaddeus G.</span>
  <span class="comment"># Dingell, John D.</span>
</pre>
<p>The Sunlight Datakit currently offers the following functions. Check out the <a href="http://sunlightlabs.com/datakit/" title="Sunlight labs datakit">documentation</a> for information on the parameters and returned values. </p>
<ul>
<li>getDistrictFromZip5</li>
<li>getStateFromZip5</li>
<li>getDistrictFromZip9</li>
<li>getStateFromZip9.php</li>
<li>getRepresentativeNameFromDistrict</li>
<li>getRepresentativePhoneNumberFromDistrict</li>
<li>getRepresentativeRoomNumberFromDistrict</li>
<li>getCityFromZip5</li>
<li>getCityStateFromZip5</li>
<li>getLatitudeFromCityState</li>
<li>getLongitudeFromCityState</li>
<li>getZipCodesFromCityState</li>
<li>getTimezoneFromCityState</li>
<li>getRepresentativeNameFromCityState</li>
<li>getRepresentativeNameFromState</li>
<li>getStateAbbreviationFromStateName</li>
<li>getStateNameFromStateAbbreviation</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/sunlight-datakit-congress-in-your-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MachineTags aka TripleTags in Flickr</title>
		<link>http://highearthorbit.com/machinetags-aka-tripletags-in-flickr/</link>
		<comments>http://highearthorbit.com/machinetags-aka-tripletags-in-flickr/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 17:37:56 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/machinetags-aka-tripletags-in-flickr/</guid>
		<description><![CDATA[It used to be just about sharing photos with friends, but now its so, so much more than that. 
Flickr announces Machine Tags, (via Mikel) which is formal support within Flickr&#8217;s database and API for what are also known as TripleTags, namespace:predicate=value.
Example:

geotagged
geo:lat=43.245
geo:lon=-83.211

The idea was to add some specific meaning to a set of data (photo) [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be just about sharing photos with friends, but now its so, so much more than that. </p>
<p><a href="http://www.flickr.com/groups/api/discuss/72157594497877875/">Flickr announces Machine Tags</a>, (via <a href="http://brainoff.com/weblog/2007/01/25/1224">Mikel</a>) which is formal support within Flickr&#8217;s database and API for what are also known as TripleTags, <code>namespace:predicate=value</code>.</p>
<p>Example:<br />
<code><br />
geotagged<br />
geo:lat=43.245<br />
geo:lon=-83.211<br />
</code></p>
<p>The idea was to add some specific meaning to a set of data (photo) in a way that was accessible to the user through the user interface. Savvy types would add keywords to the EXIF Metadata, but this is tedious, and this metadata is often stripped out when using some image conversion utilities for resizing/cropping/etc. Therefore, soon after the popularization of folksonomy, users found a way to also add &#8217;semantic&#8217; data. </p>
<p>However, this usage, while working, was not inherently supported. People used it as a way to find all their &#8216;geotagged&#8217; photos, or photos of forests, and so on. But parsing them and dealing with them was sometimes a pain from the developer perspective, and it also made a mess of your tag clouds or tag listings as you had all these one-time-use tags for the specific lat/lon point.</p>
<p>Now that Flickr internally supports machine tags in a good way, developers can really start using this as a way to attach arbitrary metadata to any data item (photo, etc.) <a href="http://geobloggers.com/archives/2007/01/24/offtopic-ish-flickr-ramps-up-triple-tag-support/">Dan Catt</a> gives a good discussion on what it all means and how it can be used. </p>
<p>I wonder if a <a href="http://microformats.org">Microformats</a>-like impromptu standards body will pop-up to help formalize the namespaces and predicates. Why &#8216;geotagged&#8217; and not &#8216;geolocated&#8217;, &#8216;geo&#8217;, &#8216;geomarked&#8217;, etc? While free-form naming is nice &#8211; so very <em>extensible</em>, being able to use a common vocabulary would also be nice. </p>
<p>Perhaps just accomodating current standards and applying them to the machine tags would be good without requiring any additional work. I&#8217;m thinking like <code>hcard:fn=andrewturner, hcard:url=http://highearthorbit.com, hcard:phone=555-1212</code>, etc.</p>
<h3>You the developer</h3>
<p>So, the end result to the developer is to check out the additional parameters to the <a href="http://www.flickr.com/services/api/flickr.photos.search.html">Flickr search method</a> in the API. There is now a <code>machine_tags</code> optional parameter that allows you to search by namespace, predicate, or value and use boolean constructions for these parameters.</p>
<p>Dan Catt even references Spimes as an excellent example of why machine tags can really empower devices, especially sensored/automated ones. And now that Flickr has no limits on uploads, you can create frequent update-rate sensored images.</p>
<p class="tags">Tags: <a href="http://technorati.com/tag/flickr" title="See the Technorati tag page for 'flickr'." rel="tag">flickr</a>, <a href="http://technorati.com/tag/semantic" title="See the Technorati tag page for 'semantic'." rel="tag">semantic</a>, <a href="http://technorati.com/tag/geo" title="See the Technorati tag page for 'geo'." rel="tag">geo</a>, <a href="http://technorati.com/tag/tags" title="See the Technorati tag page for 'tags'." rel="tag">tags</a>, <a href="http://technorati.com/tag/photography" title="See the Technorati tag page for 'photography'." rel="tag">photography</a>, <a href="http://technorati.com/tag/" title="See the Technorati tag page for ''." rel="tag"></a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/machinetags-aka-tripletags-in-flickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby &amp; Python Bindings officially part of Cocoa</title>
		<link>http://highearthorbit.com/ruby-python-bindings-officially-part-of-cocoa/</link>
		<comments>http://highearthorbit.com/ruby-python-bindings-officially-part-of-cocoa/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 19:47:56 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/ruby-python-bindings-officially-part-of-cocoa/</guid>
		<description><![CDATA[Leopard will officially support Ruby &#038; Python bindings in Cocoa which is terrific news. I&#8217;m a big fan of interpreted languages when appropriate.
Of course, there are about a dozen other very cool technologies for developers in Leopard that should really make application development, faster, better, and more fun. I&#8217;ve gotten a chance to play some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/leopard/overview/apptech.html">Leopard will officially support Ruby &#038; Python bindings in Cocoa</a> which is terrific news. I&#8217;m a big fan of interpreted languages when appropriate.</p>
<p>Of course, there are about a dozen other very cool technologies for developers in Leopard that should really make application development, faster, better, and more fun. I&#8217;ve gotten a chance to play some with Leopard previews, and the actual User-facing improvements are minimal. But what users will eventually get will be lots of better third-party applications. (via <a href="http://theocacao.com/document.page/373" title="Theocacoa">Theocacoa</a> and <a href="http://michael-mccracken.net/wp/?p=79">Michael McCracken</a>)</p>
<p>It&#8217;s great to see how much effort is going into not just creating slicker UI&#8217;s, but better supporting the people that really make or break an operating environment &#8211; developers. Microsoft has had a lot of developer support for quite awhile, and I constantly hear about various .NET meetings/presentations/technologies etc. Apple really kicked it off by releasing XCode for free (no &#8216;professional versions&#8217; need apply) and then having terrific Developer Documentation and examples. </p>
<p>The Leopard developer page makes some odd claims:</p>
<blockquote><p>
Mac users love to exchange quick messages, have video conferences, and collaborate on each other&#8217;s desktops across the network.
</p></blockquote>
<p>um&#8230; right, ok. I just <em>love</em> collaborating on your desktop. Anyways, I can&#8217;t wait to dive in and start developing on Leopard. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/macosx" title="See the Technorati tag page for 'macosx'." rel="tag">macosx</a>, <a href="http://technorati.com/tag/apple" title="See the Technorati tag page for 'apple'." rel="tag">apple</a>, <a href="http://technorati.com/tag/leopard" title="See the Technorati tag page for 'leopard'." rel="tag">leopard</a>, <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/python" title="See the Technorati tag page for 'python'." rel="tag">python</a>, <a href="http://technorati.com/tag/cocoa" title="See the Technorati tag page for 'cocoa'." rel="tag">cocoa</a>, <a href="http://technorati.com/tag/bindings" title="See the Technorati tag page for 'bindings'." rel="tag">bindings</a>, <a href="http://technorati.com/tag/objective-c" title="See the Technorati tag page for 'objective-c'." rel="tag">objective-c</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a>, <a href="http://technorati.com/tag/microsoft" title="See the Technorati tag page for 'microsoft'." rel="tag">microsoft</a>, <a href="http://technorati.com/tag/.net" title="See the Technorati tag page for '.net'." rel="tag">.net</a>, <a href="http://technorati.com/tag/theocacoa" title="See the Technorati tag page for 'theocacoa'." rel="tag">theocacoa</a>, <a href="http://technorati.com/tag/michaelmccracken" title="See the Technorati tag page for 'michaelmccracken'." rel="tag">michaelmccracken</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/ruby-python-bindings-officially-part-of-cocoa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Hardware</title>
		<link>http://highearthorbit.com/ruby-hardware-2/</link>
		<comments>http://highearthorbit.com/ruby-hardware-2/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 16:19:17 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Roomba]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/ruby-hardware-2/</guid>
		<description><![CDATA[On Wednesday at the SouthEast Michigan Ruby Brigade I gave a &#8216;lightning talk&#8217; on Ruby &#038; Hardware. It is a quick succession of slides (written using S5) on some of the cool hardware devices you can control with Ruby, or hardware you can control your computer with. 
It has includes examples and links to using [...]]]></description>
			<content:encoded><![CDATA[<p>On Wednesday at the <a href="http://rubymi.org" title="SouthEast Michigan Ruby Brigade">SouthEast Michigan Ruby Brigade</a> I gave a &#8216;lightning talk&#8217; on <a href="http://code.highearthorbit.com/presentations/RubyHardware/RubyHardware.html">Ruby &#038; Hardware</a>. It is a quick succession of slides (written using <a href="http://meyerweb.com/eric/tools/s5/" title="Eric Meyer's S5 homepage">S5</a>) on some of the cool hardware devices you can control with Ruby, or hardware you can control your computer with. </p>
<p>It has includes examples and links to using Ruby with:</p>
<ul>
<li>NabazTag</li>
<li>Symbian Mobile Phones</li>
<li>Nokia 770</li>
<li>Roomba vacuum cleaners</li>
<li>Apple Remotes (the kind you get with your MacBook/MacMini)</li>
<li>SlimDevices SqueezeBox and SlimServer</li>
<li>Lego Mindstorms NXT</li>
</ul>
<p>There are definitely more devices out there that can or <em>should</em> work with Ruby. Given <a href="http://ruby-serialport.rubyforge.org/" title="ruby-serialport homepage">ruby-serialport</a> it&#8217;s possible to control just about anything. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a>, <a href="http://technorati.com/tag/roomba" title="See the Technorati tag page for 'roomba'." rel="tag">roomba</a>, <a href="http://technorati.com/tag/nabaztag" title="See the Technorati tag page for 'nabaztag'." rel="tag">nabaztag</a>, <a href="http://technorati.com/tag/symbian" title="See the Technorati tag page for 'symbian'." rel="tag">symbian</a>, <a href="http://technorati.com/tag/nokia770" title="See the Technorati tag page for 'nokia770'." rel="tag">nokia770</a>, <a href="http://technorati.com/tag/apple" title="See the Technorati tag page for 'apple'." rel="tag">apple</a>, <a href="http://technorati.com/tag/squeezebox" title="See the Technorati tag page for 'squeezebox'." rel="tag">squeezebox</a>, <a href="http://technorati.com/tag/slimserver" title="See the Technorati tag page for 'slimserver'." rel="tag">slimserver</a>, <a href="http://technorati.com/tag/slimdevices" title="See the Technorati tag page for 'slimdevices'." rel="tag">slimdevices</a>, <a href="http://technorati.com/tag/brigade" title="See the Technorati tag page for 'brigade'." rel="tag">brigade</a>, <a href="http://technorati.com/tag/rubymi" title="See the Technorati tag page for 'rubymi'." rel="tag">rubymi</a>, <a href="http://technorati.com/tag/rubybrigade" title="See the Technorati tag page for 'rubybrigade'." rel="tag">rubybrigade</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/ruby-hardware-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Web3.0 &#8220;The Desktop&#8221; links</title>
		<link>http://highearthorbit.com/more-web30-the-desktop-links/</link>
		<comments>http://highearthorbit.com/more-web30-the-desktop-links/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 16:22:31 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/more-web30-the-desktop-links/</guid>
		<description><![CDATA[I talked a little while ago about the enlightening insight of understanding more about how the next phase of Applications will be &#8220;desktop-deployed web applications&#8221;. This was inspired/aided by listening to the brilliance of people like Matt Webb. Using standardized, hopefully cross-platform technologies, it&#8217;s possible to develop your application once, and &#8220;push&#8221; it to any [...]]]></description>
			<content:encoded><![CDATA[<p>I talked a little while ago about the enlightening insight of understanding more about how the next phase of Applications will be &#8220;desktop-deployed web applications&#8221;. This was inspired/aided by listening to the brilliance of people like <a href="http://interconnected.org/home/" title="Interconnected.org" rel="met">Matt Webb</a>. Using standardized, hopefully cross-platform technologies, it&#8217;s possible to develop your application once, and &#8220;push&#8221; it to any number of devices.</p>
<p><a href="http://highearthorbit.com/wp-content/uploads/2006/10/apollo_travel_big.jpg" title="Apollo Travel Application"><img src="http://highearthorbit.com/wp-content/uploads/2006/10/apollo_travel_big.thumbnail.jpg" align="right" hspace="5px" vspace="5px"/></a><a href="http://ajaxian.com/archives/adobe-apollo-at-max">Ajaxian discusses</a> Adobe&#8217;s new &#8220;Apollo&#8221;:<br />
<blockquote>Apollo is client-based software that will run Flash applications separately from a browser, whether online or offline</p></blockquote>
<p>The image shows an example travel application developed in Flash, and deployed to a desktop via Apollo. (via <a href="http://www.digitalbackcountry.com">Digital Backcountry</a>)</p>
<p>I also saw that <a href="http://factoryjoe.com/">Chris Messina</a> is helping out on a project <a href="http://webkit.pbwiki.com/">WebKit on Rails</a>, whose goal is to make it easier to deploy Apple&#8217;s WebKit and also to &#8220;come up with new ideas and practices that leverage the WebKit platform&#8221;. WebKit is an excellent platform to develop desktop web apps, as it can be baked straight into a Cocoa application, but be accessing a &#8220;web application&#8221; that may be running locally on the users&#8217; machine.</p>
<p><a href="http://code.google.com/p/rails-app-installer/" title="Rails App Installer">rails-app-installer</a> allows you to bundle and install/uninstall a Rails application, including required gems.<br />
<code><br />
   $ gem install my_app<br />
   $ my_app install /some/path<br />
</code></p>
<p class="tags">Tags: <a href="http://technorati.com/tag/web3.0" title="See the Technorati tag page for 'web3.0'." rel="tag">web3.0</a>, <a href="http://technorati.com/tag/desktop" title="See the Technorati tag page for 'desktop'." rel="tag">desktop</a>, <a href="http://technorati.com/tag/deployment" title="See the Technorati tag page for 'deployment'." rel="tag">deployment</a>, <a href="http://technorati.com/tag/rails" title="See the Technorati tag page for 'rails'." rel="tag">rails</a>, <a href="http://technorati.com/tag/webkit" title="See the Technorati tag page for 'webkit'." rel="tag">webkit</a>, <a href="http://technorati.com/tag/chrismessina" title="See the Technorati tag page for 'chrismessina'." rel="tag">chrismessina</a>, <a href="http://technorati.com/tag/mattwebb" title="See the Technorati tag page for 'mattwebb'." rel="tag">mattwebb</a>, <a href="http://technorati.com/tag/tixe" title="See the Technorati tag page for 'tixe'." rel="tag">tixe</a>, <a href="http://technorati.com/tag/adobe" title="See the Technorati tag page for 'adobe'." rel="tag">adobe</a>, <a href="http://technorati.com/tag/apollo" title="See the Technorati tag page for 'apollo'." rel="tag">apollo</a>, <a href="http://technorati.com/tag/railsappinstaller" title="See the Technorati tag page for 'railsappinstaller'." rel="tag">railsappinstaller</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/more-web30-the-desktop-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post-project brain dumps</title>
		<link>http://highearthorbit.com/621/</link>
		<comments>http://highearthorbit.com/621/#comments</comments>
		<pubDate>Thu, 26 Oct 2006 13:58:10 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/621/</guid>
		<description><![CDATA[Mikel has posted a how-to on how he made the OSM Nestoria Tiles for the recently released upgrades.
It&#8217;s a really good how-to for making your own maps from your own data, and also an excellent idea for brain-dumping after a big project. Whenever I do a large project, I learn a lot of useful tips, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://brainoff.com/weblog/2006/10/26/1198" title="Brainoff Weblog" rel="met">Mikel has posted</a> a how-to on how he <a href="http://wiki.openstreetmap.org/index.php/Making_the_nestoria_tiles">made the OSM Nestoria Tiles</a> for the <a href="http://highearthorbit.com/openstreetmaps-used-for-commercial-site/" title="High Earth Orbit: OSM used for commercial site" rel="me">recently released upgrades</a>.</p>
<p>It&#8217;s a really good how-to for making your own maps from your own data, and also an excellent idea for brain-dumping after a big project. Whenever I do a large project, I learn a lot of useful tips, strategies, what worked/didn&#8217;t work, etc. that is probably useful to a larger group of developers and users (for knowing what&#8217;s going on underneath). Not only for my own notes, but also anyone wanting to improve upon my work, or go and fix parts of it.</p>
<p>Documentation in engineering and software development is always emphasized and always a battle to get done. Inline documentation using something like <a href="http://doxygen.org" title="Doxygen">Doxygen</a> really helps, but then also putting together a single, simple overall report, especially on an editable format like a Wiki, can really make a big difference. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/nestoria" title="See the Technorati tag page for 'nestoria'." rel="tag">nestoria</a>, <a href="http://technorati.com/tag/osm" title="See the Technorati tag page for 'osm'." rel="tag">osm</a>, <a href="http://technorati.com/tag/tiles" title="See the Technorati tag page for 'tiles'." rel="tag">tiles</a>, <a href="http://technorati.com/tag/howto" title="See the Technorati tag page for 'howto'." rel="tag">howto</a>, <a href="http://technorati.com/tag/geo" title="See the Technorati tag page for 'geo'." rel="tag">geo</a>, <a href="http://technorati.com/tag/mapping" title="See the Technorati tag page for 'mapping'." rel="tag">mapping</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a>, <a href="http://technorati.com/tag/documentation" title="See the Technorati tag page for 'documentation'." rel="tag">documentation</a>, <a href="http://technorati.com/tag/doxygen" title="See the Technorati tag page for 'doxygen'." rel="tag">doxygen</a>, <a href="http://technorati.com/tag/mikelmaron" title="See the Technorati tag page for 'mikelmaron'." rel="tag">mikelmaron</a>, <a href="http://technorati.com/tag/brainoff" title="See the Technorati tag page for 'brainoff'." rel="tag">brainoff</a>, <a href="http://technorati.com/tag/" title="See the Technorati tag page for ''." rel="tag"></a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/621/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating a site from PHP to Rails</title>
		<link>http://highearthorbit.com/migrating-a-site-from-php-to-rails/</link>
		<comments>http://highearthorbit.com/migrating-a-site-from-php-to-rails/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 10:53:45 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/migrating-a-site-from-php-to-rails/</guid>
		<description><![CDATA[I learn best by picking a project and learning a new technology by applying it to the project. This is how I originally learned PHP, MySQL, and various web technologies when developing the Detroit Curling Club site/portal. Looking back, it&#8217;s amazing I got done what I did with what I knew. I implemented a Wiki, [...]]]></description>
			<content:encoded><![CDATA[<p>I learn best by picking a project and learning a new technology by applying it to the project. This is how I originally learned PHP, MySQL, and various web technologies when developing the <a href="http://detroitcurlingclub.com" title="Detroit Curling Club" rel="me">Detroit Curling Club</a> site/portal. Looking back, it&#8217;s amazing I got done what I did with what I knew. I implemented a Wiki, CMS, user management, uploading, RSS, and so forth, from the ground up, with no frameworks <shudder>. </p>
<p>However, the result also means the code is, shall we say, &#8220;spaghetti&#8221;. And is really no fun to maintain and add to. Since then, I&#8217;ve learned Ruby and Rails and really enjoy working in the language and framework and wanted to reimplement the site. With so many other projects going on, I was concerned about the time necessary to get the site migrated. </p>
<p>Actually, it was rather easy. by stroke of fortune. Here is how the work went.</p>
<h3>On the catwalk&#8230;</h3>
<p>By similar mindset, when I designed the original database schema, I used &#8220;rails-esque&#8221; naming: tables are plural, columns are simple singular names. Join tables are alphabetical of the two tables they are joining. I just had to migrate the names of a couple of tables and columns to mee the rails standard configuration. I could have overriden the table/column names, but didn&#8217;t want to deal with maintaining that. I really wanted the site to work like it was originally written with Rails in mind. </p>
<p>You&#8217;ve obviously created a Rails application by now, so I&#8217;ll skip that. Now, I have my database (with backups). Setup your <code>config/database.yml</code> to point to the database and then run <code>rake db:schema:dump</code> to create the schema.rb of the database. If you want, you can copy this to a migration file. </p>
<p>Next, install <a href="http://magicmodels.rubyforge.org/" title="Dr. Nic's Magic Models at RubyForge">Dr. Nic&#8217;s Magic Models</a>, which automagically give you your model files, associations, basic validations, and so forth with <em>no coding</em>. Magic just begins to describe it. You can verify this by bringing up <code>script/console</code> and toying with your models and associations.  </p>
<h3>Testing is good</h3>
<p>A good idea at this point is to load <a href="http://www.openqa.org/selenium-ide/" title="Selenium IDE">Selenium</a>, a web user-interface testing application, and walk over your original site to create user interface requirements based on current site design. This should stand as your base-line specification. In the end, your Rails app should act like your current application. </p>
<p>You can also check out the work of <a href='http://blog.hasmanythrough.com/articles/2006/08/27/validate-all-your-records' title='Has Many Through blog'>Josh Susser</a> who has a ruby script that will validate all the records in your database using your model validations.</p>
<p>Define your application test specification using <a href="http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1" title="Luke Redpath: Behaviour Driven Design">RSpec and BDD</a>. Again, you already have an existing web application to help define your desired functionality. </p>
<h3>The View, the View</h3>
<p>Now you have a your base application done. You should start migrating your views. Fill in your <code>layout/application.rhtml</code> with the base layout from your original HTML files.  </p>
<p>You&#8217;ll now need to start actually defining your controllers for various functionality: calendar, users, leagues, etc. Along the way, run your tests you defined with RSpec and verify operation. This is where the actual work comes in. Overall though, I find the design of Rails to make this very easy going. I just have to deal with various legacy functionality.</p>
<p>I&#8217;m also looking more at <a href="http://www.ujs4rails.com/" title="Unobtrusive Javascript for Rails">Unobtrusive Javascript for Rails</a> (ujs4rails) at how to handle graceful degradation (or is it graceful upgrading) to browsers that may not support javascript. </p>
<h3>Work in Progress</h3>
<p>That all said, migrating the site has been very easy. So easy I&#8217;m looking at migrating other projects to Rails. Of course, deploying Rails applications to shared hosts is not nearly as easy as deploying PHP ones. Especially with applications that are meant for other users to easily install on their own hosts. But the ease of development and maintenance is not easily overlooked. </p>
<p>If only Apache supported a built-in Rails module. <img src='http://highearthorbit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/migrating-a-site-from-php-to-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tesly is good Testing</title>
		<link>http://highearthorbit.com/tesly-is-good-testing/</link>
		<comments>http://highearthorbit.com/tesly-is-good-testing/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 04:13:56 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/tesly-is-good-testing/</guid>
		<description><![CDATA[Ben Curtis recently released Tesly Jr., is a great web service that runs through your Rails tests, formats the output, displays them, and allows you to share them with other people. It installs as a plugin in your Rails application. Whenever you run rake to test your app, it uploads the results automatically to the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://highearthorbit.com/wp-content/uploads/2006/10/tesly.png" title="Telsy Jr. Results" target="_new"><img src="http://highearthorbit.com/wp-content/uploads/2006/10/tesly.thumbnail.png" alt="Telsy Jr. Results" align="right" hspace="5px" vspace="5px"/></a><a href="http://www.bencurtis.com/archives/2006/10/html-test-reporter-for-rails/" title="Ben Curtis' Blog">Ben Curtis</a> recently released <a href="http://junior.tesly.com/ " title="Tesly Jr.">Tesly Jr.</a>, is a great web service that runs through your Rails tests, formats the output, displays them, and allows you to share them with other people. It installs as a plugin in your Rails application. Whenever you run <code>rake</code> to test your app, it uploads the results automatically to the Tesly Jr. server.</p>
<p>Using Tesly Jr., its very easy to keep your development team up to date with the status of the project. Combine this with <a href="http://blog.testingrails.com/2006/9/4/running-tests-on-deploy-with-capistrano" title="Testing Rails blog">runing tests on deploy</a> with Capistrano (via <a href="http://weblog.jamisbuck.org/2006/10/5/running-tests-on-deploy" title="Jamis Buck Weblog">Jamis Buck</a>) and you have a that much better integration of testing into your development and release cycle. </p>
<p>Tesly Jr. is free when using the hosted service, and available for just $24 if you want your own copy to run on your own systems. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/rails" title="See the Technorati tag page for 'rails'." rel="tag">rails</a>, <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a>, <a href="http://technorati.com/tag/rubyonrails" title="See the Technorati tag page for 'rubyonrails'." rel="tag">rubyonrails</a>, <a href="http://technorati.com/tag/teslyjr" title="See the Technorati tag page for 'teslyjr'." rel="tag">teslyjr</a>, <a href="http://technorati.com/tag/bencurtis" title="See the Technorati tag page for 'bencurtis'." rel="tag">bencurtis</a>, <a href="http://technorati.com/tag/testing" title="See the Technorati tag page for 'testing'." rel="tag">testing</a>, <a href="http://technorati.com/tag/capistrano" title="See the Technorati tag page for 'capistrano'." rel="tag">capistrano</a>, <a href="http://technorati.com/tag/jamisbuck" title="See the Technorati tag page for 'jamisbuck'." rel="tag">jamisbuck</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/tesly-is-good-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developer or Programmer?</title>
		<link>http://highearthorbit.com/developer-or-programmer/</link>
		<comments>http://highearthorbit.com/developer-or-programmer/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 21:49:52 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/developer-or-programmer/</guid>
		<description><![CDATA[There is a good article on Developers are from Mars, Programmers are from Venus. Comparing the two terms that are often interchanged, but really imply different meanings.
I first noticed this when deciding what I wanted to do in Undergraduate studies. Computer Science was hot stuff in the late &#8217;90&#8217;s, but it really seemed like companies [...]]]></description>
			<content:encoded><![CDATA[<p>There is a good article on <a href="http://www.hacknot.info/hacknot/action/showEntry?eid=90" title="Hacknot">Developers are from Mars, Programmers are from Venus</a>. Comparing the two terms that are often interchanged, but really imply different meanings.</p>
<p>I first noticed this when deciding what I wanted to do in Undergraduate studies. Computer Science was hot stuff in the late &#8217;90&#8217;s, but it really seemed like companies weren&#8217;t looking for Computer Scientists, they were really looking for Software Engineers, Developers, and Programmers (all different jobs with different skills, personalities, and types of work). </p>
<p>Computer Scientists really should be developing &#8220;formal specifications of a programming language&#8221;, whereas Software Engineers should be figuring out how to scale out a database, or apply domain specific solutions.</p>
<p>Of course, I ended up doing Aerospace Engineering, but with a Computer Science Minor. The CS minor let me take C++ instead of Fortran, and also have courses where I actually learned how to do requirements documentation, work in a team, design and build large scale systems in a single semester &#8211; all skills I didn&#8217;t learn in the Aerospace department but have since applied to my work. </p>
<p>I firmly believe that in the near future, all engineers/scientists should/will learn how to program. It is becoming a basic skill necessary to do proper analysis. Given a little bit of programming ability, an engineer can relieve themselves of copying &#038; pasting from Excel to MatLab or other such silly things. Teach them good programming and software design techniques, in a modern and easy to use language with good tools, like Python (and then SciPy and NumPy) and they can be much more effective designers and analyzers. Also, if they learn general, good technique, they can apply that ability to learning other languages that may be specific to their domain.</p>
<p>And no, learning Fortran (or Java) is <strong>not</strong> going to cut it. </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/developer-or-programmer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby Hardware</title>
		<link>http://highearthorbit.com/ruby-hardware/</link>
		<comments>http://highearthorbit.com/ruby-hardware/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 03:08:48 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/ruby-hardware/</guid>
		<description><![CDATA[I put together a presentation that didn&#8217;t get time at the first AnnArbor.rb meeting. The topic is &#8220;Ruby &#038; Hardware&#8221; and is a quick rundown of some cool devices that can run (or be interfaced by) Ruby, such as NabazTag, SqueezeBox, Nokia 770. They&#8217;re all at various levels of support and functionality, but you can [...]]]></description>
			<content:encoded><![CDATA[<p>I put together a presentation that didn&#8217;t get time at the first <a href="http://rubymi.org" title="RubyMI.org homepage">AnnArbor.rb</a> meeting. The topic is &#8220;Ruby &#038; Hardware&#8221; and is a quick rundown of some cool devices that can run (or be interfaced by) Ruby, such as NabazTag, SqueezeBox, Nokia 770. They&#8217;re all at various levels of support and functionality, but you can run Ruby on all of them. </p>
<p>Check out the presentation here: <a href="http://code.highearthorbit.com/presentations/RubyHardware/" title="Ruby &#038; Hardware presentation" rel="me">Ruby &#038; Hardware</a>. </p>
<p>I&#8217;ll be talking about them at the November AnnArbor.rb/<a href="http://rubymi.org" title="RubyMI.org homepage">RubyMI</a> meeting if you want to come by. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/gadgets" title="See the Technorati tag page for 'gadgets'." rel="tag">gadgets</a>, <a href="http://technorati.com/tag/hardware" title="See the Technorati tag page for 'hardware'." rel="tag">hardware</a>, <a href="http://technorati.com/tag/presentation" title="See the Technorati tag page for 'presentation'." rel="tag">presentation</a>, <a href="http://technorati.com/tag/nokia" title="See the Technorati tag page for 'nokia'." rel="tag">nokia</a>, <a href="http://technorati.com/tag/slimserver" title="See the Technorati tag page for 'slimserver'." rel="tag">slimserver</a>, <a href="http://technorati.com/tag/squeezebox" title="See the Technorati tag page for 'squeezebox'." rel="tag">squeezebox</a>, <a href="http://technorati.com/tag/nabaztag" title="See the Technorati tag page for 'nabaztag'." rel="tag">nabaztag</a>, <a href="http://technorati.com/tag/roomba" title="See the Technorati tag page for 'roomba'." rel="tag">roomba</a>, <a href="http://technorati.com/tag/michigan" title="See the Technorati tag page for 'michigan'." rel="tag">michigan</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/ruby-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>42.291599 -83.712446</georss:point>
	</item>
		<item>
		<title>Writing Microformats</title>
		<link>http://highearthorbit.com/writing-microformats/</link>
		<comments>http://highearthorbit.com/writing-microformats/#comments</comments>
		<pubDate>Thu, 28 Sep 2006 21:08:51 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[microformats]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/writing-microformats/</guid>
		<description><![CDATA[Besides consuming Microformats &#8211; it&#8217;s useful to know how to produce them. Assaf Arkin has extracted a  Microformat Helper from his scrAPI plugin. It supports hAtom, basic hCard, and the datetime design pattern currently &#8211; and should be easy to add some more microformats. Check out his Microformat Helper Cheatsheet if you&#8217;re addicted to [...]]]></description>
			<content:encoded><![CDATA[<p>Besides consuming Microformats &#8211; it&#8217;s useful to know how to produce them. Assaf Arkin has extracted a  <a href='http://www.agilewebdevelopment.com/plugins/microformat_helper' title='Rails Microformat Helper'>Microformat Helper</a> from his scrAPI plugin. It supports hAtom, basic hCard, and the datetime design pattern currently &#8211; and should be easy to add some more microformats. Check out his <a href="http://blog.labnotes.org/?s=microformats">Microformat Helper Cheatsheet</a> if you&#8217;re addicted to that sort of thing. </p>
<p>Out of the Ruby realm, BlogHelper has a good set of tools and howtos for <a href="http://bloghelper.is-there.net/using-microformats-in-wordpress/" title="BlogHelper blog">Using Microformats in WordPress</a>.</p>
<p class="tags">Tags: <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/microformatsstandards" title="See the Technorati tag page for 'microformatsstandards'." rel="tag">microformatsstandards</a>, <a href="http://technorati.com/tag/" title="See the Technorati tag page for ''." rel="tag"></a>, <a href="http://technorati.com/tag/hatom" title="See the Technorati tag page for 'hatom'." rel="tag">hatom</a>, <a href="http://technorati.com/tag/assafarkin" title="See the Technorati tag page for 'assafarkin'." rel="tag">assafarkin</a>, <a href="http://technorati.com/tag/cheatsheet" title="See the Technorati tag page for 'cheatsheet'." rel="tag">cheatsheet</a>, <a href="http://technorati.com/tag/wordpress" title="See the Technorati tag page for 'wordpress'." rel="tag">wordpress</a>, <a href="http://technorati.com/tag/bloghelper" title="See the Technorati tag page for 'bloghelper'." rel="tag">bloghelper</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/writing-microformats/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yahoo! does Ruby!</title>
		<link>http://highearthorbit.com/yahoo-does-ruby/</link>
		<comments>http://highearthorbit.com/yahoo-does-ruby/#comments</comments>
		<pubDate>Sat, 23 Sep 2006 23:57:26 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/yahoo-does-ruby/</guid>
		<description><![CDATA[Yahoo!, has an addition to their quickly growing Developer Network, the Yahoo Developer Network: Ruby Center. (via  RubyBlog.de)
Yahoo has really impressed me with their change from &#8220;annoying portal with too many links&#8221; to &#8220;doing lots of cool stuff and telling people how to use it too&#8221;. Their developer network is a great resource for [...]]]></description>
			<content:encoded><![CDATA[<p>Yahoo!, has an addition to their quickly growing Developer Network, the <a href="http://developer.yahoo.com/ruby/" title="Yahoo Developer Center for Ruby">Yahoo Developer Network: Ruby Center</a>. (via <a href="http://rubyblog.de/index.php/2006/09/22/yahoo-eroffnet-ruby-developer-center/" title="RubyBlog.de"> RubyBlog.de</a>)</p>
<p>Yahoo has really impressed me with their change from &#8220;annoying portal with too many links&#8221; to &#8220;doing lots of cool stuff and telling people how to use it too&#8221;. Their developer network is a great resource for both just learning about a <a href="http://developer.yahoo.com/python/" title="Yahoo Developer Network: Python Center">language</a>/<a href="http://developer.yahoo.com/yui/" title="Yahoo User Interface library">tool</a>/<a href="http://developer.yahoo.com/ypatterns/" title="Yahoo design patterns">design pattern</a>, as well as how to leverage really deep and useful Yahoo resources within your own application. </p>
<p>Providing these resources is definitely in their own interests, such as <a href="http://developer.yahoo.com/ruby/ruby-cache.html" title="Yahoo Ruby: Caching">Cache Yahoo! Web Service Calls using Ruby</a>, but is also just a great service to the community. Their <a href="http://gallery.yahoo.com/" title="Yahoo Gallery">Gallery</a> is also a good place for interesting sites and project ideas. </p>
<p class="tags">Tags: <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/yahoo" title="See the Technorati tag page for 'yahoo'." rel="tag">yahoo</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/yahoo-does-ruby/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Converting table-based Calendars to hCalendar</title>
		<link>http://highearthorbit.com/converting-table-based-calendars-to-hcalendar/</link>
		<comments>http://highearthorbit.com/converting-table-based-calendars-to-hcalendar/#comments</comments>
		<pubDate>Thu, 07 Sep 2006 04:06:22 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[FOSS4G]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/converting-table-based-calendars-to-hcalendar/</guid>
		<description><![CDATA[I am looking over the FOSS4G Schedule of sessions. It&#8217;s all table based, and it&#8217;s somewhat difficult to find specific tracks, rooms, etc. So I took what was the table-based, non-semantic, calendar and converted it into a much more useful hCalendar output, which can be easily translated to iCal for your subscription fun using Brian [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://highearthorbit.com/wp-content/uploads/2006/09/foss4g_ical.png" title="Zoom into FOSS4G Calendar in iCal"><img src="http://highearthorbit.com/wp-content/uploads/2006/09/foss4g_ical.thumbnail.png" alt="FOSS4G Calendar in iCal" align='right' hspace='5px' vspace='5px'/></a>I am looking over the <a href='http://www.foss4g2006.org/conferenceTimeTable.py?confId=1&#038;showDate=all&#038;showSession=all&#038;detailLevel=contribution&#038;viewMode=parallel' title='FOSS4G Schedule'>FOSS4G Schedule of sessions</a>. It&#8217;s all table based, and it&#8217;s somewhat difficult to find specific tracks, rooms, etc. So I took what was the table-based, non-semantic, calendar and converted it into a much more useful <a href='http://microformats.org/wiki/hcalendar' title='Microformats Wiki: hCalendar'>hCalendar</a> output, which can be easily translated to iCal for your subscription fun using <a href='http://suda.co.uk/' title="Brian Suda's homepage">Brian Suda&#8217;s</a> <a href="http://suda.co.uk/projects/X2V/" title="X2V conversion utility">X2V</a>.</p>
<p>You can get the <a href='http://code.highearthorbit.com/foss4g.html' title='FOSS4G hCalendar'>hCalendar here</a> and the <a href="http://suda.co.uk/projects/X2V/get-vcal.php?uri=http://code.highearthorbit.com/foss4g.html" title="FOSS4G iCal">iCal link here</a>.</p>
<h2>The Problem</h2>
<p>Here is the current HTML of the schedule. As you can see, this is an absolute mess of DOM. This table is in fact already the 4th embedded table (tables-within-tables-within-tables oh my!)</p>
<pre style="height: 150px;"><code>
<table align="center" width="100%">
<tr>
<td width="100%">
<table align="center" border="0" width="100%"
		 celspacing="0" cellpadding="0" bgcolor="#E6E6E6">
<tr>
<td colspan="12" align="center" bgcolor="white"><b>Tuesday, 12 September 2006</b></td>
</tr>
<tr>
<td colspan="12">
<table bgcolor="white" cellpadding="0"
      cellspacing="1" width="100%" style="padding:3px;
      border-top:1px solid #E6E6E6;border-bottom:1px solid #E6E6E6;">
<tr></tr>
</table>
</td>
</tr>
<tr>
<td valign="top" rowspan="12" bgcolor="white" width="40"><font color="gray" size="-1">07:00</font></td>
<td id="conf" valign="top" rowspan="24" align="center" bgcolor="#FFFFFF" style="color:#777777" width="11%" colspan="9" >
    <b>Registration</b><small>(Amphipôle (niv. 3): 07:00 - 09:00)</small>
  </td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td valign="top" rowspan="12" bgcolor="white" width="40"><font color="gray" size="-1">08:00</font></td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td valign="top" rowspan="12" bgcolor="white" width="40"><font color="gray" size="-1">09:00</font></td>
<td id="entry" valign="top" rowspan="42" align="center" bgcolor="#CCFFFF" style="color:#777777" width="11%">
<table width="100%">
<tr>
<td width="100%" align="center" style="">
   [20] <a href="/contributionDisplay.py?contribId=20&amp;sessionId=60&amp;confId=1" style="">Getting Started with MapServer</a>
   <small>by Mr. Jeff MCKENNA (DM Solutions Group)</small>
 </td>
<td align="right" valign="top" nowrap style="">
 <a href="/materialDisplay.py?contribId=20&amp;amp;sessionId=60&amp;amp;materialId=paper&amp;amp;confId=1"><img src="/images/smallPaper.gif" border="0" alt="paper"><small> paper</small></a>
  </td>
</tr>
</table>
</td>

</code></pre>
<p>In the middle there was some actual interesting bits, such as presentation title, author, times, etc. So what we need to do is walk through all this and build up a conference.</p>
<h2>The Solution</h2>
<p>Employing some slick Ruby scripting &#8211; and using the very useful  <a href='http://blog.labnotes.org/2006/07/11/scraping-with-style-scrapi-toolkit-for-ruby/' title='LabNotes blog: scrAPI'>scrAPI</a> from <a href='http://blog.labnotes.org/' title="Assaf's Blog, LabNotes">Assaf</a> we can define scrapers to walk over the multiple days, and then within those days grab each of the sessions. These are then output into proper hCalendar format like: </p>
<pre style="height: 150px;">
&lt;span class="vevent"&gt;
 &lt;a class="url" href="http://www.foss4g2006.org/contributionDisplay.py?contribId=189&amp;amp;sessionId=46&amp;amp;confId=1"&gt;
&nbsp;&nbsp;&lt;span class="summary"&gt;Enabling Users to Produce personalized Geodata&lt;/span&gt;
&nbsp;&nbsp;&lt;span class="details"&gt;&lt;span class="vcard"&gt;&lt;span class="fn"&gt;Mr. Andrew TURNER&lt;/span&gt;&lt;span class="org"&gt;HighEarthOrbit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&nbsp;&nbsp;&lt;abbr class="dtstart" title="2006-09-15T10:30:00Z"&gt;Friday,  15 September 2006 from 10:30&lt;/abbr&gt;-
&nbsp;&nbsp;&lt;abbr class="dtend" title="2006-09-15T11:00:00Z"&gt;11:00&lt;/abbr&gt;,
 at the &lt;span class="location"&gt;Amphimax MAX 350&lt;/span&gt;
 &lt;/a&gt;
&lt;/span&gt;
</pre>
<p>The code below makes parsing the nightmare above fairly simple, but due to the lack of any proper classes or id&#8217;s (each presentation is <code>id="entry"</code> &#8211; eep!), we have to find the bits we want by their current markup attributes. Not suggested, but at least this is nicer than trying to figure out the 10-levels of DOM starting at the root.</p>
<p>You can see the <a href="http://code.highearthorbit.com/foss4gcal.rb" title="FOSS4G Ruby parser">parser here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/converting-table-based-calendars-to-hcalendar/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RubyConf*MI &#8211; the word is &#8220;Testing&#8221;</title>
		<link>http://highearthorbit.com/rubyconfmi-the-word-is-testing/</link>
		<comments>http://highearthorbit.com/rubyconfmi-the-word-is-testing/#comments</comments>
		<pubDate>Mon, 28 Aug 2006 03:19:13 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/rubyconfmi-the-word-is-testing/</guid>
		<description><![CDATA[I went to my fourth conference this summer. Conferences, especially small ones, are a great chance to get quick insights into new ideas or technologies, but most importantly to share ideas with a lot of other people.
The presentations were good, many revolved around testing, with some talking about performance and deployment. There were very few [...]]]></description>
			<content:encoded><![CDATA[<p>I went to my fourth conference this summer. Conferences, especially small ones, are a great chance to get quick insights into new ideas or technologies, but most importantly to share ideas with a lot of other people.</p>
<p>The presentations were good, many revolved around testing, with some talking about performance and deployment. There were very few presentations of new novel ideas or techniques. That&#8217;s where discussions come in.</p>
<p>I&#8217;m a new Ruby programmer who came to the party by the way of the popular gateway drug, Rails. So I&#8217;m still behind on proper and good Ruby tools and techniques. <a href='http://on-ruby.blogspot.com/2006/08/rubyconfmi-wrap-up.html' title='On Ruby blog' rel='met'>Pat Eyler</a> gave an overview of various Ruby libraries for testing and performance such as <a href='http://testunit.talbott.ws/' title='test/unit'>test/unit</a>, <a href='http://www.zenspider.com/ZSS/Products/ZenTest/' title='autotest'>autotest</a>, unit_diff, <a href='http://rspec.rubyforge.org/' title='rspec'>rspec</a>, <a href='http://eigenclass.org/hiki.rb?rcov' title='rcov'>rcov</a>, <a href='http://rubyforge.org/projects/ruby-prof' title='ruby-prof'>ruby-prof</a>, and <a href='http://www.ruby-doc.org/stdlib/libdoc/benchmark/rdoc/index.html' title='benchmark'>benchmark</a>. </p>
<p>He sequed very well into <a href='http://rubymi.org' title='SouthEast Michigan Ruby Users Group'>SouthEast Michigan&#8217;s own</a> <a href="http://blog.hurleyhome.com/" title="Hurley's Harangue" rel="acquaintence">Patrick Hurley&#8217;s</a> talk on C optimization. Coming from a C/C++ background, knowing how easy it is to add small chunks of fast C code to <em>dramatically</em> speed up code (Patrick&#8217;s example showed a 20-times increase). </p>
<p>Back in Rails (esque) land, <a href='http://blogs.mktec.com/zdennis/' title='ZDennis Blog' rel='met'>Zach Dennis</a> talked about his <a href='http://blogs.mktec.com/zdennis/pages/ActiveRecord_Extensions' title='ActiveRecord Extensions'>ActiveRecord:Extensions</a> (AR:E). ActiveRecord isn&#8217;t Rails specific, but makes a big part of the functionality behind Rails. <a href='http://blogs.mktec.com/zdennis/pages/ActiveRecord_Extensions' title='ActiveRecord Extensions'>AR:E</a> adds a lot of very convenient functionality as well as speed improvements to database operations. </p>
<p>And of course, we made another pilgrimage to the Grand Rapids Brewing Comany.</p>
<p class="tags">Tags: <a href="http://technorati.com/tag/ruby" title="See the Technorati tag page for 'ruby'." rel="tag">ruby</a>, <a href="http://technorati.com/tag/conference" title="See the Technorati tag page for 'conference'." rel="tag">conference</a>, <a href="http://technorati.com/tag/rubyconfmi" title="See the Technorati tag page for 'rubyconfmi'." rel="tag">rubyconfmi</a>, <a href="http://technorati.com/tag/optimization" title="See the Technorati tag page for 'optimization'." rel="tag">optimization</a>, <a href="http://technorati.com/tag/programming" title="See the Technorati tag page for 'programming'." rel="tag">programming</a>, <a href="http://technorati.com/tag/pateyler" title="See the Technorati tag page for 'pateyler'." rel="tag">pateyler</a>, <a href="http://technorati.com/tag/patrickhurley" title="See the Technorati tag page for 'patrickhurley'." rel="tag">patrickhurley</a>, <a href="http://technorati.com/tag/activerecord" title="See the Technorati tag page for 'activerecord'." rel="tag">activerecord</a>, <a href="http://technorati.com/tag/activerecordextensions" title="See the Technorati tag page for 'activerecordextensions'." rel="tag">activerecordextensions</a>, <a href="http://technorati.com/tag/rcov" title="See the Technorati tag page for 'rcov'." rel="tag">rcov</a>, <a href="http://technorati.com/tag/testunit" title="See the Technorati tag page for 'testunit'." rel="tag">testunit</a>, <a href="http://technorati.com/tag/autotest" title="See the Technorati tag page for 'autotest'." rel="tag">autotest</a>, <a href="http://technorati.com/tag/rspec" title="See the Technorati tag page for 'rspec'." rel="tag">rspec</a>, <a href="http://technorati.com/tag/benchmark" title="See the Technorati tag page for 'benchmark'." rel="tag">benchmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/rubyconfmi-the-word-is-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

