Friday, 15 February 2013

The benefits of Validation, and Progress

I made a start this week on the iBrum app - a very basic and incomplete prototype is now ready, and has been distributed to the testers (see below). This has provided another example why it is beneficial to validate your data. In this case beneficial to the tune of about 30 minutes of development time. In the real world that would be about £30 or so.

For testing purposes I was using two sample XML data files, which had not been validated (unless the validation process went horribly wrong!), but I assumed they were valid. When testing the code that loads the XML into the app, it crashed. And the bit that crashed was the XML parser (I am using the opportunity to try out a new parser I hadn't used before which makes the whole thing much easier than the standard parser I was using before). I traced the error inside the XML parser (luckily an open-source component!) but all seemed well. Until I found the error: a comment was missing the exclamation mark ("<--" instead of the required "<!--").

I changed it, and then found that on the map only one of two locations was plotted. This time I checked the data file first, and indeed, 'longitude' was misspelt in the tag name, so the coordinates were incomplete. Quick change, and it works now.

Had the file been validated, this would have been much easier. So, whenever you edit an XML file for this project (or any other), run it through a validator to make sure it's OK! And it also shows what kinds of errors one has to deal with while developing an app. Lots of them are really trivial but still take time to chase.

On the positive side, it works now. So far you can see the main screen, tap on 'Map View', and see a map with the two attractions, Chinatown Quarter and Selly Manor (which incidentally is in the wrong location!). You can also switch between that and a list view, you can change the map type from plain to satellite to hybrid, and you can centre the map on your own location.

The prototype is distributed to testers via TestFlight, which is an easy way to distribute test versions. Apple is very protective as to what you can run on your phone, so it's a right old dance with various certificates and device IDs to get this working. If you're not a tester, but have an iOS device, let Ashley know: he's collecting addresses, and you will then receive a TestFlight invitation. So far two people have accepted their invites and registered their devices; everybody else has to wait until Thursday to see it in action!

Running a prototype will usually reveal things one didn't think of before, so I assume the specification will change a lot over the next few weeks. And it is very exciting to see the thing in action, the fruit of all the hard work you're currently still putting in!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.