Keeping it simple
For the Community Accounting web site I used Google Maps to display the locations of seventy organisations around the UK. I provided John, the administrator with a web page so that he could edit the locations by automatically geocoding postcodes. I stored the long/latitude in a MySQL database and generated the necessary javascript from within a Ruby on Rails application.
Now the administration side of this Rails application used a plugin called Active Scaffold. This broke when I upgraded to Rails 2.3.2 and I had a confusing time trying to get hold of the correct version of the plugin. I wasted quite a few hours trying to find the right version of Active Scaffold/Rails/Ruby/Passenger to work together and failed to get Active Scaffold going again. Which was a shame because it was useful.
This morning I realised that all along I should have been using Google My Maps, and not trying to use their geocoding service myself. Something like this;
View Community Accounting Services in the UK in a larger map
So I needed a kml file containing Placemarkers for all 67 organisations. They are all kept in a MySQL database and I thought about writing a little ruby script to generate the XML, or about doing it in vi with regular expressions. But then realised I already had a Rails application that listed every record. So I altered the index.html.erb file to generate the necessary kml and used the Google My Maps import facility to import the new kml.
Then I pasted the iframe code from Google into the Drupal page and John can now use a Google account to maintain the locations instead of relying on the broken Rails application.
Recently the continual changes in Rails, especially the non backwardly compatible ones have caused me to waste time. That’s kind of ironic given that its all supposed to be ‘Pragmatic’.
Then again I was guilty of being unpragmatic by writing a whole Rails application to do something that Google do for free.