Andy Milk Interactive

Web site design and application development
  • rss
  • Home
  • About
  • Portfolio
  • Clients
  • Skills and Services
  • Edge and Approach
  • PR & Comm
  • Contact

Geocoding, a must-have for social networking apps

andymilk | December 23, 2008

I just started working on the “Find a Friend” portion of a social networking project, and I realized that I’ll need to filter users by their locations.  I’ve integrated geocoding on apps before and performed basic lookups of cities and states using Google & Yahoo’s APIs.  I’ve banged out the calculations needed to find zip codes within a certain radius of another zip code.  This is my first time integrating geocoding into a Rails application and, to my delight and lack of surprise, someone has already built a plug-in that handles geocoding.

It’s called Geokit and you can find it here:  http://geokit.rubyforge.org

It can do a lot.  All you need is to add “lat” and “lng” float columns to the table that you need geocoding on.  Install the gem & plug-in and it’s a SNAP after that.  You can find the distance between two points, you can auto-geocode a location on the creation of an object, you can find all the objects within a certain distance radius.  This last piece of functionality is what I needed.

So in about 90 minutes, I was able to find Geokit, install it, retrofit my tables with lat and lng, auto-geocode my objects on create, and implement a “Find a Friend” lookup.  Similiar to Facebook, I want users who search for other users to find nearby users first, before searching the whole database of users.  For the most part, it’s a sort by distance and then search term.

One of the slickest details of Geokit is its use of multiple geocoding sources.  Here it is straight from their project page:  Geocoding from multiple providers. It currently supports Google, Yahoo, Geocoder.us, Genames, and Geocoder.ca geocoders, and it provides a uniform response structure from all of them. It also provides a fail-over mechanism, in case your input fails to geocode in one service.

Nicely done.

Comments
No Comments »
Categories
Tools
Comments rss Comments rss
Trackback Trackback

Drum roll please…

andymilk | December 15, 2008

I spent most of 2008 working on one project and it launched today. I’m very proud of it and I hope it’s a big success. It’s called Calisto100.com and it’s being billed as “an Exclusive Dating Site, the First Social Filter for Quality Singles.”

Here’s a press release about it: http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&newsId=20081215005349&newsLang=en

We kicked off the project early this year and it took a lot of hard work and a crystal clear vision from my client to pull it together.  On the technology side, it has quite a few bells and whistles from AJAX to image lightboxes to automated processes and many more.  The CSS is air tight and looks almost identical across the most widely used browsers (even IE6!)

Please visit the site and have a look around.  If this site is for you, PLEASE APPLY!

http://www.calisto100.com

picture-1

Comments
No Comments »
Categories
Projects
Tags
ajax, calisto100, dating, lightbox, prototype.js, rails, social networking
Comments rss Comments rss
Trackback Trackback

Use site uptime monitoring

andymilk | December 10, 2008

“What goes up, must come down”.  - Proverb

Wait, that’s a little boring.  How about:

“It’s a good thing we have gravity, or else when birds died they’d just stay right up there. Hunters would be all confused.” - Stephen Wright

Another service that hosting providers offer is some sort of uptime monitoring.  I’ve found they vary from host to host and often times they only monitor if the web server and/or database is still up and running.  If you have some weird error that crops up in your application from, for instance, a long-running never-ending process, or unexpected user data input that breaks the site, or a malicious attack, your host’s uptime monitor likely won’t catch this problem.

I use a very cheap (free if you only track a few sites) uptime monitor from SiteUptime.com to track my clients’ sites.  If one of them goes down and returns ANY code other than HTTP 200 (OK), the monitor emails me.  Since I’m unhealthily attached to my iPhone, I’m checking email constantly and I’ll know within 5-10 minutes of the site going down that there’s a problem.  If it’s a mission critical application, you can elect to have text messages sent in the event of an outage.

This is an easy one to stay on top of the integrity of your sites and projects.

Comments
No Comments »
Categories
Techniques
Comments rss Comments rss
Trackback Trackback

Don’t rely on hosting providers’ backups

andymilk | December 1, 2008

Most hosting providers backup their servers on a daily basis with an off-site backup once a week.  If something catastrophic happens to your server, code, or data, you can rewind to the time of the backup.  The problem is that the process for getting the disc or database image back up and running can sometimes take hours or even days.

I learned recently on a project that you should always add your own programmatic way of backing up and restoring a database.

On one specific Rails project, it was as easy as writing an 11 line rake task that performed a quick backup of the mySQL database.  A cron job runs this task once a day.  If you have enough disk space, feel free to run the backup more often.  Twice a day, every hour, etc.  You could also write another periodic task that clears out old versions of the backups, in case disk space is at a premium.

Restoring the database is as easy as running one command.   I use GZip to extract the data straight into mySQL.

Often times in the rush to finish a project, only the essential functionality and user testing is attended to.  Don’t forget about your data loss and recovery plan.  Take a few extra hours to build one.

Comments
No Comments »
Categories
Techniques
Comments rss Comments rss
Trackback Trackback

About this Site

Andy Milk is a web software designer, developer, and consultant located in Cambridge, MA. This site showcases his portfolio and approach to design and development.

Phone: 617-290-8559
Email: andymilk@gmail.com

Other sites:
LinkedIn
Twitter
WorkingWithRails.com
Rock and Run

Hosting

Use these guys,
they're the best:
- Blue Box Group

Post Topics

  • Good stuff
  • Partners
  • Projects
  • Techniques
  • Tools
  • Uncategorized

Partners

Elastic Communications
Anthony Caffiero
Ruth Lague
Ridge Marketing
Christopher Fannon Multimedia Design
DesignSite
PixelSlam
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox

© 2009 Andy Milk Interactive, LLC