How to make a simple motor (in Dhivehi)

Here is a science experiment worksheet, in Dhivehi, detailing how to make a simple electric motor at home with materials easily available anywhere in the Maldives. I had started preparing it to accompany the talk I gave at Jamaluddin School but sadly, due to my schedule of late and the fact that I'm terrible at Dhivehi, I could not finish it on time and thus was not able distribute it to the students as I had intended. I'm putting it up for anyone who might be interested...

- Dowload howtomakeasimplemotor-dhivehi.pdf

Javascript Thaana Keyboard version 3.0

I released my Javascript Unicode Keyboard Handler for Thaana early this year as open-source software so that web developers producing Dhivehi websites can allow users to type Thaana straight into text entry fields without forcing them to switch keyboard using the relevant features on the user's computer operating system. The code has since made its way into many different Dhivehi websites. However, the code I released then was mostly as-is from it's original version which I had written back in 2003 which, sadly, means that its behavior could be a little bit unpredictable with certain modern browsers - especially Opera and Safari.

I've now rewritten the code with the intent of producing cleaner, easier-to-use code that works without fail on all modern browsers. This version is (more or less!) guaranteed to work, and has been tested, on Firefox 2+, Opera 9+, Internet Explorer 6+ and Safari 2+ and has also been tested on Windows, Mac and Linux operating systems.

I am a big fan of separating code from design, so in keeping with that ideal this new version uses a more modern way of assigning the Thaana keyboard functionality in favour of inline javascript event handling used by the previous version (look below for an example). Since everything needs a spunky name I've also changed the old name to the more descriptive "Javascript Thaana Keyboard", which future versions of the script will maintain.

As before, it is being released under the MIT License, which allows its use in both personal and commercial applications as long as the copyright and license permission notice remains intact - so what the guy at has done is a definite no-no.


1. Link the file in the HEAD section of the page:

2. For any text input element (i.e INPUTs or TEXTAREAs), assign them the class name "thaanaKeyboardInput". You can assign further classes to the elements without ill-effect, if needed.

3. Using CSS, set any Unicode-compatible Dhivehi font (and size) to be used for the fields. You can easily do that by adding a class definition for the "thaanaKeyboardInput" class or by any other method of your choice.

4. The Thaana functionality would be automatically applied to any elements with the required class name when the page is loaded!


Check out the demonstration and testing page here.


- original full source version (7.34 KB)
- minified version (2.01 KB)
I recommend you use the minified version.

As always, drop a line here if you use it and/or have problems or suggestions. Enjoy. :-)

Update (20-Oct-2008): This version is now superseded by the new and improved v4.0.

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.

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.

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


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!

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 and see the HTML behind it. A few developers seem to have already adopted my code as at and utilized it in their work -, and and 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


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.