Go to content
pfactor site logo Picture of Mooney in flight (top logo)

RSS Feed

 

AngelMap Released

posted Sep 26, 2007

AngelMap screenshot

Nancy and I have been members of Angel Flight West for just over a year now. It’s an organization that links up volunteer pilots with people who need air transportation for medical or humanitarian reasons. Pilots review a list of mission requests and choose which ones to volunteer for. The problem is the list is … just a list. I wanted to see the list of available missions on a map.

To make a long story short, I developed an application called AngelMap which plots the Angel Flight West mission list on a Google Map. Please check it out and let me know what you think. Either post a comment below, or drop me a line via the contact form.

Programming in Rails

Rails tag line

The banner at rubyonrails.org

Ruby on Rails has received a lot of positive attention in the software development community recently. It’s hailed as being a revolutionary new way to create web applications. The hype surrounding Rails certainly got me interested in learning more, but it also made me skeptical. The only way to find out what Rails was really all about was to try to actually do something with it. AngelMap was the perfect project to get my feet wet.

Hype Confirmed

After spending a few weeks learning Rails and developing AngelMap, I can honestly say the hype around Rails is well deserved. The Rails principles of “convention over configuration” and “don’t repeat yourself (DRY)” are fantastic. If you follow the conventions they’ve set up, there’s very little configuration you need to do. But there’s more to it than that. I found myself just getting into a natural flow of thinking of the next thing to implement, writing a few lines of Ruby, and presto — almost instant results. The speed at which everything just came together was truly amazing.

I want to say a bit more about the “few lines of Ruby” I just mentioned. The amount of code I actually had to write to make AngelMap work is surprisingly low. Here’s the statistics.

$ rake stats
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |   254 |   212 |       2 |      11 |   5 |    17 |
| Helpers              |    23 |    20 |       0 |       2 |   0 |     8 |
| Models               |   292 |   187 |       3 |       9 |   3 |    18 |
| Libraries            |    10 |     8 |       0 |       0 |   0 |     0 |
| Components           |     0 |     0 |       0 |       0 |   0 |     0 |
| Integration tests    |     0 |     0 |       0 |       0 |   0 |     0 |
| Functional tests     |    18 |    13 |       2 |       3 |   1 |     2 |
| Unit tests           |    56 |    41 |       3 |       7 |   2 |     3 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                |   653 |   481 |      10 |      32 |   3 |    13 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 427     Test LOC: 54     Code to Test Ratio: 1:0.1

That’s less than 500 lines of code (LOC)! And the code is actually quite easy to understand. Doing the same program in Java or C# would take a few thousand lines of code, and would likely take a lot more time to develop. You may get closer to 500 lines by using a language such as Perl, Python or PHP but I’m not sure it would be as easy to follow as the Ruby on Rails code is.

What’s Next?

I plan to write an article with the details of how AngelMap works and I do plan on releasing the code the source code is available with an open source license.

Right now AngelMap just gets a feed from Angel Flight West (which is the group Nancy and I belong to) but I’d love to extend it to include feeds from other charitable air transportation organizations. There are also a few more features I’d like to add to AngelMap. I’d love to hear your comments or suggestions.

Add your comment     Comments: 2

Phil, outstanding work! Bravo! Looking forward to seeing the Rails code.

#1 Kevin

Thanks Kevin. The code is now available. Here’s the details

(required, never displayed)

(optional, displayed)


You can use Textile to
format your comment.

*bold text* » bold text
_italics_   » italics
@code@      » code
a "link":http://xyz.com » a link

Comments will be made public. You can send a private message via the contact form

© 2000-2012 Phil Verghese, all rights reserved.
XHTML | CSS | RSS | Powered by Textpattern | Hosting by Dreamhost