Blog

Ponderings of a kind

This is my own personal blog, each article is an XML document and the code powering it is hand cranked in XQuery and XSLT. It is fairly simple and has evolved only as I have needed additional functionality. I plan to Open Source the code once it is a bit more mature, however if you would like a copy in the meantime drop me a line.

Atom Feed

NASA Space Apps Challenge

@ The Met Office, Exeter

Predict The Sky Team, Space Apps Challenge, ExeterThis weekend I returned to Devon and attended the NASA Space Apps Challenge at the Met Office. This is only the second hackathon I have attended outside of the eXist-db sessions I have done in the past and it was great fun.

When we arrived we were given a few somewhat cheesy welcome videos from NASA and then presented with the challenges, I chose to join the “Predict the Sky” challenge.

The goal of the 'Predict the Sky' project was to create applications which would allow a user to know what objects are in the sky over their location at night, and the chances of them being able to see those objects based on the weather.

Each challenge group had their own space in the Met Office building in Exeter which was good because it was quiet, but bad because it restricted the easy cross-pollination of ideas and offers of help between the projects.

Personally, I think we were very lucky with the structure of our volunteer team, we had two designers, two mobile app developers (one IOS and one Android), two back-end programmers and a couple of web developers, this wide range of skills allowed us to address multiple targets at once.

I myself worked on the API for providing data to the Mobile Apps and Website. The goal of the API was to act as a proxy, whereby a single call to our API would call a number of other 3rd party APIs and scrape various websites, combining the data into a simple form useful for our clients.

Slide of Predict the Sky Mobile Phone AppsFor mashing up the data from the APIs and the Web in real-time based on requests coming to us, I decided to use XQuery 3.0 running on the eXist-db 2.0 NoSQL database. As the APIs I was calling produce XML, and extension functions from the EXPath project allow us to retrieve HTML pages and tidy them into XML, XQuery is a natural choice as its data-model and high-level nature enable me to munge the data in just a few lines of code, then store and query it into eXist-db with just a couple more lines. eXist-db also has a nice feature, whereby it provides a set of serializers for its XQuery processor, which enable me to process the XML and then choose at API invocation time whether to serialise the results as XML, JSON or JSON-P with just a single function call, this is great when different clients require different transport formats.

For my first attempt I took data from the UHAPI (Unofficial Heavens API) and the Met Office DataPoint API. I combined these two sources based on the time of a Satellite (e.g. The International Space Station or The Hubble Telescope) passing overhead and determined the weather at that time.

The first approach proved too limited as the UHAPI only provides data for the current day, whereas the Met Office is capable of providing a five day forecast in three hourly increments. The front-end developers wanted to be able to display the soonest Clear Sky event and then a chronological list of all upcoming events. Based on this I switched from the UHAPI to scraping the HTML tables from the Heavens Above website. The implementation was trivial in less than 100 lines of code, and the only pain really came from having to convert the arbitrary date formats used in the HTML for display into valid xs:date and xs:dateTime formats for later calculation.

The challenge started at 11am on Saturday and by finish time at 12pm on Sunday, the team were able to present that they had created a working API thats live on the web, complete design mock-ups of the Mobile UI, and both IOS and Android mobile app skeletons which talk to the API and show real results.

In addition the team was also able to identify data sources for Meteor Showers and Iridium Flares and did also complete the implementation of a number of coordinate mapping algorithms to help us establish the longitude and latitude of such events, although we ran out of time to implement these in the API code-base.

Slide of Cats in Space Hack (Liz Roberts)All in all, it was a great and very productive experience with some very clever and lovely people. Sadly our team did not win, but one of the judges was Sarah Weller from Mubaloo who said that she would be in-touch about seeing the applications through to completion and placing them in the various App Stores. So fingers-crossed!

Finally, many thanks to all the organisers at the Met Office and NASA.

Resources

Adam Retter posted on Sunday, 22nd April 2012 at 21.01 (GMT+01:00)
Updated: Monday, 23rd 2012 at April 19.13 (GMT+01:00)

tags: NASAMet OfficeSpace AppsXQueryXMLeXistIOSAndroid

0 comments | add comment

The Not So Mobile Phone

Samsung i7500 Galaxy

Nokia N95 small pictureSince the beginning of this year I have been looking out for a new phone to replace my ageing Nokia N95. My main requirement was that it must be suitable for Web and email use - a large colour screen, integration with Web 2.0 services (such as Twitter and Facebook), 3G and WiFi radios and available on an unlimited data tariff. Secondly the phone must have a decent camera, the 5 Mega-pixel camera and flash built into the N95 is excellent.

Initially I was waiting for the release of the Nokia N97 in June, but due to some unfavourable early reviews, its bulky design and the fact that it looked that if I was to drop it, I might end up with two phones, I decided to search for something else.

HTC Hero small pictureAfter hearing much news of Google's Android over the previous months I decided to look into which phones might be available with Android. As a Software Developer and Open Source advocate, Android really appeals to me due to its non-proprietary software and application store - as opposed to Apple's offerings! It turned out that there were not a great deal of Android phones available at that time. I did find some vague rumours and information on the upcoming HTC Hero and decided to wait a little longer for its release.

At the beginning of August I was able to play with a real HTC Hero in my local Orange shop. Whilst I was very impressed, I was also very disappointed that the built in Camera lacked a flash. I often take photos when we are out with friends in the evenings and this would not be possible without a flash. So I went back to the web and started Googling for more upcoming Android phones, I soon stumbled upon the Samsung i7500 Galaxy which looked perfect for my needs. Unfortunately it would not be available in the UK until September, so I resigned myself to waiting a little longer.

Samsung i7500 Galaxy Conclusions

Samsung Galaxy small pictureWell its now early October and I finally got myself a new Samsung i7500 Galaxy on O2.
I was completely amazed by this phone, its small, light and compact with a huge beautiful screen. Android's integration with the Web is excellent. I have been using Google's messaging services for years and to now have my phone's address book and calendar synced with my GMail contacts and calendar, and to have new emails and GoogleTalk IM's pushed directly to my phone is quite something.

One thing that takes some getting used to with the Galaxy (perhaps this is just because I come from a Nokia world) is relinquishing control. The Galaxy seems to be always connected to the Web and it communicates with the Google services as and when it needs to, with an unlimited data contract this is fine, but it takes some getting used to. Also, none of the applications on the Galaxy have an “Exit” option or button, the phone seems to manage the applications life-cycle itself which seems strange at first, but really makes things much easier. Using the touch screen when your used to a keypad is strange and very slow at first, but you soon get the hang of it.

Unfortunately this phone has one really serious drawback, so much so in fact that I have just returned mine to O2. The problem is the battery!
After my first day of use the phone seemed to run down fast, but I put this down to me playing with my new gadget. On the second day, I left my phone plugged in until 9am in the morning, through the day I received one 20 minute call, made one 2 minute call and checked my email once or twice (pretty light use), the battery died before 11pm that evening – that is less than 14 hours battery life!!!

In my opinion the Galaxy is NOT a useable mobile phone: It does not last even one day between charges :-(

And so...

I have fallen back to my trusty N95 and again I am waiting for a decent Android phone to be released. If any phone designers are reading this, then I need a decent one piece Android Web phone that comes with a reasonable camera and flash. Perhaps one of these will eventually fulfil my needs - Upcoming - Android Phones and Rumoured Android Phones.

Adam Retter posted on Monday, 14th September 2009 at 18.56 (GMT+01:00)
Updated: Monday, 14th 2009 at September 18.56 (GMT+01:00)

tags: NokiaN95N97HTCAndroidSamsungi7500GalaxyBattery

1 comments | add comment

Tag Cloud