Using GeoNames web services for JSON list of locations

I found a nice web service that provides a JSON array of places based on a latitude and longitude. It is provided by GeoNames and has been very useful supplying locations for my Ruby on Rails app.

Place this URL in your browser or click the link:

http://api.geonames.org/citiesJSON?north=38.99&south=38.8&east=-77.4&west=-77.6&lang=en&username=demo&maxrows=10

Here is a sample JSON output for one location:

{ “geonames” : [ { “countrycode” : “US”,
        “fcl” : “P”,
        “fclName” : “city, village,…”,
        “fcode” : “PPL”,
        “fcodeName” : “populated place”,
        “geonameId” : 4751839,
        “lat” : 38.840390900000003,
        “lng” : -77.428876900000006,
        “name” : “Centreville”,
        “population” : 71135,
        “toponymName” : “Centreville”,
        “wikipedia” : “en.wikipedia.org/wiki/Centreville%2C_Virginia”
      } ] }

I also found a nice Rub Gem called geonames that provides a nice, easy to use module with classes.

Look here for more information on the GeoNames web service: http://www.geonames.org/export/JSON-webservices.html#citiesJSON.

Using the Xcodeproj Ruby Gem

The Xcodeproj Ruby gem is an excellent tool to create and update Xcode projects for iOS and Mac apps. I wanted to use it on a command line tool I was building recently. This tool is being used to help improve the productivity of iOS developers. The Xcodeproj gem is a perfect example of a productivity improvement tool. That is what we should all be striving to create.

However, I was not able to find any good documentation. Finally, I had to read the spec tests in their source code to determine how to properly use it.

Add New File to Project

I wanted to provide an example of how to use this gem in your Ruby code. This example will show you how to update your Xcode project by adding a new file.

# Open the existing Xcode project
project_file = product_name + '.xcodeproj'
project = Xcodeproj::Project.new(project_file)
 
# Add a file to the project in the main group
file_name = 'Message.m'
group_name = product_name
file = project.new_file(file_name, group_name)
 
# Add the file to the main target
main_target = project.targets.first
main_target.add_file_references([file])
 
# Save the project file
project.save_as(project_file)

(See my gist of this code on GitHub)

The example above opens exising Xcode project, adds a file to the project in the main group, adds the file to the main target, and saves the Xcode project file.

I would like to thank the amazing team at CocoaPods who created the Xcodeproj gem and helped us improve our productivity. This is also the same team that created the CocoaPods Ruby gem that we are also using.

This gem is another building block in our productivity improvement technologies for iOS developers. I feel that our mobile software development community has not done enough lately to improve the productivity of our developers. It still takes a long time to create high-quality mobile apps. As a community we need to continuously improve our productivity tools to rapidly speed up the development of mobile apps. This is the responsibility of the talented software engineers in the mobile industry.

Teams Give Way to Squads

In mobile software development there are no teams anymore. More and more I am seeing a lack of formal teams. Now, we only use squads.

The days of coherent teams of people with various skills who join together to work on the same software product for a long period of time, are gone. Nobody wants to put together a team anymore. The reason?

Mobile development happens so fast that apps can be implemented and delivered in only a few months, instead of years. It is easy to shift focus of developers from one app to another every three to six months.

Since the developers do not have enough time to get to know each other and form a working bond, the true meaning of team is missing. They don’t have the time to build a good working relationship.

We now have a collection of random squads that are assembled and disassembled every few months. They move from one manager to another frequently. They are often going through the project startup phase multiple times a year, learning new member dynamics, and learning slightly new project processes.

Squads often have a lead that is designated at the start of the project. These leads are usually Sr. Software Engineers that are trusted to lead the project from beginning to end. They have the knack to start and end projects frequently and not get attached to any one brand.

If you are currently on a mobile development project for less than three months, you are probably on a squad that is being called a team. Look closely to see which characteristics you notice. Do you see the characteristics of a squad, or of a team. Chances are, you are on a squad.

AT&T Site Down for Upgrade

Now that I am ready to activate my new iPhone 5 with AT&T, their website is down. Here is the message on the website: We are upgrading our online account management system right now.

My New iPhone 5 Has Arrived

I finally received my new iPhone 5 today by FedEx after ordering on the evening of September 15, 2012. Now, after unboxing, I am doing a full backup of my old iPhone 4 so I can perform a restore onto my new iPhone 5. This should save a lot of setup time.

The new iPhone 5 USB cable feels a little thinner that the old cable, and makes me wonder if it will be as durable. the new mini connector is very strange after using that wide connector for some many years on so many devices.

The Restore from an iTunes backup is now in progress and I am just waiting for it to complete to use my new iPhone 5. Almost done…