Archive for the ‘Tools’ Category.

Code releases

I’ve just posted up 3 new repositories onto GitHub:

Digital-Campus-Protocols: These are the protocols (forms) we’re using for the Maternal Care project in Tigray.

Ethiopian-Pregnancy-Calculator: code for the pregnancy calculator Android app

Amharic-Keyboard: code for the Amharic/Ge’ez Keyboard for Android

All these are released under open source/creative commons license – so please feel free to clone and develop further :-)

mQuiz: lots of updates….

Over the last few days I’ve made quite a lot of updates to the mQuiz server and Android application

mQuiz server updates

  • Graphs and better info about quiz responses – note that if you created the quiz then any responses you submit will not count towards average scores etc.
  • A download queue, so you can share quizzes with a link…. e.g. clicking on this link will add the ‘European Capitals’ quiz to your download queue, and will be downloaded next time you start the client phone app. You can use this even if you haven’t yet installed the phone app. As soon as you install and log in to the client, the quiz will be scheduled for download.
  • Quizzes can now have download/submissions turned on/off. Allows a quiz to be under development, and not downloadable to any clients, also by turning submissions off you can stop people sending in more results.
  • The leaderboard on the homepage now works. You’ll only appear once you have submitted results from at least 3 different quizzes (sorry, quizzes you created don’t count!).
  • Homepage much improved (I think anyway!).

mQuiz Android updates

  • You now need to register/login when you first open the client app. You’ll need valid login details to download quizzes, submit responses etc.
  • The download scheduler is implemented – so the client will automatically download any quizzes you’ve selected on the server. The scheduler only runs when you have the mQuiz client open and you can set how often it will check for quizzes in the preferences (from the mQuiz main page click on the menu button and select ‘preferences’).
  • Manage quizzes: you can now remove installed quizzes as well as just download them. Note that this will remove all your scores too (though results already send to the server will be kept).
  • The download quiz page now won’t try to download quizzes that are already installed
  • After you complete a quiz you now have the option to share your results via twitter, email, text message, facebook etc.

There’s still quite a lot I’d like to do to tidy up the client code, and all the other features I’d like to add too! Any feedback on the above, or the app generally, much appreciated :-)

OpenDataKit – entering dates in Ethiopian format

Some of the feedback we had from the initial HEW training last week was that some of the HEWs had difficulty in using the Gregorian calendar. Ethiopia has it’s own calendar which is the normal calendar used for the vast majority of Ethiopians (Ethiopian calendar entry on Wikipedia). Given that we’re asking the HEWs to collect date information, we need to make this as easy and understandable for them as possible – for example, to enter appointment dates a few weeks or months in advance. So over the past couple of days I’ve been looking at creating a date picker widget for integration into ODK Collect that will allow dates to be entered using the Ethiopian calendar format, but will store the date in the database as Gregorian. This transformation is hidden from the user and storing Gregorian dates in the database means we can manipulate and compare dates for reporting purposes, which we’d be unable to do storing Ethiopian dates as strings in the database (we can transform the dates back into Ethiopian calendar for final display).

It ended up being much more straightforward than I though it would be, especially with much help from the ODK Community and with the Joda Time java library already built into ODK Collect. I’ve got a first version ready for testing, so if anyone else is interested in having a look you can download the .apk file for installation on your Android phone.

To see the Ethiopian date picker working you’ll need to load up a form which specifies data picker. You can connect to our ODK Aggregate server at: http://hew-datacollect.appspot.com and download the EthioDateTestV1.5 form. Or you can download the original form XML to put on your own server.

This is only a first version, so any feedback is very welcome – or if you’d like the source code then please feel free to contact me (will put it up somewhere once I’ve tested it a bit more). [Update 19-Aug-11: I've now put all the code up as a clone on Google Code at https://code.google.com/r/alextlittle-dc-odk/, so you can see the full changes I've made.]

Finally, here are a couple of screenshots of the Ethiopian date picker running in my Android emulator:

Instructions for installing and using Ge’ez Virtual Keyboard

Update (12 Oct 2011); This instructions have now been deprecated, to install the keyboard on your Android phone please visit: http://alexlittle.net/blog/2011/06/03/installing-geez-virtual-keyboard-on-android-devices/

Here is a short video of how to switch between virtual keyboards and how to use the keyboard:

Please let me know if you have any feedback/questions.

Ge’ez Virtual Keyboard for Android

Update (12 Oct 2011): For instructions on how to install the keyboard on your phone please visit: http://alexlittle.net/blog/2011/06/03/installing-geez-virtual-keyboard-on-android-devices/

Virtual Keyboard demo

Over the past few weeks, a group of graduate students at Alcalá University have been creating a virtual keyboard for Android to allow the input of Ge’ez script. This will allow anyone using Android smartphones or tablets to input Amharic and Tigrinya in their native script. We’ll be trialling use of this keyboard in our mHealth projects.

As the script contains over 200 characters they can’t all be displayed on the keyboard, so tapping the root consonant character will allow users to cycle through the 7 consonant+vowel combinations to enter a particular character, much like using a numeric keypad to enter Latin script characters. We’re also working on a version where the possible combinations appear in a small pop-up window when the root consonant is pressed.

The installation isn’t yet as simple as we’d like because the Ge’ez font isn’t default on Android, so the devices need to be rooted and the system font installed before the keyboard will work correctly. We’re currently putting together some full instructions and video and I’ll post up a link when these are ready. If anyone wants to try it out now, please contact me, we can provide a ROM with the font and application pre-installed.

More photos of the keyboard in action.

Bandwidth measurement

For a project which I may be working on in the near future, I need to think about how I can measure user’s bandwidth. Although there are many tools available for doing this already (such as speedtest.net and many others), these generally all require java or a recent version of flash to be installed. Plus they appear mainly geared towards testing a broadband connection, rather than a dial up (or other slow type of connection). I’d like to avoid creating a program that needs to be installed on a users machine as I need to keep it as simple as possible.

My current thinking, avoiding any installation and as little effort as possible on the users part, is to use a simple webpage with a small piece of AJAX to download a file of fixed (known) size and just use javascript to calculate how long it takes to retrieve. I realise that there are obvious drawbacks to this approach:

  • hard to measure latency
  • accuracy of javascript timer
  • other processes running on the machine
  • proxy or caching servers getting in the way

However, I don’t need something extremely accurate, just something that is easy to use and gives a reasonable approximation of a users bandwidth (which will be dependent on a huge number of factors anyway, such as time of day, no of other users etc), is it 2kbps, 20kbps or 200kbps?

To get a better idea of the usual speed of a users connection, I can attempt to download several files of different sizes (from different servers), and take averages.

Is there anything I’m missing that would make this a really bad way to approach this? Or would it produce results so inaccurate they’d be useless?

A month without Google

Seeing myself getting completely locked into using Google products, I thought it might be an interesting experiment to try not to use any Google services for a month. [I'm also still a little annoyed with them for not sorting out the problem I still have with Google Groups].

Perhaps I’ll find some other interesting tools and services, or maybe not, but at least it will push me to explore and look for them, rather than going into default ‘use Google’ mode.

The main Google services I use are search (obviously), mail, reader and alerts. A while ago I was also using docs, but stopped doing so once I’d been in Ethiopia and couldn’t rely on an internet connection. So what are going to be my alternatives?

Search
Not a huge choice here, but then I don’t tend to do very sophisticated searches. Going to give Bing a try, and maybe Wolfram.

I did question whether or not I should exclude myself from using Google for search, after all, then where do I stop – not using YouTube? But I decided it would be good to force myself to try out some other search engines.

GMail
Although I read my mail through my GMail account, it’s usually a forwarded copy from my own domain. I could, with minimal effort switch to the Squirrelmail or Horde mail interfaces provided by my hosting provider. This will work fine in the UK, but back at Mekelle Uni, these interfaces run off non-standard ports, which are blocked by the Uni proxy. So, I’ve installed RoundCube to use instead. It has quite a basic interface like SquirrelMail, but has some Ajax features such as drag and drop. I don’t think I’ll miss GMail labels, but it’ll take some getting use to not having the conversation style layout of messages, to which I’ve now become accustomed.

Google Reader
Again, this wasn’t a huge deal to switch from. I installed Tiny Tiny RSS on my domain and imported the OPML from Google Reader. The functionality is very similar to Google Reader, but it has the advantage that I can choose to cache images from feeds. It may not sound like a huge deal, but it will mean when I’m in Ethiopia that I’ll be able to view the photos and other images from blogspot feeds, which are otherwise blocked in Ethiopia.

Google Alerts
This was the only service where I failed to find an equivalent. There are other alert services (alerts.com, Yahoo alerts and more) but these seem very restrictive and targeted at people wanting updates on news, sports, stocks etc. rather than general web and blog alerts. So, for now, I’ve kept my Google Alerts in place, but I’m very willing to try out other alerting services if anyone can point me in the right direction.

I like the idea of being more in control of the tools and services I’m using, despite the fact that I need to be more self-reliant for backups etc. Having my own domain (and associated email), made it relatively easy to install and run roughly equivalent services without huge upheaval.

Will the reduced (or just changed?) functionality and usability make me miss Google too much? I’ll find out in the next month, or maybe just the next couple of days.

Event mapping

eventmapAfter a little time away from programming and active web development, I thought I’d get back into things by giving myself a little project to create a Google maps and Upcoming mashup.

At the moment it’s fairly basic as I’ve only spent a few hours working on it, but seems to be working well. I’ve deliberately tried to keep the number of options and fields down to a minimum (I know there are far more options and functions I could add).

Enter some search text in the ‘What?’ field, then a location in the ‘Where?’, finally select ‘When?’. All the events matching your search (within a 50mile radius of the location) will be shown on the map. Click on the marker to get more info about the event.

Neither the ‘what?’ or ‘where?’ field are required, either or both may be left blank. If the ‘what?’ is omitted then all events in the area are shown and if the ‘where?’ is omitted then the centre of the current view of the map is used.

All the events are from Upcoming and you can use their interface to add your own event, to then appear on the map.

For the technically minded, the site uses the Google Maps API (including for geocoding the location) and the Upcoming API.

If you know of any other feeds I could use for adding events to the map, then please let me know so I can try adding them.

I’d also be grateful for any feedback, problems or suggestions – just leave a comment below.

Attempts at video editing on the Asus Eee

RecordMyDesktopI’ve used Camtasia Studio (Windows) a few times before for creating some training/how-to screencasts, but now I wanted to have a go doing something similar using open source software (on Ubuntu Jaunty) instead. To make it more interesting I also wanted to run it all on my Asus Eee PC (4G) – not exactly a machine designed for heavy video processing.

First issue was how to record the screen, for this I used RecordMyDesktop. A very simple program to install and run, which does exactly what it says on the tin. Selecting the area to record (I wasn’t selecting whole window) was a bit fiddly and sometimes took me several attempts to capture the right area, without chopping off a side or two.

If you’re recording a for a long time and your screensaver kicks in (or screen goes blank for power saving), you’ll need to disable the screensaver and power saving – unless you particularly need a recording of it.

What I had most trouble with – and only came up with a workarounds solution to – was capturing the audio. RecordMyDesktop wil capture the audio fine but had problems getting the recording volume level right without creating a lot of hissing. The hardware on the Asus for sound isn’t exactly fantastic. In the end I found that I had best results when using a jack lead to plug the headphone output into the microphone input! If anyone has a better solution to this or some advice about on the recording levels to capture the audio more reliably, then please let me know.

So, now I’ve created a .ogv (OGG video) file but want to edit it a little. I wanted a really simple video editor for 2 reasons, firstly I don’t wand to spend the time learning a bit video editing package and, more practically, secondly, I don’t have a huge amount of disk space left on my 4Gb drive!

I opted for Aviremux, though unfortunately this doesn’t accept OGG video files, so I used mencoder to convert to AVI (basic instructions).

For the actual editing I used Aviremux. I found it very easy to get started with and use – unlike some other video editing software.

In the end I found that my original screen recording had sound out of synch with the video – not in the initial few mins of the capture, but further in. I’m not sure why this should be the case – if anyone has any idea why, I’d be pleased to hear them.

Overall, it was a little frustrating getting this to work. I’ve not managed to achieve what I set out to do, but think this was more to do with the hardware than anything else.

Online Users Map for Moodle 2

moodleAfter a long time of not doing much (ok, any) development on my Moodle online users map block, I’ve finally had chance to return to the code to make the necessary changes for the block to run on Moodle 2.

It was always going to be tricky trying to maintain this block whilst in Ethiopia, not only with the slow internet connection, but the university firewall blocks many ports and this is my normal internet access point. So now that I’m temporarily back in the UK, I thought I’ve got chance to get back up to speed.

In the end only minor changes were needed to get the block running on Moodle 2. If you’re downloading the block from the Moodle modules & plugins pages, then please check you get the right one (v1.9 and earlier or v2) for your Moodle installation.

If you’re getting the code via CVS then HEAD currently contains the version for v2 and the MOODLE_19_STABLE branch has the version for 1.9 and earlier.

I’ve also set up a demonstration Moodle site so you can see the block in action. Just sign up, and you should see yourself marked on the Google map. You may have to wait until the location lookup script has run before you appear on the map, but this should only be a few minutes.

Please let me know if you have any problems with either getting the block to run on Moodle 2 or with the demonstration site.