Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Friday, October 02, 2009

Short Update: Prayerbook now in ITALIANO, DEUTSCH & RUSSIAN

Just a short update: I've been down with cold lately and swamped with work.

An update to the Catholic Prayerbook is now available in iTunes (for iPhone users) or HERE (for Java users)

With this update, it is now available in English, EspaƱol, Latin, Bahasa Indonesia, Deutsch, Italiano, and Russian.

Also, there are now up to 28 prayers in each language. New additions include more thanksgiving prayers and novenas. Update your copy or Download it NOW here.

Any comments and suggestions are always welcome!

Wednesday, September 23, 2009

Open-Source Math Tool: Sage

So life as a student has begun.

But not quite the same. For instance, I still have work pending; I still have people chasing after me, I still have products in the pipeline while several hours daily, I am usually in class.

Several days ago, professors from maths class that I'll take next semester (next semester, mind you!!!), emailed us 4-pages "diagnostic" test of our level of mathematics. I swear cold chills descended upon my spine. Not that I hate math or anything like that, but it kinda reminded me of those days of math homeworks which took me hours to finish, not to mention those blasted complicated sums which sometimes, unfinished, crept into my sleep...

So I turned to wikipedia to refresh my 'math memory' - if there's such a thing, and lo and behold, it didn't turn out as difficult as I thought. Differentiation, all kinds of techniques to arrive at it, etc. wasn't quite as horrible as I thought. And then I discovered "Sage". After unsuccessful attempts to use Maple or Mathlab or something without paying thousands of dollars (hey I'm only a poor student), I discovered an open-source alternative. Somewhat thankful, I'd like to see how it compares to other packages. After several frustrating download attempts with a download speed in the range of 5Kbps, I finally found a mirror closest to where I am, that allowed the download (almost 400MB) to finish in about 20 minutes.

It's good enough for me to start writing this blog post :) Let's just say it appeals to the geeky part of me - it requires a mini-webserver to run at port 8000, and requires one to have accounts to 'log in', and its worksheet, was clean enough that I could verify my answers to a complicated differentiation in half an hour. Intuitive words such as "diff" and "sin" and "cos" simply work. Well, they need brackets. And I suppose a few helpful buttons wouldn't hurt. But hey, engineers love command-line interface, right? This package has all that we can ask for...

Just thought to recommend this nifty package.

Now back to the books...

Friday, September 11, 2009

iPhone scare: black screen

These past few days, the iPhone I use had a black screen. For all purposes, it looked like it's dead, or switched off. But the alarm, which is set to go off at 6 everyday, made it ring and vibrate like crazy every morning and I couldn't turn it off. Calls were still going in, but I could see nothing. I could still use the cable to charge it and to sync it with the laptop and I'd hear the "clink" noise coming. So it wasn't dead, but neither was it functional.

They say Google's your best friend, and today it proved to be. A quick search on "iphone black screen" returns this page: http://seogadget.co.uk/iphone-display-blank-screen/. (The author had written, in his following post, that some site leeched off his post—I'm not going to do the same thing.. hence the link). But it basically says that you should hold down the "Home" round button at the bottom and the "Wake/Sleep" button on top, and the phone should reboot itself nicely.

It worked for me. Hope it saves someone the anguish, or having to find a pile of clothes or blanket in which to hide the vibrating iPhone. Read the comments in the link to amuse yourself :)

Thursday, June 18, 2009

This is frustrating...

... that the iPhone Developer Portal has not been accessible for the last one week (or more?!!).

I heard that the activation servers of iPhone OS 3.0 have not been accessible lately, but the portal too?

Thursday, March 12, 2009

"What to Do if Your Startup Is Failing"

I used to think (well, I still do sometimes) that nobody likes failure and even more so, nobody likes to talk about failure. I must admit, that must have come from my own deep-seated insecurities :)

Jason Calacanis wrote in BusinessWeek, somewhat philosophically, but managing to be practical about the whole thing, about "What to Do if Your Startup Is Failing".

Coming from a first-timer scrawny start-up, I will say that my company has never been far from "flailing", and what Calacanis wrote has been somewhat the way of life around here. Even if you are not a flailing entrepreneur (perhaps you're just a flailing student, or a flailing office worker, or a flailing member of the Communion of Saints!), Calacanis' essay is still worth a read about how to handle such a difficult situation.

Tuesday, January 20, 2009

Learning Tip: document your steps!

These past few days I have been working on a little mobile app (J2ME / Java ME) that displays the various Catholic prayers and devotions. Simple stuffs like "Pater Noster" all the way to the mysteries of the rosary, and thanksgiving prayers, in multiple languages.

It started out pretty simply, and the complication happened only when I had to 'versionize' the source code and the resources used by different language versions. Some versions should be able to handle multiple-language requests from the user, some display only one language of choice.

Two problems: versioning and internationalization.

Internationalization has always been an interesting topic for most application developers because frankly, few of us bother to provision for Unicode display until the product is almost ready. Then began the scramble to make the application accommodate the havoc wreaked by the different encoding the input came in.

Versioning problems came about because I did not use CVS. Period. Well, there's more to the story than that, but bottomline is, there are existing tools that can track your files' changes.

During the course of this project, I have learned that Ant (which is the build tool I use to compile J2ME applications) is extremely nifty with multiple compilation paths. A little familiarity is required with the Ant build file, and more curiosity, to learn the various types of variable and property that are used to signal different customization and compilation paths.

For example (in J2ME Polish):

The element <sources> can be customized to point to different folders for different versions. So instead of re-naming your public classes, MyMIDlet_v1 or MyMIDlet_v2, you can stick with the same name in different folders.

The element <jarName> can contain references to other variables or properties, to be something like: "prayer-${polish.name}-${polish.locale}-${TwoLangCombi}.jar"

Those variables and properties can combine to indicate which resources folder you would like to use when compiling for a particular locale, or particular screen size, or particular handset brand.

Why am I writing this?
I have suffered greatly because I did not learn to use these 'best practices' in my daily work! I hope anyone of you who happens to read this and understand may benefit from my suffering and this little note ;)

Saturday, November 15, 2008

Honoring Flash

It's been at least TEN YEARS since I last touched programming in Flash (back then, Macromedia Flash, now it has been acquired by Adobe). It was only Flash 0.9 or earlier, and since then the explosion of the Web had also resulted in the ubiquity of Flash applications and Flash websites.

I found a great Flash tutorial here (courtesy of Kongregate Labs). Surprisingly easy to get a decent game up in less than two hours...

What's great about Flash is that its runtime ships with most browsers, and easy enough to install with those without built-in plugins. It is amazing that such marketing achievement at such a primitive (browser!) level could propel Flash into the most preferred application delivery mechanism at major social networking websites!

Friday, October 03, 2008

Mobile rosary anyone?

So it felt like 35°C yesterday and I really wished the bus would come soon! Anyway, despite trying to forecast the arrival time of the bus from the IRIS system, I had no such luck and ended up waiting for close to 40 minutes in the sweltering heat. What's one to do? I had no interesting book with me, so I decided to pray the rosary.

The rosary, well, as any prayer, requires contemplation. It is easy to find myself already finishing the five decades without really getting into contemplation. So I whipped out my phone and started googling for "rosary reflection" on the mobile. All kinds of junk results were returned! I was frustrated beyond belief. And even those which are actually real reflections were not properly formatted for the phone screen...

"Ay, que calor!" was on the tip of my tongue. But yesterday was a good day to offer up the little suffering and a new idea is born! I'll start putting up mobile pages for reflection on the rosary. Let's see how feasible it is to do this...

Wednesday, September 24, 2008

I'm seeing stars

Most people coming to this blog aren't here to read my ramblings, here's one 'reminder-to-self' post with links of potential future interests. There are many exciting news from the tech front:


  1. The 3G iPhone

    iPhone - almost every developer's wet dream. Other than lousy battery life, lack of MMS, lack of copy-and-paste, and the fact that to use it outside AT&T you have to break the law (though the latest iPhone is now jailbroken), it's still a disproportionate leader in terms of mobile Internet traffic contributor. Also, the number of paid-apps on iTunes App store has now surpassed free ones. With 500+ apps and counting, you can't rely on stunts like "I am Rich" to get rich ;)

  2. Google Android

    The first Android phone, HTC Dream, is out now. With so many platforms available, it really makes any developer pause before committing to support a new platform. Is Android the future? Or iPhone? Or Symbian? The trends point towards the web app model. Companies everywhere are tired of releasing different versions of apps that need to work on thousands of OS & VM variants running on different phones. Write once, run anywhere? Write once, pray it'll run somewhere :) All in all it makes more sense, but not for another few more years...

  3. Mobi-ready?

    Interesting movement to make the Web (as we know it now) mobile-ready and mobile-friendly. Some sites here and here.

  4. J2ME Security Vulnerability

    Adam Gowdiak broke the JVM sandbox on J2ME architecture. Whee! This could be a cry of freedom for many J2ME developers, though it requires more than a wee bit of bytecode-level hacking to be able to commercially exploit this flaw. Also, if you can exploit this flaw, so could the malicious hackers.

  5. Facebook Connect

    Is this the "one ring to bind them all"? OpenSocial is another competitor. Much as this would be a boon for developers, I have reservations about using just one ID online. Plus Facebook wants every site to know your real name and identity.

I just came back from a trip to Vancouver, the world's capital of mobile and games developers, and San Francisco. Beautiful cities, great ideas, optimistic people!

Friday, May 09, 2008

Did you know..

... that to run a console application on the phone you have to launch it using either a program like FExplorer or a remote console like QConsole? There is NO built-in way to execute a console application on Symbian.

I didn't, and spent almost an hour getting frustrated.

Monday, April 21, 2008

SMS Operations in Symbian 3rd edition

Some notes of experience (most likely for my own future reference) to accompany the Wiki entry on SMS Operations. In particular, this is useful for those who are new to Symbian. The above link gave example on how to send an SMS, and delete the sent message, but the code (SmsHandler.zip) needs to be a slight tweak to make it work.

Problem Description: Usually applications that sends out SMS messages like to do so discreetly. The example given doesn't delete the SMS sent by your application?

Solution:

1. At the sending of SMS,
Change: need to put the Application UID into the SMS created at CreateMsgL()

2. At the HandleSessionEventL() for the new message to move from "Outbox" to the "Sent" folder,
Change: need to match the Application UID (inserted in step 1) -- highlighted here in the code addition for HandleSessionEventL()

case EMsvEntriesMoved:
{
// Entry id is obtained from the session event arguments.
TMsvId* entryId = STATIC_CAST( TMsvId*, aArg2 );

// We are interested in messages that are moved to Sent Item Folder
if ( *entryId == KMsvSentEntryId )
{
TMsvSelectionOrdering sort;
// to handle also the invisible entries
sort.SetShowInvisibleEntries(ETrue);

CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvSentEntryId, sort);
CleanupStack::PushL(parentEntry);

CMsvEntrySelection* entries = parentEntry->ChildrenL();
CleanupStack::PushL(entries);

for(TInt i = 0; i < entries->Count(); i++)
{
// iMtmData3 here must match your application UID, in which case
// variable 'KUidMsgTypeSMS' needs to be renamed accordingly
if( parentEntry->ChildDataL(entries->At(i)).iMtmData3 == KUidMsgTypeSMS.iUid )
{
parentEntry->DeleteL(entries->At(i));
break;
}
}
CleanupStack::PopAndDestroy( entries );
CleanupStack::PopAndDestroy( parentEntry );
}
break;
}
}

NOTE: there was a bug in the example given at the Wiki entry; I've changed this to help all newbies checking out this code.

Wednesday, April 09, 2008

Update on the Rosary widget

It's a little late.. I published an update to the Rosary widget some weeks ago. But as I'm sitting here with an unusual light-headedness trying to solve a bug in my Symbian project, I thought of how comforting is the prayer of the rosary, to have recourse to Our Lady, our most powerful intercessor.

So, in this latest build, version 1.0, I've put in some kind of identifier variable that'd automatically notify all the current users (version 1.0 onwards) if I've uploaded any updates. But it doesn't yet work for those who have downloaded the earliest version.

What's in this build? I've added two things:
1. The Litany of Loreto
2. Links to patristic reflections from Fr Z

The latter is meant to help you to reflect upon the rosary using materials Fr Z compiled from the Church Fathers' writings. All copyrights belong to him of course.

On my part, it's been encouraging to see people's comments on how beneficial they'd found the widget. Any comment or suggestion for improvement are welcome. So there it is... I'm just asking everyone who happens to see this post or use the Rosary widget, to remember to say a little prayer for me :)

Firefox add-ons woes

I've settled into a comfortable relationship with Firefox—the browser of choice for most tech-minded people. (No slight to Opera and Safari fans out there!) I've even got round to uninstalling Internet Explorer on my XP machine!

Well now, what makes online life good in Firefox, apart from its inherently good qualities, are the plethora of add-ons (user-submitted extensions) that made everything accessible at a single click. Let's see:
1. del.icio.us or Digg made bookmarking a breeze at a single button click,
2. The Session Saver or the Firebug debugger (essential for web developers),
3. Scrapbook allows me to download complete pages (JavaScript and all) to make it available offline for my students,
4. IE-Tab made it possible to request and render pesky websites as Internet Explorer--which I have uninstalled on my machine,
5. DownThemAll! accelerates those huge ISO downloads,
6. Most importantly, the Adblock and NoScript made me feel invincible (almost) surfing on a malware-infested digital jungle.

Now you can imagine my consternation when one day, after one of those automatic Firefox updates (it's now at version 2.0.0.13), none of those beloved add-ons work! Need less to say I felt absolutely naked and vulnerable going to the Internet. I managed to refrain myself from getting online for a couple of hours before I realize I had to do something! Here's the problem:

The extensions are still there, but they're not loaded. When I look at the extensions in the Tools -> Add-ons menu, all of them are marked such:

This add-on will be installed when Firefox is restarted.

And restarting Firefox repeatedly does nothing. A search in Google turned up a post back in July '07 (that's donkey years ago in tech world!!!!), that recommends deleting extensions.cache from the Firefox Application Data folder. Didn't work for me. I was dreading the prospect of having to reinstall Firefox and reinstalling all the extensions.. Another search turns up these posts and they recommended deleting the three extension index files:
extensions.ini
extensions.cache
extensions.rdf

from the folder C:\Documents and Settings\{username}\Application Data\Mozilla\Firefox\Profiles\{profile_salt}\, and restarting Firefox.

VERDICT: Works! I just hope the next time Firefox does auto-update, the extension disappearance and rediscovery won't be part of the routine.

Wednesday, November 07, 2007

Windows woes (part 2)

I haven't felt this exasperated in many years. I've never banged my head harder than I did tonight trying to install a little application onto a Windows Mobile smartphone device.

"What does every mobile developer ultimately want to do?" Simple question, simple answer: "To get the application to run on the phone". It took me hours of poring through MSDN's documentations and technical articles to find out just HOW exactly to do that.

<RANT ALERT!>

Alphabet Soup
"CAB", "INF", ActiveSync, are some of the terms thrown around liberally in the developers' articles. As if everybody knows what they mean. I don't know what a CAB is, I don't know why only a CAB file can install the app on the phone, and I don't know how do I make a CAB out of my executable. The only reason why I started searching for the keyword "CAB" was because I happened to remember that a year ago, that's what a colleague of mine used to run his Windows Mobile app. Now, if only these three simple questions can be answered in the same article, I think MSFT is justified paying good salaries to their technical writers.

Instead, here I am writing in frustration at 4AM in the morning because the documentation is so fragmented and the information design obfuscated! I really don't want to nitpick, but I'd think that since on-device deployment is a common goal for all developers, creating a CAB project would be a highlighted task/feature in Visual Studio 2005. But no, to create a CAB project, you have to add another project into your existing Project, and on top of that, select it from "Other Project Types"!

Frankly I was impressed the first time I saw the collection of documentation and technical articles available at MSDN website, but very soon it's clear quantity certainly does not trump over quality.

The last hop
Getting the app to the device, after a frustrating battle to generate a CAB file, was jumping through another set of hoops. 'Impressive' was my first reaction when I saw how many delivery mechanisms Windows Mobile support for the app installation: SMS/Email/Cab Installer/ActiveSync/Push SMS, you name it. After another wild goose chase trying to find out what is ActiveSync, and whether it ships with the SDK, and whether I really need to install it, it took another half hour to figure out what is the best way of getting the device 'online' and getting it to access the CAB file.

Needless to say, I did manage to install the app and that's why I am writing this now. But the tears of blood may not be worth it.

Tuesday, November 06, 2007

Some tech updates

This blog hits 10,000 visits yesterday! I can't remember when the site traffic meter was first put in, perhaps some 2 years ago, but still... it's a reminder of how long it's been here, since August 2003!

On other news, I've got an announcement that in the tech world may be seen as nothing short of an apostasy: I started developing software on Microsoft .NET! *Gasp* *Choke* Well, to be fair I had evaluated all my choices and it came down to economics. So a potential client came up to us and asked us to do a Windows Mobile client job. The price was good and we said yes.

So I spent the last few days trying to install the various Microsoft animals that are required to get the IDE and the SDK up and running. Let me write here briefly what I had to do (just in case I ever need to do this again... I sure hope I don't have to!)

  1. Install Visual Studio 2005 (15 minutes)
  2. Explore the IDE, find out just what can it do... (20 minutes)
  3. Complete a little application in half hour's time (30 minutes)
  4. Choose the target mobile platform (Smartphone 2003 / PocketPC 2003 / choose your animal) (1 minute)
  5. Build the project, run into a strange error (0.5 minute)
  6. It says .NET 1.1 is required (hmm.. what is that?) (0.5 day gone)
  7. Try to install .NET 1.1 Framework.... run into error! (1 day is gone)
  8. Google search says .NET 1.1 Redistributable Framework needs to be installed
  9. Try to install .NET 1.1 Redistributable framework... run into error! Even worse than before, because it was not a documented known issue (1 day is gone)
  10. Another Google search says that it's a known issue with Vista! (darn.. don't they all come from the same company??!!) and that the workaround is to do the following with .NET 1.1 SP1 (are you telling me .NET Framework needs a Service Pack too???):
    1. Download Microsoft .NET Framework 1.1 Redistributable Package and Microsoft .NET Framework 1.1 Service Pack 1 using links below:
    * Microsoft .NET Framework 1.1 Redistributable Package
    * Microsoft .NET Framework 1.1 Service Pack 1
    2. Save both installations in the same directory
    3. Ensure that the Microsoft .NET Framework 1.1 Redistributable Package is named dotnetfx.exe. If not, change its name to dotnetfx.exe.
    4. Ensure that Microsoft .NET Framework 1.1 Service Pack 1 is named dotnetfxsp1.exe. If not, change its name to dotnetfxsp1.exe.
    5. Open command prompt as Administrator, and change to the directory where the two installations are saved.
    6. Run the following commands using the order shown below
    * dotnetfx.exe /c:"msiexec.exe /a netfx.msi TARGETDIR=C:\dotnet"
    * dotnetfxsp1.exe /Xp:C:\dotnet\netfxsp.msp
    * msiexec.exe /a c:\dotnet\netfx.msi /p c:\dotnet\netfxsp.msp
    7. Install both Microsoft .Net Framework 1.1 and Service Pack 1 by running C:\dotnet\netfx.msi
  11. After a few days of troubleshooting, fully expecting that these animals won't get along, suddenly the same project compiles beautifully! TA-DA!

By this time, I have come to realize that the price quoted was fully justified -- the IDE installation process alone was painful enough. Welcome to Microsoftville *evil cackle*

Sunday, November 04, 2007

Universal widget?

I was not quite convinced when I saw this heading "Universal Widget", but that's what NetVibes claims they were doing with their open widget platform. They claim they support these widget platforms currently:
- netvibes
- Mac dashboard
- iGoogle
- Opera
- Windows Vista
- Windows Live
- (coming soon) Yahoo!

If this is true, it's too good to be true! Prior to making the two widgets, I had deliberated between iGoogle and Yahoo! platforms, because their user demographics seem quite exclusive (non-overlapping). Now it seems it'll be possible to port them for different platforms using similar (if not single), codebase.

Saturday, October 27, 2007

Rosary Widget

For the month of October, my contribution to Our Lady of the Holy Rosary is this little widget (official link here). Similar to the earlier aspirations widget, it is a Yahoo! Widget (not to be confused with widgets for blogs). It was this earlier widget that started a few requests coming my way, one of them is a request for a rosary widget as a prayer aid.

A few months after the request, I finally took a few hours on a Friday night to do it. Actually the real reason was because I had been home-bound and desk-bound for the last few days and personally had trouble concentrating in the praying of the rosary, which I normally say whilst travelling. Also, I keep giving away my rosaries to people around me, that it's time to use an electronic aid...


To start, simply click on the red beads. It will scroll through the prayers (no going back though!) and display a counter of Hail Mary's said.

Some features:

- Option to turn ON/OFF the illustration images
- Option to say mystery of the day (default) or your choice of mystery
- Option to switch between English & Latin

I've submitted this widget for public download at Yahoo! Widgets Gallery and it's still now under review. (I will update this post and the link when it goes live.) In the meanwhile, if you trust that I'm not going to run some malicious code on your machine, you can also download it here (UPDATE: link refreshed). If it helps you to pray better, it's enough reward! Feedback welcome.

UPDATE: I found an article that talks about how powerful praying the rosary is. It's not the only example, but it's good to remember especially if we slip into remission. Spread the rosary!

UPDATE #2: The widget now is ready for download from Yahoo! site. The link is here

Monday, September 03, 2007

J2ME Polish: garden-variety bugs

I'm writing this short collection of bugs I've encountered when working with J2ME Polish (RC4) on Samsung devices, just for my personal future reference & to help anyone who found this in passing:

  1. The use of 'viewtype' midp2 (which in my case allows more flexible layout of elements) causes, in some devices, notably SGH-E900 and SGH-X820, the screen to freeze when any joystick key (up/down/right/left) is pressed.
    Workaround: Pressing the down key returns -1 as the index of the next element. Either implement your own extension of the MIDP2LayoutView class to correct this problem, or don't use it—use other view types.

  2. Title bars sometimes are not rendered in a Form. Again, not all devices are affected; title bar does get rendered on Z230, Z400, and Z720 but NOT on E900 and X820. Might have something to do with Canvas sizes and Screen sizes, and/or fullscreen issues.
    Workaround: not known. More research needed.

  3. On a Form, when implementing an ImageItem to act as a button, J2ME Polish may sometimes throw an error that the Command attached to the ImageItem cannot be executed. Again, the above devices seem to be the only ones affected.
    Workaround: The Command needs to be attached to the ImageItem via setDefaultCommand(...)

That's about it for now; this will be updated as more issues are encountered.

Thursday, July 26, 2007

Human Device

"Human device" seems like a term that non-humans use to describe mechanism/tools which are human, or for those who dismiss physical mechanism in spiritual endeavor. I encountered this term when reading up about prayer. When one is absorbed in the daily tasks and work, it can be difficult to keep the presence of God. There are ways to keep ourselves "rooted" of course, such as keeping a crucifix in clear view on our desks.

Now, for the digital age that made the computer desktop literally our "desk top", there are nifty things like widgets. I personally use Yahoo! Widget Engine (now re-named Konfabulator again, after a very unimaginative name change), and have a Picture Frame widget (prebundled when you install the Widget Engine) that sometimes displays a crucifix.

Based on an advice from my SD, I start using a digital equivalent of a click-counter to keep track of the aspirations (short prayers) that one can say (in order to better keep the presence of God) in a day, and found it very nifty indeed! It can be quite revealing however, when at the end of the day, my count remains in the single-digit range!

Very often, the number stared at me and I ran out of aspirations to say. Frankly, there are some days when saying an aspiration is the last thing on my mind. So I thought, why not stand on the shoulders of giants (in our case, the Saints), and mimic their impeccable devotion instead?

Out of this burst of inspiration, I made my very first widget ever: this widget displays a random aspiration from one of the saints (well, they are mostly from St Alphonsus Liguori, and then there are some from St Teresa de Avila, St Philip Neri, and many others I did not manage to discover). Admittedly, some of their spiritual ejaculations are so POD™ (pious & overly devotional) and almost outside-of-this-world, but they made it, eh? ;) This widget, called "Catholic Random Aspirations", also keeps a counter as to how many you have said today. Clicking on the red button increases the counter and gives you a different random aspiration. Right now it's only a static collection of slightly less than 200 aspirations and can be run OFFLINE.

Any comment or feedback regarding the use of this widget is very welcome! Also, I'd really appreciate it if you can send me more aspirations. The next version of this widget will draw the aspiration randomly from an online database so that the collection of aspirations can be updated without upgrading the widget itself.

I've submitted this widget for public download at Yahoo! Widgets Gallery and it's still now under review. (I will update this post when it goes live.) In the meanwhile, if you trust that I'm not going to run some malicious code on your machine, you can also download it here (old link removed, updated below). If it helps you keep Him closer, it's enough reward!

UPDATE! The widget is now available for public download at Yahoo! Widgets Gallery. This is the direct link. Enjoy!

Friday, July 06, 2007

J2ME Woes

Have I ever mentioned I hate mobile phones? Yes, that's right. It's helped revolutionize our lives, I'm sure, but it's been a source of misery for the lot of developers who has the fortune (or mis-fortune) to attempt development of "write once, run everywhere" (i.e. the motto of Java programming). Not to mention I have been using so many test phones that I am nearly schizophrenic when it comes to phone keypads and most certainly paranoid when calls from unknown numbers (unknown, because the more recent contacts were not in the SIM card) arrived...

Before going further, it must be said that this is a late afternoon rant after a few days of being entirely submerged in the exasperating world of standard-less mobile devices. The landscape of software development for mobile devices today, looks a little like pre-DOS era of personal computers. Sloppy & non-compliant implementations of JVM on the mobile litter the mobile market.

Some J2ME Polish bugs encountered, either fixed or evaded:

losesFullScreen: an issue that affects Samsung SGH-D500, in which the screen rendered on the phone is cut-off at the top & the bottom. The catch is, using J2ME Polish, one has less control over the direct Canvas implementation. Hence even my Forms ended up getting cut.
Status: UNFIXED, left to the manufacturers to fix their device, or better, the mercy of God!

SoftKeyMappedToFire: an issue that affects the navigation keys of many Samsung devices--sometimes pressing the soft key results in the default command being selected. If the default command for that item is not defined, good luck to you :) Anything from screen freezing to a Samsung version of BSOD is likely.

MIDP2LayoutView: Pressing any key on any affected screen throws an ArrayIndexOutOfBounds exception. Initially I tried what the mailing list suggests, that is, to override J2ME Polish' MIDP2LayoutView class, but ran into further trouble trying to reference this class from the secondary compilation of StyleSheet. I gave up on this, threw "midp2" view out of the window.

There, here's a fulfilment of my quota at being Good Samaritan this week! (in view that most of this blog's visitors don't come here to read my spiritual blurbs but to read HOWTOs and battle stories about J2ME & Linux) If there's any bright lining in the dark cloud of J2ME woes, it'd be this maxim I've since taken personally: "Write once, pray it will work everywhere."