<?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/"
	>

<channel>
	<title>corprewland &#187; geolocations</title>
	<atom:link href="http://www.corprew.org/blog/tag/geolocations/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.corprew.org</link>
	<description>(dis)information organization</description>
	<lastBuildDate>Thu, 04 Feb 2010 20:48:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>What I am up to at the moment</title>
		<link>http://www.corprew.org/blog/2009/03/08/what-i-am-up-to-at-the-moment/</link>
		<comments>http://www.corprew.org/blog/2009/03/08/what-i-am-up-to-at-the-moment/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 19:12:40 +0000</pubDate>
		<dc:creator>corprew</dc:creator>
				<category><![CDATA[computer programming]]></category>
		<category><![CDATA[location-based]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[geolocations]]></category>
		<category><![CDATA[hacketyhackhack]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.corprew.org/?p=191</guid>
		<description><![CDATA[This is more or less a good guide to what I am up to at the moment, although it should be noted that I&#8217;ve written this same code fragment in three languages in the last while (this is ruby, the others were PHP and Java, although the Java one was a festival of reflection due [...]]]></description>
			<content:encoded><![CDATA[<p>This is more or less a good guide to what I am up to at the moment, although it should be noted that I&#8217;ve written this same code fragment in three languages in the last while (this is ruby, the others were PHP and Java, although the Java one was a festival of reflection due to type wackiness.)</p>
<p>I actually have another version of the same code that puts a URL in the debug log that can be used to click directly to google maps.  Why?  I don&#8217;t know.  I&#8217;m beginning to value Aptana Studio&#8217;s remix of Eclipse more and more as time goes on though because I now have Java, PHP, and Ruby/Rails all in the same highly (mostly) performing IDE.  The alleged iPhone mode doesn&#8217;t work on my computer but I have CRAZY LIBERRIES installed at the moment and I suspect that that&#8217;s in large part my own fault &#8212; the apple tools still work.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#9966CC; font-weight:bold;">def</span> geo_desc <span style="color:#006600; font-weight:bold;">&#40;</span> geo_loc, extended = <span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>
     <span style="color:#008000; font-style:italic;">#</span>
     <span style="color:#008000; font-style:italic;">#  specialized pretty printer for address types.</span>
     <span style="color:#008000; font-style:italic;">#  note that there is pretty much a standard mixin for geo stuff and</span>
     <span style="color:#008000; font-style:italic;">#  this works across all the geocoding packages and model types.</span>
     <span style="color:#008000; font-style:italic;">#</span>
     <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#996600;">&quot;[nil location]&quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> geo_loc.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc = <span style="color:#996600;">&quot;[&quot;</span> 
     desc <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#006600; font-weight:bold;">&lt;</span> geo_loc.<span style="color:#9900CC;">country_code</span>.<span style="color:#9900CC;">downcase</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">country_code</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;.&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> geo_loc.<span style="color:#9900CC;">state</span>.<span style="color:#9900CC;">downcase</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">state</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;.&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> geo_loc.<span style="color:#9900CC;">city</span>.<span style="color:#9900CC;">downcase</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">city</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;.&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> geo_loc.<span style="color:#9900CC;">zip</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">zip</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;] &quot;</span>
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;[&quot;</span>
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> geo_loc.<span style="color:#9900CC;">lat</span>.<span style="color:#9900CC;">to_s</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">lat</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;,&quot;</span>
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> geo_loc.<span style="color:#9900CC;">lng</span>.<span style="color:#9900CC;">to_s</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">lng</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">precision</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>? <span style="color:#9966CC; font-weight:bold;">or</span> geo_loc.<span style="color:#9900CC;">precision</span> == <span style="color:#996600;">&quot;unknown&quot;</span>
       desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot; (&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> geo_loc.<span style="color:#9900CC;">precision</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;)&quot;</span> 
     <span style="color:#9966CC; font-weight:bold;">else</span>
       desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot; ?&quot;</span>
     <span style="color:#9966CC; font-weight:bold;">end</span>
     desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot;]&quot;</span>
     <span style="color:#9966CC; font-weight:bold;">if</span> extended
       desc <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot; &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> geo_loc.<span style="color:#9900CC;">full_address</span> <span style="color:#9966CC; font-weight:bold;">unless</span> geo_loc.<span style="color:#9900CC;">full_address</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
     <span style="color:#9966CC; font-weight:bold;">end</span>
     <span style="color:#0000FF; font-weight:bold;">return</span> desc
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.corprew.org/blog/2009/03/08/what-i-am-up-to-at-the-moment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
