Archive | Mobile Application Development RSS for this section

What are you doing to my phone?

There has been a lot of discussion recently about the advantages and disadvantages of both native mobile applications — colloquially referred to as just “apps” — and Progressive Web Apps, which allow people to use website functionality whilst offline.

One of the big advantages of PWAs is that you don’t have to install them; they reside in your browsers cache, no user interaction required. However, I think a bigger advantage in that area is that you don’t have to update them, just refresh the page!

Updating apps is a chore — yes, it’s better than the experience on a desktop machine where every application has its own update daemon or requires complete re-installation — but it’s still not something that as a user I particularly look forward to doing.

It’s made all the worse when something like the below screenshot is what awaits me behind the App Store update badge.

app-store-bad-update-descriptions

Update, but I won’t tell you why!

You wouldn’t let someone borrow your phone without them telling you why they want access to it (ringing international numbers or randomly deleting my contacts is a big no-no) so I don’t see why we should allow developers who won’t even tell us their intentions install things to our devices.

Yes, you’ll never truely know whats going on unless you have a copy of their source repository and a corresponding hash to test the binary you’re going to install against (and even then, what if someone hacked their compiler… etc.) but it would at least be nice to know what, in their own words, they’re intending to get your device to do. Especially seen as data caps and storage limitations are still a big deal on mobile.

Normally applications say something along the lines of “We update every week, make sure to keep updating us”, but I felt that Twitter really won the battle for most absurd update description this week:

Not too much has changed. But enough to warrent an update. Happy Tweeting!

Even if we ignore that fact that the first full-stop in that paragraph should be a comma, it still doesn’t make much sense. What size does a change have to be in order to warrent sending a 78.4MB package to millions of users? How do they quantify not much? What are you doing to my phone?

Now, I’m not for a moment suggesting we get a list of git commits which have entered an apps master branch and display those to the user — the average user is certainly not technical enough to appreciate that, however, it would be nice to at least list features or things that have been fixed.

Credit where credit is due, Spotify release fantastic update descriptions for their applications, where they use this exact approach. New features are highlighted, followed by bugs which have been resolved and finally, to make it a little bit fun, they add a description of a “Fictitious” improvement such as “This app is now available in three new fruit flavours. (Berry Surprise is still quite buggy.)”. That bit of humour makes people more likely to check out app updates and question what is being ran on their device — which I think is no bad thing.

So developers, please write better update descriptions. It’s exciting to release new features or fix a bug that has been haunting someone for a week — let the people know you’ve done just that!

Danny

Advertisements

Tracking Moving Trains (with the minimum possible effort)

Trains are, in many respects, wonderful machines. They’re simultaneously both the most romantic form of travel and the most grueling way to get to work every morning. One thing trains are not however, is up-to-date with modern technology.

Whilst you can follow the course, in real time, of a plane soaring at 36,000 feet above the ground all the way from San Francisco to London you may be surprised that Train Operating Companies (TOCs) lack the ability to pinpoint the locations of their trains between stations. In other words, they may know that your train is between Cambridge and Foxton but they wont know exactly where.

Not knowing exactly where Trains are doesn’t cause any satefy issues — Block Signalling has been used to safely manage the passage of trains by identifying which “block” of track they were in, without an exact location, since the 1850s  — however, it does mean that the decisions that control rooms make are being made on educated guesses of a trains exact position at any given time.

Control rooms are the brain room of the modern railway and make decisions when things go wrong. If you’ve ever been told a train cannot run due to a “lack of train crew” its unlikely the driver was off sick and instead much more likely that a delay on a train they were driving earlier has cascaded down to your service and they simply never arrived at your station to drive the train. Control rooms try to avoid this — and many other issues.

Our earlier examples of Cambridge and Foxton aren’t exactly a million miles apart, and on a normal service you would expect a train to travel between them in around 5 minutes — but as the railway gets more and more congested making real-time decisions based on a time resolution of minutes will result in more and more decisions resulting in delays and cancelations.

After having learnt about this situation, whilst onboard HackTrain 2.0, I decided to have a go at resolving it in my own time.

One constraint of working with technology for use on trains is that, for all intents and purposes, you cannot add hardware to trains. The Rail Industry in the UK is, thankfully, obsessed with safety and that means that anything added to a train has to go through rigorous Health & Safety checks. This means it can take months, or years, for anything to be installed trackside or in a vehicle.

Whilst staff who work for South West Trains (who explained the situation to HackTrain competitors) are all issued with BlackBerry devices, some companies have started issueing their Guards and Conductors with relatively modern Android devices, some of which even act as ticket printing machine for on-the-train ticket purchases.

Armed with this knowledge I decided to try and validate my idea that a train could be tracked using just the smartphone device a member of train crew is already carrying. As I didn’t know if the idea would work in reality I set about making a working prototype with the minimum possible effort.

My acceptance criteria was pretty simple: Be able to view in real time the position of a train from Cambridge to Kings Cross. This wasn’t exactly the most measurable criteria (what does “real time” mean, for example?) but it gave me something to work towards.

In just a few hours over two evenings I developed a solution with a server written in Node.js that hosted two pages: `map.html` which, using the Google Maps JavaScript API, showed the current position and historic route of all trains being tracked and `report.html` which delivered a tiny JavaScript application to a browser which allowed it to report its location — attained through a HTML5 geolocation watch — via WebSockets, to the server.

The Prototype JavaScript client on an iPhone

The Prototype JavaScript client on an iPhone

The client and the server were, in the nicest way possible, scrappy. In order to identify a Train the guard (in these feasability tests that was me) would have to manually enter a Headcode into a JavaScript prompt and then leave the browser window open for the entire trip — I didn’t bother developing a background task. Each trains location data was stored in one big multidimensional array on the serverside that had no persistence code. But that was all fine, these applications were never intended to be production ready, just prove an idea was workable.

I walked down a few streets with my prototype client open in the Safari Browser on my iPhone and it appeared to report its location to the server as intended. So, on one of my final commutes into work before the holiday season I tested the system on a moving train on a route that includes tunnels, large areas of poor phone signal and central London; and all the different challenges these environments bring.

The route of my commute from Cambridge to London Kings Cross as tracked by my system

The route of my commute from Cambridge to London Kings Cross as tracked by my system

I was pleasently suprised with the results, shown above , despite a few anomalies.

Due to the fact I was using the `watchLocation()` function the train didn’t report its location in even time periods, as it would if you were polling the location, but rather only when the trains position changed significantly. Despite this fact, the period between the train attemting to send its location whilst on the move was never more than around 10 seconds.

I say attempted because, as expected, there were some issues with mobile coverage. I had expected to have issues in tunnels, but actually only the final tunnel before Kings Cross (which goes under the Grand Union Canal) caused issues. Lack of signal otherwised occured in a few blackspots in rural Cambridgeshire. This issue could be mitigated by employing a system such as that provided by Nomad Digital which provides an internet connection to a train using multiple sim cards connected to multiple network providers.

Another issue you can see in the above screenshot is that my train appears to have left the tracks a few times. I can assure you that this didn’t actually happen, but appears to have done so due to a combination of some inaccurate GPS readings and some failed data transfer caused by the aforementioned network connectivity problems. These errors could be mitigated using a host of techniques: comparing GPS position to known track locations, buffering changes in location that seem too great and only accepting them as true if subsequent location changes appear to be in the same area.

This was a pretty interesting project to work on. It gave me an oppertunity to develop a simple solution to a real life problem in a short period of time and learn about the awesome Socket.io library. I was happy to see it work so well, and to be wrong about tunnels. I look forward to making some of the improvements I’ve mentioned in this post and making the UI prettier and data storage a little bit more resilient.

Danny

Winner! Windows 8 App Generator Competition

Creative Bloq App Generator Website

Microsoft is really heating up its drive to get more applications in the Windows Store, as part of this push they have a few competitions on — which, if you’re a developer you should definitely check out!

One of these is the Creative Bloq App Generator competition, which is described below:

Whether you’re an experienced Windows developer or a newcomer to the platform, there’s an incredible range of prizes to be won – and EVERYONE who enters has a chance to win. As well as prizes for the Ten Best Apps and the overall Grand Prize winner, there are also 28 daily draws, where winners will be randomly chosen to receive some fantastic prizes. All you need to do is register here, either with a live app in the Windows Store or with an app you are building – or even just thinking about building. And as soon as your app is available for download in the Windows Store, you’ll be entered into the draws and competition.

I signed up to the competition with my Hull Computer Science Blogs application for Windows 8, and much to my surprise received an email a few days ago which read:

Good morning Daniel,

Congratulations you are a winner!

Your app Hull Computer Science Blogshas been chosen at random as one of the Creative Bloq and Windows 8 App Generator competition daily prize winners.

You have won a 32GB Windows tablet (make and model TBC), this will be despatched to you no later than the end of January 2013.

I can’t wait to receive my tablet in January and find out what make and model it is 😛 You can be sure to find a receive of it here at some point in February,

Thanks Microsoft!
Danny

Hull Computer Science Blogs for Windows 8 now Available

Last week I got an email from Microsoft saying

Congratulations! Hull Computer Science Blogs, release 1 is now in the Windows Store. Use this link to your app’s listing in the Windows Store to let others know about your app.

http://apps.microsoft.com/webpdp/en-us/app/hull-computer-science-blogs/494f8574-7c2c-4ab4-a59b-e08921b2d227

Because we just added your app to the Windows Store, it might take some time before your customers will see it in their search results.

To track the performance of Hull Computer Science Blogs, open your Dashboard.

Keep up the good work!

The Windows Store team

So you can now click here to go to the Windows Store and download the Hull Computer Science blogs app for Windows 8.

The app features

  • A Windows 8 Modern Experiance User Interface
  • A list of the latest blogs list with a built in blog reader
  • A list of all contributors and the ability to view their social networking feeds and latest blogs

I’d love any feedback you have, either posted on this blog post or emailed to me at Danny@Dantonybrown.com, get downloading!

Danny

Three Words for TTG October 2012

A lovely blurry photo of Rob Miles Auctioning off words for TTG October 2012

Today was the word auction for Three Thing Game October 2012. 🙂 My Team, Did You Mean “Uncle Mike’s Recursive Prolog Party?”, bid for the word fighting and, because nobody else wanted it enough to bid for it, were assigned the word toast.

At this point we were understandably wondering what in the world could link these two words in a way that wasn’t totally weird, we decided to hold off on making any rash weird game play ideas before getting our third and final word. Unfortunately we ran out of time and so Rob put off auctioning out the final words until Wednesday lunch time. Because some teams — including ourselves — were eager to get started Rob said that if we didn’t want to wait to bit on items on Wednesday we could he said we could be assigned a random word by email if we would prefer.

We did and got ourselves Party, which ties in surprisingly well with our idea. Which of course I wont be telling you anything about until Saturday at the earliest. Remember to check back for a livesteam/liveblog of the final 24 hour sprint to the Three Thing Game finish 🙂

Danny

Hull CS Blogs for Windows Phone v1.1

A few days ago an update which I’d written for the Hull CS blogs windows phone app went live.

Here are the release notes:

  • Updated splash screen to match upcoming Windows 8 MX Style App Splash Screen
  • Fixed a bug which meant that the last blog posts “abstract” could be covered up by the app bar
  • Various Minor Bug Fixes

🙂

I hope you all enjoy the latest version of the app

Danny

The Hull CS Blogs App is now available on Android!

In a continuation of the Hull CS Blogs teams quest for world domination Alex Pringle has designed, developed and published an Android Version of my Hull CS Blogs app. The application uses the same data sources as my application and is very similar to use, its also based off of the same code.

You can download it on Google Play here.

Windows Phone and Android App Comparison - Latest Blogs

Windows Phone and Android App Comparison – Latest Blogs

Cameron is still actively working on an iPhone version and we hope that will be delivered soon too!

Danny