Wednesday, 24 November 2010

7th Sea Dice Roller



Version: 1.0

Description
A dice rolling application for the now-defunct AEG game 7th Sea (website unavailable: domain has lapsed).
Users choose a number of dice to roll, a number of dice to keep, and
whether the dice explode. The results are displayed and the user can choose to add Drama Dice to increase the total.

Availability
Android Marketplace (search term: 7th Sea).

Requirements
OS: Android 1.6
Hardware: screen resolution 320x240 or higher (recommended 480x320 or higher).
Data usage: none (may be updated in future versions to use Random.org's randomiser)
Storage usage: none
Known bugs: none
Known issues: on altering screen orientation, current dice roll is removed.

Recent changes
Updated portrait mode layout to stop the Add Drama Dice button disappearing on some smaller screens.

Release Candidate #1

So, I've opened up the wallet and shelled out for the developer login over at Android Marketplace. Now it's time to put my mouth where my money is, so to speak, and actually get some content up there.

Now it gets to that point, it's all very intimidating! But sure, what is there to worry about? Apart from, you know, having any mistakes I made exposed to the general public? Um...

I've also been wondering quite heavily on the testing of apps. This first one, see, isn't really going to need that much testing: it doesn't do a great deal, see? But I've only tested it on the Android emulator bundled with the SDK, and then on one handset (and a powerful one at that). I know several people who would almost certainly help with the testing (and might even use it from time to time!), but none of them can easily connect their phone to my PC with a USB cable for debug purposes. The only real solution here, it seems, is to release it as quietly as possible, and hope that people won't flame me horribly if it doesn't work first time round. Not ideal, but hey.

You know what? A blog post would probably serve as a useful standby page for the app website. I should fix that up now...

Tuesday, 23 November 2010

Rather random

Someone got me thinking earlier about the random number generator that I've been using for the various dice rollers that I've written. Now, usually I'd just go with the default RNG for whatever platform I've been writing for, and that'd be that. I realise that randomisers can only generate pseudo-random numbers, though, but most of the time that's plenty good enough for our purposes.

However, I found a useful looking site today: http://www.random.org/, being operated from Trinity College Dublin. They generate truly random numbers from atmospheric noise, and there's an API to plug into to that can be used to pull sequences of random numbers over the Internet. Now combine that with a smartphone's data connection, and that would be a perfect dice roller! Of course, I'll have to think about things like user permissions (and give the user the choice to go online or not - particularly if they happen to be roaming at the time), but this could be an interesting little project to make sure that I'm reading data correctly from Android's http connections.

Not sure how much of a rewrite this'll end up being, though. Possibly fairly extensive...

Friday, 19 November 2010

Fragmentation

Usually a problem considered to occur to hard drives, I'm beginning to hear this addressed at the Android OS as well. It's a totally different context, mind: in this case it means the difficulty in developing applications for a supposedly unified operating system that in fact runs on many different devices of wildly differing specifications.

Take, for example, the dice roller app I'd worked on for a while. It was developed for a pretty standard screen resolution of 320x480, and the interface seems to fit quite nicely that way. Scale this up to the oh-so awesome HTC Desire, with a resolution of 480x800 (or whatever it is: it's ludicrous, for a phone!), and it looks even smoother.

The other day I tried to pop the same app open on the emulator running the specs of the HTC Wildfire. Oh dear. The screen is a tiny 240x320, which seems minute for a smartphone, and the app is unusable. Having looked at average screen sizes when I began the development, and settled on 320x480 as a useful size, it's a little frustrating to now discover that a newer device can't run the app. I can only imagine what other development teams who have put weeks and months of work into apps, now to discover that the new range of budget smartphones will require them to rewrite sections of the interface to make sure that they fit onto them cleanly, or they'll just have to put a minimum resolution requirement onto the app itself (I'm lazy: that's the approach I'll be taking, I'm afraid).

Monday, 15 November 2010

Service composition

Electronic journals are both big and clever, it seems. It's also very useful to be working from within the library, and thus gaining instant access to said journals from my own laptop: technology is a marvellous thing!

I've started looking into service composition techniques now, and they're looking to be really quite a complex beastie, particularly when you begin to factor in dynamic service composition which, for my sins, is what I'm attempting to research. Obviously, when you have a group of x services that can e combined in a variety of orders to achieve a variety of results, searches to try and combine them are going to need to be heuristic to some degree: the mind-boggling number of combinations rapidly rules out a brute-force search for all but the smallest number of systems. However, the number of combinations and techniques available for a heuristic search is also beginning to hurt my brain ever so slightly.

Fortunately, it appears that not many people have looked into the method that I'd like to look at (genetic algorithms). Unfortunately, this means that I'll have to start this all from scratch!

Tuesday, 5 October 2010

New Project: HealthWhere

I've got another Android project on the go at the moment: HealthWhere. It's an adaptation of a utility by Russ Philips to help find local hospitals and pharmacies, using the data from OpenStreetMap.

The plan for the project as a smartphone app is to use the positioning tools available to smartphones (satellite positioning, or just approximate cellphone mast positioning) to get the user's current location, rather than just asking them to input an address. The OpenStreetMap database can then be queried, and the results returned for quick and ready reference. It should also be possible to fire those co-ordinates over into a navigation app to provide instant directions. Just add water - or something!

Plan:
The interface is roughly divided into two halves. The first half is to determine the user's location (or a location to search in, if you want), and the second is to display the results of that search in a usable and meaningful way. Of course, there needs to be a bridging part which actually gets those results, but that'll be behind the scenes.
My plan for working at the moment is to consider the app in order.
1) Determine a position to search from.
2) Carry out a search, and parse the results.
3) Display those results.
4) Give an option to upload location data if it's not there already.
I'm sure that other ideas will occur to me as I go, as well, so we'll have a (5) Other interesting stuff.

Progress:
The first stage of the app is just about complete. The opening menu screen fires up and gives the user the various search options:
  • choose between searching for hospitals or pharmacies.
  • choose a search radius
  • choose to input a location, or to use the phone's positioning features to find the current location.
From this point, the geocoding and reverse geocoding work as well, to either determine co-ordinates from the address entered, or to determine a local address from a set of co-ordinates.
The second stage is going well: the search query is constructed, and an XML file is returned which contains the results.

Next steps
The next step is to write up the classes for the different healthcare amenities, and to parse the results file into something meaningful.
Lastly, I'll be working on displaying those results as a list for the user to scroll through.
At some point, I'll also need to have a look at how to upload data as well.

Monday, 4 October 2010

I have never done this

In all my time working at P&C, I never made this mistake.*

I did make a few others, though, and I'm well aware of that sinking feeling that Mr. Brooker describes so well. It is pretty easy to do, though. You can have comfortably five or six different proof versions, from the first proofs through to the final to-the-press proofs, and even then it's possible to have someone be looking through the book at the last minute and discover that you've spelled the author's name wrong on the title page (it's happened!), so your file of "Final, final, no really final, book.pdf" is suddenly invalidated.

Actually, an entertaining part of this story has been the blame game going since Friday, as each of the parties involved tries to point the finger at someone else.
- Franzen himself initially blamed the printers: "They printed the wrong file."
- The printers (qutie fairly) pointed out that "we only printed the one file we got given guv'nor - and we're not responsible for the content". They blamed the publisher.
- The publisher, on receipt of this hot potato, smoothly and immediately tossed it across to the typesetters: "The typesetter passed the incorrect version of the text to the printer. It's nothing to do with us."

At this point, my sense of professionalism kicks in. At no point should the Production Manager ever sign off on something he's not seen. You don't just get a phone call from an outsourcing company saying "We've done the work, OK?" and say "Sure, good job guys, bung it over to the printer and tell them to run off a cool 80,000 copies, right?" instead of getting the file back, checking it, and passing it to the printer personally. And you know what? If you do, you deserve something like this to come and bit you in the arse. No matter who ends up copping the blame in the media, there is a Production Manager over at HarperCollins who will be feeling the burning glare of a thousand angry supervisors for the next wee while.

*: One of my first assistants did, though, but fortunately the mistake was deemed insufficiently awful for the book to be pulped. Thank goodness.