Friday, June 22, 2007

Running a J2ME application on Windows Mobile 5.0 devices

It is a real pain for Windows Mobile users to get a simple J2ME program to run on their mobile devices. I owned a Dopod 818 pro which is running WM5, and now I have to get my J2ME application to run on it.

Dopod actually bundled an application named MIDLet manager to run J2ME program. But after using it for a while, I experienced some weird behaviors such as automatic closing of the running program. So I think I should find other JVM for my phone.

After some googlings, I found that IBM J9 is one of the good choices. I download the installation package and follow instructions in install.pdf. There is also a good guide, which covers the installation for other platforms, at Markus blog too.

I first faced with the weird Exception from emulator.exe which says it cannot download the jad files.

An exception occurred
[//J9/IBM/examples/golfscoretrackersuite.jad] while downloading from file://J9/IBM/examples/golfscoretrackersuite.jad

Then, I found out that I mistyped the URL. It has to be “file:///{path}” instead of “file://{path}” (Note that there are THREE SLASHES) :P

I can now get the example ran.

Thursday, June 7, 2007

ChemL1ve! quite a hard time …

My team and I had just finished our Imagine Cup 2007 local round project, ChemL1ve!, and had given presentation on yesterday at TK Park, Central World Plaza. We won the third prize. I am really happy since I thought our team would not be in the top three of six teams from various Universities.

We had to give the presentation in very limited time of 15 minutes and we could not finish it in time. It was a really bad feeling. Try to think of yourself spent days coding a program and had only five minutes to show it off. It is hard to admit but this is normal situation. Good developers should learn some presentation skills too.

The winner was a team from CPE, Kasetsart University. Their project is an application that helps people who cannot read to be able to understand a book. By let the web camera point to the contents of the book. The application quickly recognizes the word on the page and displays the image and details of that word on the screen in a stylish way using WPF. User can also browse to the word he/she interested in by pronouncing that word to the microphone. The demo was really great and I can tell that this is the obvious winner of this year, right after I attend their presentation.

Our project is multi-user virtual chemistry lab software. At the stage of proposal submission, without any research, I thought it would not be so hard to develop such kind of system. But after that, when I tried to model it, I realize this was too big for a team with two inexperienced developers! More importantly, to correctly and effectively model this kind of system, you need a solid understanding of Chemistry which I actually got a “C” in my first Intania year T-T

Since this is a tech blog, I may go into the details of implementation. Here is my “ugly” class diagram at one stage of the development. Please note that it is “ugly” in term of OO design (Visual Studio 2005 generates this polish diagram quite well). It is “ugly” because it cannot support many of the system behaviors.

With this diagram, number of kind of lab equipment is fixed because I use a class to represent equipment. I am wondering if I could dynamically create new equipment at runtime. Those reflection stuffs might be able to do this sort of thing.

That is all my part. Another part is a client that my friend develops using the WPF as presentation layer. The client sends the interaction between lab equipment and get result from Web Service which wraps my part. This diagram below may help visualize architecture of our project (I designed this diagram using Expression Design, it is suitable for creating this kind of image than Adobe Photoshop).

Here are some screenshots of the client, ChemL1ve! Action.

For those who want to join next year’s Imagine Cup s/w design competition, I suggest that you should focus more on your ideas than the implementation details and make sure that your application can really solve the problem addressed. And keep in mind that this is “ideas” and “software design” competition. Do not mess with the coding too much. Just make sure that the app will not throw any uncatched exceptions during the demonstration : )