Status
someone checked in 4.2GB of data files in my subversion repo. makes a global checkout "unfun"
Location
Alexandria, VA
Subscribe to GeoRSS Subscribe to KML


Programming

Writing Microformats

Published in Ruby, microformats


Besides consuming Microformats - it’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 - and should be easy to add some more microformats. Check out his Microformat Helper Cheatsheet if you’re addicted to that sort of thing.

Out of the Ruby realm, BlogHelper has a good set of tools and howtos for Using Microformats in WordPress.


Yahoo! does Ruby!

Published in Ruby


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 “annoying portal with too many links” to “doing lots of cool stuff and telling people how to use it too”. Their developer network is a great resource for both just learning about a language/tool/design pattern, as well as how to leverage really deep and useful Yahoo resources within your own application.

Providing these resources is definitely in their own interests, such as Cache Yahoo! Web Service Calls using Ruby, but is also just a great service to the community. Their Gallery is also a good place for interesting sites and project ideas.


Converting table-based Calendars to hCalendar

Published in FOSS4G, Programming, Ruby


FOSS4G Calendar in iCalI am looking over the FOSS4G Schedule of sessions. It’s all table based, and it’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 Suda’s X2V.

You can get the hCalendar here and the iCal link here.

The Problem

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!)


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.

The Solution

Employing some slick Ruby scripting - and using the very useful scrAPI from Assaf 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:

<span class="vevent">
 <a class="url" href="http://www.foss4g2006.org/contributionDisplay.py?contribId=189&amp;sessionId=46&amp;confId=1">
  <span class="summary">Enabling Users to Produce personalized Geodata</span>
  <span class="details"><span class="vcard"><span class="fn">Mr. Andrew TURNER</span><span class="org">HighEarthOrbit</span></span></span>
  <abbr class="dtstart" title="2006-09-15T10:30:00Z">Friday,  15 September 2006 from 10:30</abbr>-
  <abbr class="dtend" title="2006-09-15T11:00:00Z">11:00</abbr>,
 at the <span class="location">Amphimax MAX 350</span>
 </a>
</span>

The code below makes parsing the nightmare above fairly simple, but due to the lack of any proper classes or id’s (each presentation is id="entry" - 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.

You can see the parser here.


RubyConf*MI - the word is “Testing”

Published in Conference, Ruby


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 presentations of new novel ideas or techniques. That’s where discussions come in.

I’m a new Ruby programmer who came to the party by the way of the popular gateway drug, Rails. So I’m still behind on proper and good Ruby tools and techniques. Pat Eyler gave an overview of various Ruby libraries for testing and performance such as test/unit, autotest, unit_diff, rspec, rcov, ruby-prof, and benchmark.

He sequed very well into SouthEast Michigan’s own Patrick Hurley’s talk on C optimization. Coming from a C/C++ background, knowing how easy it is to add small chunks of fast C code to dramatically speed up code (Patrick’s example showed a 20-times increase).

Back in Rails (esque) land, Zach Dennis talked about his ActiveRecord:Extensions (AR:E). ActiveRecord isn’t Rails specific, but makes a big part of the functionality behind Rails. AR:E adds a lot of very convenient functionality as well as speed improvements to database operations.

And of course, we made another pilgrimage to the Grand Rapids Brewing Comany.


CSS & JS Solar System

Published in Javascript, Space


For your Friday Enjoyment: CSS Solar System (is that CSS again as a recursive Acronym?)

This was done with the increasingly popular jQuery, an up-and-coming javascript framework/library. (via Dr. Nic)



Tuesday, 12 September 2006
07:00 Registration(AmphipĂ´le (niv. 3): 07:00 - 09:00)
08:00
09:00
[20] Getting Started with MapServer by Mr. Jeff MCKENNA (DM Solutions Group) paper paper