Pocket 110: Dhiraagu Directory for Windows Mobile - version 2!

I recently upgraded my smartphone to Windows Mobile 6 Professional and had occasion to play around with the new OS and its related software development kit a few days ago. Few hours of tinkering around with the phone and the SDK resulted in me having picked up an application I wrote in 2006 called Pocket 110 and revamping it - sort of to fit the times and to add in a few features I had thought of since the application's original release.

Pocket 110 is an application for Windows Mobile Pocket PCs and Smartphones in 2006 that allows you to search through the numbers, names and addresses for the landlines and mobile lines listed in the Dhiraagu telephone directory. Unlike the previous version, the new program does away with lugging around its own directory database and instead uses real-time look-ups from the Dhiraagu E-Directory itself. This overcomes the two major shortcomings of the older version where the database searching took ages on smartphones due to low processing power and also rids the problem of outdated directory database files. The real-time look-ups do mean that the program requires access to the internet and hence incurs data transfer costs - but since the program gains a thousandth fold increase in search speed, the (low) data transfer charges are a good trade off.

I also added a couple of new features to the program while I was at it, including the ability to directly dial numbers found via directory searches. But the coolest, slickest new addition is the "CallerInfo" feature. The feature offers a replacement for the default "Incoming Call" call screen for numbers that are of Maldivian origin and listed in the Dhiraagu E-Directory. When you receive a call, CallerInfo can automatically look up the details of the incoming caller and present the caller's name and address details - that way, almost every caller is identifiable at ring time even though that originating number is not in the contact list. If that doesn't make sense, run the program and call your phone from a number that is not in your contacts list - the program should display the calling number's details... in a mere few rings/seconds.

Requirements:
Pocket 110 v2 is optimised for Windows Mobile 6 but should run fine on Windows Mobile Pocket PCs and Smartphones running Windows Mobile 2003 and Windows Mobile 5. You will need to have a recent version of the .NET Compact Framework installed (which most phones do these days!). Pocket 110 takes up about 200Kb and can be installed simply by copying the provided CAB files onto the device and executing them on the device. Make sure you have GPRS or EDGE configured and working, otherwise the searches will fail and the program will inform you of so.

Download:
- Pocket 110 v2 (for Windows Mobile 2003/5/6)

Screenshots:

Program icon in the application listing


Program main screen with search query entry.


Search results listing


Search result item details


Menu options


Options - enable/disable the CallerInfo feature


About the program


CallerInfo in action! :-P


Have fun!

Lunar eclipse photos

Here are some snaps of the moon during this morning's total lunar eclipse. The images are nothing special (and of pretty low quality) but given that I had no equipment other than an outdated digital camera this was the best I could have done.











Total lunar eclipse - not visible in the Maldives

I just scanned over the news headlines of the Maldivian media to see if there has been any mention of the lunar eclipse that is to take place tomorrow morning but, quite unsurprisingly, found none. Anyway, I thought I'd dish out some useful info for anyone interested in it.

Although tomorrows eclipse is a total lunar eclipse the eclipsing will not be visible in the Maldives as the moon sets well before it happens. Instead, Maldives will witness what is known as a penumbral eclipse starting 5:34 AM on 21 Feb (local time) as the Moon enters the penumbra - which, sadly, most likely will not bring about much discernible difference for the naked eye. At the time, the moon will be well on its way to set and can be seen approximately West-Northwest at an elevation of 9.5 degrees in the sky. The moon sets at 6.18 AM, which is well before the partial eclipse phase kicks off at 6.43 AM.

If you are disappointed, then wait for the partial lunar eclipse that is to take place on the 16 of August this year which should be clearly visible throughout the Maldives. As for me, I hope to be up tonight watching this magnificent event here in the UK where the total eclipsing is to be visible - it truly is a wondrous sight after all!

More info:
- NASA page about the 20 February eclipse including the visibility mapping
- General information on eclipses (+ listing of future eclipses)

Hope that was useful. :-)

Javascript Unicode Keyboard Handler for Thaana

Here's something that is probably going to be very useful to the Maldivian web developers working on Unicode-based Thaana web pages. It is a Javascript utility function that translates keystrokes into the appropriate Unicode Thaana characters. Hence, it makes it possible for HTML text input and textarea fields (and similar) to accept Thaana without having to require the user to switch the keyboard language on their computer. Such a feature contributes for a better user experience as the user can simply enter Dhivehi without the extra hassle. The code has been tested with no problems found on Firefox 1/2/3 and Internet Explorer 5/6/7.

If you would like a demo, I recommend you check out the text entry box at Radheef.com and see the HTML behind it. A few developers seem to have already adopted my code as at Radheef.com and utilized it in their work - haamadaily.com, sangudaily.com and jazeera.com.mv and haveeru.com.mv is using the code far as I know.

I originally wrote this around 2002 while experimenting with different methods of Thaana entry for the web. The version I'm releasing here, marked as version 2.0, is a modified version from 2006. It is being released under the MIT License.

- Download unicodehandler-2.0.js

Usage

1. Link the file in the HEAD section of the page:
<script type="text/javascript" src="/unicodehandler.js"></script>

2. Attach the handler to any text INPUT, TEXTAREA or editable DIV tag:
<textarea rows="1" onkeypress="return juk_HandleKeyPress(event);"></textarea>

3. Set any Unicode-compatible Dhivehi font to be used for the field using CSS.

4. That's it!

Drop a line here if you use it and/or have problems. Enjoy.

Update (16-Aug-2008): This version is now superseded by the new and improved v3.0.

Dhivehi Radheef application for Facebook

I am launching a new Maldivian Facebook application which I had planned out as part of a scheduled series of feature updates to Radheef.com. This new Facebook application displays a random word, and its associated meaning, from the Dhivehi Radheef on your Facebook profile. Words are automatically updated everyday so as to keep your profile fresh and, perhaps even, educational.

Give it a go if it catches your fancy.

- View the application's About page on Facebook


Fingerprinting Thaana

What is the frequency of characters in a typical Dhivehi writing? What is the most commonly used Thaana akuru/fili in Dhivehi? Is there a general pattern of akuru and fili to be expected in any given Dhivehi document?

These questions, and especially the latter, kindled my curiosity yesterday and had me off to explore a little bit. Although seemingly trivial and of no practical use, these are serious questions that probe into the finer details of Dhivehi and help produce computational models of Dhivehi - which have practical applications. Even the generalizations and patterns that result from the simplest statistical analysis transcend the (quirks of) individual writing and give a broader picture of what a language is really like. For example, I'm employing a statistical fingerprint of Dhivehi that was generated during this little exercise as part of an experimental procedure that identifies (the presence of Dhivehi) content in web pages. It takes advantage of the fact that the fingerprint for Dhivehi and that for English are dramatically different thus allowing a computer program to discern the type of content it is dealing with - all without really "understanding" a language.

I conducted the analysis on a dataset consisting of ~5000 Dhivehi articles from Haveeru Daily and ~7000 Dhivehi articles from Jazeera Daily. They may not represent the whole varieties of Dhivehi literature available but I think they are a very good approximation - especially of Dhivehi web content which is what I was mostly interested in. My focus was on the individual character level and ran basic mean, mode, variance, standard deviation and frequency calculations with a further character correlation analysis. Despite these being quite simple analyses, I don't think anyone's ever explored as much before and hence the following should make for (exciting!) new information.

Enjoy :-)


Mean fili usage in Dhivehi writing


Mean akuru usage in Dhivehi writing


Thaana character frequencies

Ovvalhu(gondi): an African game?!

I was watching a presentation tonight titled "African fractals, in buildings and braids" (on TEDTalks) and was totally absorbed in it when an African game board shown in it caught my eye - the board looked eerily similar to something I knew: an Ovvalhugondi. I had always been under the impression that "Ovvalhu" was a distinctly Maldivian game but just like many other supposed Maldivian games of the likes of "Koraa" and "Baibalaa", I wondered if Ovvalhu too was just another foreign game that had been absorbed into our culture. Anyway, I was compelled to look up more about the mentioned African origin game called "Mancala".

Finding out more about Mancala was a much easier task than I thought. Rather than it being an obscure game played in a lone part of Africa that had little mention in any literature, Mancala was literally something of a global phenomenon that had many a mention of it, played all over the world and had dozens of online shops selling the boards. There even were online versions of the game! Mancala or Manqala in Arabic, basically refers to a class of games that all have similar game play - the objective always being to capture more "stones" than the opponent. There are a number of variants (see Wikipedia's list), as adopted by different countries or areas, that differ in the finer details of how its played. Apparent differences obviously include the number of pits in the board and the number of "stones" used in play.

I might be wrong (very wrong, infact) but from what I read I suspect that Ovvalhu takes after the version played in South India or possibly the version played in Ghana. Ovvalhu may not be our national game but Ghana's Mancala variant called "Oware" is supposed to be their national game. I found it amusing that the names sounded similar but that might just be mere coincidence(?!). A similarity that certainly is not a coincidence is that Maldivians also used to play Ovvalhugondi with "Laagulha" (picture), ie. the seed of "Kashikumburu", which is what Oware is supposedly played with (in the Caribbean atleast).

What was even more interesting, to me, was to learn that Mancala (or atleast some variants of it) had been analysed using combinatorial game theory. The game of Awari was tackled by two Dutch scientists who generated the entire state-space for the game - mounting upto almost 9 billion positions - and cracked the perfect play for the game (here's their paper). Perfect play is a game theory term for a strategy or set of moves that guarantees a certain outcome in a game - a win or a draw at the least - if the game allows so, mathematically. I have no interest in Ovvalhu but I find such computational challenges almost erotic. I'm very much tempted to attempt analyzing Ovvalhu for a perfect play as well, so I've added it to my list of future boredom-killer projects.

Anyway, though it is pretty conclusive that Ovvalhu is not a Dhivehi game, I think it is interesting to learn that it certainly is one with an exciting history and background!