Deep in the history of the world, when Earth was no longer a child in the solar system, its denizens will ask, how did we get here! How did we let it take over, despite all that Arnie told us. And the answer will be, because it came under another name and another guise. Because we let it, and because it was awesome. It was not called Skynet, but Android.

Back in 2011

Today was fun. Woke up way too early in the morning because my body is in pay back mode for putting it through God knows how many time zones. So at 0300 hrs, found myself at my laptop talking to my parents on Skype because for them in Kashmir, it was 1900 hrs. At about 0830 hrs, went to the Moscone West center to the conference and was immediately greeted by this

What I had not realised until then was that this years conference was going to be attended by about 5000 people. And all of them had decided to attend the keynote speech this year. It was packed but the arrangements were very nice and the keynote was very engaging and hands on. My favourite axiom is “Show, don’t tell”. And that is exactly what most of the keynote was. Demos! And they were awesome!

We started with what Android had done in the last year or so, the facts and the figures, the adoption and activation rates. Then they began showing a bit about the honeycomb roadmap, announcing Honeycomb 3.1 and how they were bringing it to Google TV as well. They unveiled their plans for the next iteration of android OS, Ice Cream Sandwhich.

The Keynote also had highlights about the new Open Accessory Standard and it was wonderful watching demos of how android devices integrated with exercise bikes, and game boards and lights etc.

It was very nice as well hearing from the development teams about what they had done and also where they were taking android. Movies for rent across devices, music in the cloud (BETA) and android across devices; allowing developers to write apps for Google TV as well. It was great fun.

Also, all 5000 developers got given a Samsung Galaxy Tab. 😀

After the keynote, the session began and the ones I attended the one called Honeycomb Highlights where they presented what was new in the OS and how to go about using it. They demoed some of the stuff and also showed how to use Render Script, for both graphics and computation.

After that I found my way to Secrets and Surprises of Geo APIS’s but sadly it was not much of a surprise.
They were still demoing most things which I had seen at last years dev fest in Sydney. The one thing that was new though was the ability to create heat maps on the fly from Fusion tables layered on maps or earth.

After that I attended a session where the presenters put Java Puzzlers and it was very interesting. I learnt about type erasure, bridge methods and how varargs and collections do not go well together.

After that attended a fire side chat with the Android team

And then after that attended a developer sandbox with the Chrome team. It was good fun.

Looking forward to tomorrow!

This thursday and friday my company , held its quarterly innovation day event. This is similar to Google’s own Innovation Time Off or Atlassian’s FedEx days . In short, we as employees got to propose ideas beforehand and then work on them for two whole days. Towards the end of friday, we got to present our efforts in front of the company and the best ideas got a business impetus to be developed as a company feature. The result of the last innovation day was the open sourcing of the page model developed in house called Gizmo by Luke Cunningham.

So last thursday, I decided to join forces with Geoffrey Giesemann on his idea of visualising suburbs and their corresponding information onto google maps. In this, I hoped my recent knowledge of their V3 API would come in handy. So we started at about lunch time on thursday and we split the task on basis of front and back end. The back end became Geoff’s task and he decided to write a rails application to load the monstrously verbose and complicated suburbs’ file and parse to JSON in a neat form. (Neat here being defined by the lack of extraneous data). My task became the front end. That is, to mock the JSON data that Geoff would provide and set up the map to display it. And thankfully, my knowledge from the recent devfest did come in handy 🙂 .

I started with a simple map and ensured that I could load the defaults and set up a single marker. This was fairly easy as the new API is very intuitive to work with. Then came adding additional controls to the top left of the map, which we decided would be the capital cities of the states. This would allow us to go directly to the geographical centers of the states, or centre of Australia, if we wanted. The mock data simply comprised of suburb name, its geocodes (latitude and longitude) and the name state it belonged to. I started out with a hundred suburbs and loaded them, using default markers in firefox and the whole thing was working neatly. I set up the info windows and was disappointed when I found out that the content was simple HTML(I was hoping for more controls, they are fun). The fun started when I loaded all the suburbs from Australia that I could find (in this case 15,000).

The fun was that with 15000 suburbs, all my browsers crashed; Firefox, Safari, Chrome. Someone suggested lynx but we had to decline, even though ASCII representation was tempting 😛 . So we decided to use clustering. Now V2 API used to have a MarkerClusterer, but for V3 Fluster2 was recommended. And rightly so. It was very easy to use and even easier to understand; even for someone like me who has not done much Javascript. But even after we clustered the suburbs, only Chrome could manage the load, probably due to its V8 engine. Once we dropped it in, the result was as follows:

Then we added custom markers for suburbs based on their state.

custom markers on hobart

These markers were obtained from google’s map icon repository.

and some information on the InfoWindow

info window over darwin

and our front end was complete. Geoffrey soon provided the the actual JSON data and after optimising our JS code to handle such a large load, we had a very nice application.

P.s Particular thanks to Daniel Hall who made me understand why the ‘A’ in AJAX stands for asynchronous.