Jayant's Blog

Tuesday, July 26, 2011

Moving to new blog platform...

Tumblr

Saturday, July 10, 2010

So much to do! So much unfinished!

Software is never complete, period.

Of course its a good way to keep your job, but no project is ever complete. Even projects that get shipped have small quirks that need to put in because of some limitation of the platform or environment (or engineer). Sometimes there are things you want to come back to, but never do because there were other pressing issues. I've always tried to do the best I can and trying to use the best approach to solving a problem. But I know there's always a different way to get the same results and I'm always searching for it.

The good thing about iOS development in my opinion is that there are so many APIs that can do the job for you. The bad thing about iOS development is that there are so many APIs that can do the job for you. Yes, I know, its the same. iOS being HUGE, there's always a way to get something done. Its just a pain in the butt to look for it. Of course the more you use the SDK the easier it gets to find the correct API, but it does need a little searching and learning all the APIs.

I've always had a TODO list of things I want to try/play around with in the projects I've worked on. Its usually in my head, but I have made a conscious effort to maintain it in a todo list on my machine. Unfortunately, the TODO list is never without items that I have never done. For example Sqlite & XML were 2 that I had never worked with on iOS, but now I have used these APIs and feel pretty confident using these. Reachability is something that I should integrate, but just have not sat down to get cozy with. But my Achilles' heel in iOS development is OpenGL ES.

While working on the ArcGIS API for iOS, I found Quartz 2D to be sufficient for the job for drawing graphics. Its very performant and for the job at hand, perfect.

OpenGL ES... well. I've taken the time several times to start learning it, but have some how just not been able to go through the tutorials. I first started with iPhone OpenGL ES Tutorial Series a while ago, but left it after 3 tutorials. When I got back, the site was gone. Then I started looking at OpenGL ES from the Ground Up, which is really good. But now, I have other things on my plate, to it moves to the back burner... again!

So long story short: There's always some better way to do something. Seek it out. Find it. Learn it. Use it. It doesn't mean you're work will be always complete, but you will have the satisfaction of doing the best job possible with the right tools.

Thursday, February 25, 2010

And time for change

After 9 great years at ESRI, working on ArcIMS, MapObjects Java, Java ADF, JavaScript API & iPhone SDK, its time for change. Moving to Yahoo!

Saturday, December 05, 2009

Inadvertently adding nil to NSArray

In Cocoa, when populating a NSArray, you use nil to mark the end of the objects being added. So lets say you were populating an array using values from 2 UITextfields and a property, such that:

NSArray *array = [NSArray arrayWithObjects:self.textField1.text, self.textField2.text, self.nsnumberProperty, nil];


The values populated at runtime would look something like:

NSArray *array = [NSArray arrayWithObjects:"foo", "bar", 10, nil];


When you print out the array you get: { "foo", "bar", 10 }.

But what happens, if say self.textField2.text is nil? Now the code at runtime would look like:

NSArray *array = [NSArray arrayWithObjects:"foo", nil, 10, nil];


When you print the array now: { "foo" }

Ouch! Noticed what happened there? The array was terminated by the first nil, so you may have expected 3 values, but you only got 1. So beware of inadvertently adding a nil and terminating a NSArray. Use [NSNull null] if you want to add a null object in an array. Arrays: Ordered Collections.

This is definitely the case in NSDictionary also, but not sure if this is the case in NSSet.

Sunday, August 09, 2009

Wow, need to post more often!

Life has been quite busy for the past 5 months. Released v1.4 of the JSAPI and got done with UC and the sessions there, but the big news is iPhone development.

I have been working on developing iPhone apps for a few months now, finally convinced the appropriate people, built a prototype app in 2 weeks that was showcased during the plenary session of the recently concluded User Conference. Check out the video: Plenary Session - 2009 ESRI User Conference -> 'ArcGIS 9.4: Mobile GIS' -> about 2/3rds way into the video, presented by Chris Capelli.

So now I am leading the development of the iPhone API, similar to the JavaScript API, and have handed over the reins to the JSAPI to Praveen. So finally I am getting to make my move into mobile computing.

Friday, February 27, 2009

ArcGIS JavaScript API v1.3 OUT

This is a developer centric release. The enhancements include custom layers, error handling and more layer management in the Map which have been requested time & time again. Check out the full list of What's New.

At the Dev Summit in March, Jeremy & I will be presenting the 'An overview of the ArcGIS JavaScript APIs' and 'Developing Advanced Applications with the ArcGIS JavaScript API' sessions. Jeremy will also be presenting 'Patterns and Best Practices for Building Applications with ArcGIS API for JavaScript' and finally 'Using the ArcGIS Server REST API' with Keyur. To see when these sessions are offered, go to the session search page and search by session name.

We will take an in-depth look into the v1.3 developer features in the advanced sessions. In depth looks into error handling, using esri.request, custom layer, etc. You can hear a podcast about our sessions too.

In case you are interested in attending for the ESRI Developer Summit, check out the website.

Saturday, February 07, 2009

Google Latitude & the iPhone

I'm sure everyone has heard about Google Latitude, essentially a mobile app that lets you share and find friends in the vicinity, with caveats. Well, what it may potentially tell us about the next iPhone OS release is that the OS will probably have background processes. I know its a long shot, but here goes:

The google latitude page states: http://google.com/latitude -> Will it work with my phone? -> iPhone and iPod touch devices (coming soon).

In the FAQ for Latitude: http://www.google.com/support/mobile/bin/answer.py?answer=136647&topic=20071, the page states:
  • ... Latitude can automatically detect and update your location in the background ...

  • ... you will have the option to continue sharing your location in the background even with Maps for mobile closed.


  • So in order for Latitude to truly work on the iPhone, they need background process support in the SDK. And guess what, it may be 'coming soon'. Fingers crossed & hoping so...