Jonathan Cusick

iPhone Development: Google Maps/Pathfinding Algorithms

Developing for the iPhone can be a very rewarding experience as the Software Development Kit (SDK) and range of development tools which Apple provide are extremely comprehensive.

The following are the main tools which I use when developing for the iPhone:

    Xcode – This is the Integrated Development Environment (IDE) where the all the code is written.

    iPhone SDK – Provides the framework for building the iPhone applications through a wide range of classes provided from Apple through the Objective-C programming language.

    Simulator – Enables you to compile and test code locally on your machine.

    Interface builder – Enables you to add the graphical elements to you application and hook them up to your code using the MVC design pattern.

    Instruments – Allows you to analyse your application code for memory leaks and ensures your code will give the best possible response time on the device.

One of the most interesting things about developing for the iPhone is working out how achieving various tasks can be approached. In a project I was working on recently I was presented with the task of implementing maps which would provide directions to an end point based on a certain set of parameters.

In a lot of development environments this would be an extremely difficult task which would involve implementing a form of custom pathfinding algorithm which is not easy and can take a long time to fully test and implement.

Google have created an API (Application Programming Interface) that has been designed in order to enable developers to embed Google Maps on web pages and customise these in a variety of ways such as adding locations, street views, directions in addition to much more. This is important as it means that when combined with an Objective-C Webview in the iPhone SDK we can harness the resources of the Google Maps API in this particular case directions in order to for the pathfinding to take place on the map.

If we were not able to integrate with these new technologies on the iPhone it would mean that we would have to design an algorithm in order to deal with the directions, this can be quite a complex task and will add a lot of extra cost to the development in terms of planning, design and development time. This could potentially be achieved by using a method such as the Dijkstra Algorithm in order to work out the shortest paths between two points based on a wide range of rules.

The Google Maps API makes this very simple:

The following example has been taken from the Google Maps API documentation and is JS (JavaScript) based code which will be implemented through an Objective-C based Webveiew.


//-------------------------------------------------------------------------------
// Create a directions object and register a map and DIV to hold the
// resulting computed directions

var map;
var directionsPanel;
var directions;

function initialize() {
map = new GMap2(document.getElementById("map_canvas"));
directionsPanel = document.getElementById("my_textual_div");
map.setCenter(new GLatLng(49.496675,-102.65625), 3);
directions = new GDirections(map, directionsPanel);
directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston,
MA 02215 (Fenway Park)");
}

//-------------------------------------------------------------------------------

From here we can see that we just have to utilise the parameters for the actual address data and pass this into the methods encapsulated in the API. Once this has been achieved Google Maps takes care of the rest so for us, this is a fantastic way to go and enables the rapid development development of applications.

Since working on the iPhone in terms of development, working with a wide range of frameworks is such a strong factor in being able to produce quality applications quickly and making them cost effective for clients.

This was just a high level overview but I just wanted to try and show how technology is progressing in the mobile market and how utilising a wide range of technologies we can rapidly produce applications that do rather complex tasks.

With organisations such as Google producing new APIs on a regular basis I really can’t wait to see what else we can bring to mobile devices in the coming months/years in a manner that will not take developers years to implement through an array of complex custom algorithms for each application.

Crazy Codes & Computer Stuff: DRS Update

After spending a lot of time on client work after SXSW, I am just going to provide a couple of updates on some interesting Digital Robot Software developments.

A complete Digital Robot Software (.com) site will be launching in May which will have the following features:

    Company Blog – This will contain updates/news from DRS and articles on areas of interest in the field of software development along with case studies and areas of research.

    Company Overview – This will contain the history for Digital Robot Software and individual profiles for the team.

    Portfolio – An area with a list of clients and an in depth analysis of the applications that have been designed and developed by Digital Robot Software.

    Services – This section will provide details of all the services we offer from consultancy to design and development.

    Support – At Digital Robot Software one of our key areas is offering a top class level of support, from here we will provide all support details for our customers.

    Contacting Us – As always we can be contacted by phone and email, but in addition to this we feel that it is important to utilise a wide range of social networks so we are always just a click away. In this section we will provide a list of everywhere you can find us.

In May we will also be announcing a couple of new and exciting projects which I have a feeling will raise some interest and I am looking forward to announcing them.

Digital Robot Software will also be offering a couple of intern positions this summer, if you are interested in working with state of the art technology in a creative environment with software development or design please feel free to contact us. More details about these positions will be available soon.

After working on some GPS location based DRS projects, next week I will provide a post about path finding algorithms and how Google Maps can be easily integrated into applications.

Digital Robot Software

SXSW 2010 #4 – Learning From The Best

The interactive side of SXSW is now drawing to a close and I have had some time this morning to reflect on some of the things I have learned from some of the companies, developers and designers that have been involved at the conference.

One of the most important things I have learned was from a group of freelance developers and also from Gary Vaynerchuk which is really about providing a world class level of customer service. Often when developing you are mainly focused on delivering the end product and the next extension of that product so customer service can often be made a secondary objective.

I have heard this a few times during the conference and actually saw some examples of great products which where not offering much in the way of customer service or support, mainly just a contact e-mail address. From my personal experience with other big companies such as PayPal and Ebay it can be nearly impossible to contact them and a considerable amount of time to get a reply.

If the big companies don’t fix this it does mean that the smaller developers can capitalise on this and set a high standard which hopefully will be replicated throughout the industry.

On another note the SXSWNI guys have all been working hard throughout the trip even if there are no desks or chairs.


David Rice hacking away during SXSW

Lee Munroe has also been giving a series of updates on are trade trip to SXSW which can be found on his blog and also on his Posterous.

SXSW 2010 #3 – Developers, Developers, Developers

We are now on day 5 of our epic adventure in Austin, and have managed to speak to pretty much every company that had a presence on the trade floor.

From my perspective even though I am mainly focused on Mac and iPhone development I was very keen to meet the Microsoft guys to discuss Windows Phone 7 and WebSiteSpark.

I was lucky enough to be interviewed in a commercial for Microsoft discussing the benefits of the WebSiteSpark service and what this would mean for a development studio work flow – this was a great experience and they even gave me a 16GB Zune HD for taking the time to work with them.

I also managed to bump into a few of the Dallas Cowboy Cheerleaders who where promoting WebSiteSpark this was pretty cool!

This has been a great day and I am looking forward until tomorrow where hopefully I will learn more about the underlying technologies behind Windows Phone 7.

SXSW 2010 #2 – The Story So Far

As we enter day 4 of our SXSW trade mission so far the journey has surpassed all expectations.

The presentations are all world class and are happening all throughout the day, the trade hall is full of well established companies such as Microsoft, Veer, LaCie, Sony and many others all displaying state of the art technologies.

From a business perspective many leads have already been uncovered, just by having a quick chat with other companies and explaining what Digital Robot Software offer, I have already had several e-mails looking to follow up on possible projects which at this stage is fantastic.

It is great to be able to network and learn from the other Northern Ireland based companies on the SXSW trip who combined have a wealth of experience which is providing a strong foothold for Digital Robot Software and establishing a presence at the conference.

SXSW 2010: Digital Robot Software

I have been working hard over the last few months establishing a small iPhone and Mac development studio called Digital Robot Software.

Digital Robot Software will be going live on March 10th with a website launch which will contain details of current and future projects. I have also been working closely with an extremely talented designer who is doing the branding for the company which should give it a strong presence.

Digital Robot Software will also be at this years SXSW conference with 11 other Northern Ireland based companies who I am sure many of you will be familiar with:

    Airpos
    David Rice
    Filmtrip Ltd
    Good on Paper
    No More Art
    Sonic Academy
    The Design Zoo
    Lee Munroe
    Frank Design & Communications Ltd

This is great news for Digital Robot Software as it will enable a wide exposure of the companies services and will hopefully produce a range of clients and new skills from the available workshops and presentations.

A NISXSW Ning network has been established so all participating companies can easily communicate and so that others can follow us during the conference.

Another site niatsxsw.com has also been established to give complete profiles of the 12 companies including podcasts company backgrounds and will also be updated regularly.

If you are interested in following us on our journey to SXSW you can follow the websites and also the hastag #NISXSW on Twitter.

Super Happy Dev Castle – SHDC #0

On Saturday February 6th the first Super Happy Dev Castle (SHDC) took place in Northern Ireland. Super Happy Dev House (SHDH) started as a hackathon event for developers and anyone interested in development, technology and geekery in a relaxed and extremely motivating environment.

You may be wondering why this event was called SHDC and not SHDH, the reason for this is because the first event was hosted by Blaine Cook who not only happens to be an extremely nice person and world renowned developer but also happens to live in a castle. In addition to Blaine hosting the event, two local developers David Wilson and Steven Holdsworth were organising it and deserve a pat on the back for making the event a success.

The criteria for the day was to bring along a laptop, beer, Unix books and big smiles! This was clearly not an issue as there was a great turn out (around 30 people) all working on exciting and state of the art projects.

A fantastic Spotify playlist and IRC room were quickly implemented at the start of the event and proved to be popular as they lasted for the duration, and I am still listening to the playlist in work this week.

Working in this environment proved to be an interesting experience, as new creative ideas where constantly being discussed and analysed, in addition to many laughs and what can only be described as one or two moments of madness (probably due to the beer)!

Many thanks to Blaine and Maureen for being such great hosts and keeping us topped up with great pizza and amazing coffee.


Some of the guys hacking code at SHDC

2010 – New Year’s Resolutions

I have been thinking about some New Year’s resolutions for 2010 so I have composed the following list.

    1. Learn to use my Canon 450D properly

    2. Finish my iPhone apps and get them in the app store

    3. Attend SXSW in March (flights and platinum badge already purchased)

    4. Attend WWDC in June

    5. Experiment with more software development design patterns

    6. Get digitalrobotsoftware.com up and running

    7. Produce better quality blog posts

    8. Develop a desktop application for OS X

    9. Run more often

    10. In 2009 I have met a lot of great people so I aim to meet lots more in 2010

As New Year’s resolutions are notorious for not being maintained, I have made this list realistic and by the time we reach 2011 hopefully these goals will have been achieved.

Adobe: Creative Suite 4 – Web Premium

Last week I received the Adobe CS4 Web Premium software which I won at the Build Conference, a massive thanks to Giant Training and Adobe for this.

The following is the complete story:

On November 5th I attended the Build conference in Belfast, during the event Ian Sayers from Giant Training held a prize draw for the chance to win a copy of Adobe CS4 Web Premium or Design Premium worth a whopping £1500. I was extremely lucky when Eric Meyer pulled my name out of the box, I seriously couldn’t believe I had won and opted for CS4 Web Premium.

With CS4 a wide range of new and exciting opportunities have presented themselves. I am currently developing several iPhone applications which will now have their entire interface redesigned in PhotoShop which will give them a much more professional presence.

As an amateur photographer I will now have the ability to add a new dimensions to my photos in addition to designing and developing a new website to showcase them.

These tools will significantly help me on a daily basis with all my personal development and design projects.

Many thanks to Giant Training and Adobe!

Jonathan Cusick

CS4

My Lucky Streak: Jase Bell – Discussion

I have had an incredibly lucky streak this year where I managed to win an iPhone 3GS at Refresh Belfast which was provided by Ecliptic Labs and then a CS4 Web Premium applications package at the Build Conference from Ian Sayers at Giant Training.

Jase Bell has now created an iPhone app proposal that I feel if developed should be implemented in competitions across the land!

Although in all seriousness I have been extremely lucky at these two events and I am putting both the iPhone and CS4 suite to very good use. Hopefully there will be a post here in the not to distant future referring to the launch of an iPhone application.