Thursday, December 18, 2008

My Maxis Broadband is Fast

It is, always. I use it 24/7, when I work in the morning, when I travel in the afternoon and when I'm home in the evening.

It is crap when it's in Port Dickson or some concrete buildings with poor signals, but not most of the time. I have also noticed the trend that it can go amazingly fast in the midnight til around 8am+ in the morning (so if you have a long connected connection, maybe you want to redial for a good speed), like this:



Thursday, December 11, 2008

Upgrading/Uninstalling AIR Runtime on Linux

While upgrading my AIR on Linux from Alpha to Beta, I hit into:

An error occurred while installing Adobe AIR. Installation may not be allowed by your administrator. Please contact your administrator.

That's not too helpful so I guessed I would have to remove the older version before upgrading. You can't uninstall using the installer as it doesn't provide an uninstallation option, you have to look into your package manager, e.g.

dpkg -S "*air*" | grep adobe

The Alpha version appears as adobeair-enu and Beta as adobeair1.0.


Monday, December 1, 2008

Hudson SVN Revisions/Changes Went Out of Sync

A project in our Hudson had been stalled for 3 weeks, for its svn revisions/changes, and I had to do a manual svn update in its workspace directory to make sure the build runs correctly. What exactly happened is that, Hudson was not checking out the HEAD revisions of these modules but the old revisions before it ran into this problem, besides, the "Changes" page showed no information other than those builds that happened 3 weeks ago.

So I thought there could be some state being held by it and I tried:
  • To turn off using SVN update but SVN checkout for every build.
  • To change the revision values in the svnexternals.txt.
  • etc.
None of these helped 'til I changed the synchronousPolling in hudson.triggers.SCMTrigger.xml from false to true and Hudson finally polled the latest revisions and updated the "Changes" page for the newly triggered build. This reset the state and behaviour (of polling all in one go) and therefore resolved my problem.

Just a tip if any of you ever hit into this.


Sunday, November 23, 2008

Where is the log file of Eclipse TPTP Agent Controller?

I have a problem to use the integrated agent controller, which reported that it has actually been running. Still finding and just learned that the logs are available at:



Wednesday, November 12, 2008

Firefox works offline due to NetworkManager interfaces being inactive

There's one improvement in Ubuntu 8.10 which is causing me some problems - NetworkManager can now detect my HSDPA. But it doesn't work and here's the log:

Nov 12 22:32:40 kimmy pppd[9724]: Plugin /usr/lib/pppd/2.4.4/ loaded.
Nov 12 22:32:40 kimmy pppd[9724]: pppd 2.4.4 started by root, uid 0
Nov 12 22:32:40 kimmy pppd[9724]: Using interface ppp0
Nov 12 22:32:40 kimmy pppd[9724]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:32:40 kimmy NetworkManager: (ttyUSB0): device state change: 5 -> 6
Nov 12 22:32:40 kimmy pppd[9724]: CHAP authentication succeeded
Nov 12 22:32:40 kimmy pppd[9724]: CHAP authentication succeeded
Nov 12 22:32:40 kimmy NetworkManager: (ttyUSB0): device state change: 6 -> 7
Nov 12 22:32:40 kimmy kernel: [ 2143.619828] PPP BSD Compression module registered
Nov 12 22:32:40 kimmy kernel: [ 2143.681813] PPP Deflate Compression module registered
Nov 12 22:32:42 kimmy pppd[9724]: Modem hangup
Nov 12 22:32:42 kimmy NetworkManager: (ttyUSB0): device state change: 7 -> 9
Nov 12 22:32:42 kimmy NetworkManager: [1226500362.016832] nm_serial_device_close(): Closing device 'ttyUSB0'
Nov 12 22:32:42 kimmy pppd[9724]: Connection terminated.

Then, the supposingly working gnome-ppp will start hanging up too and in order to bring it back to live, I have to run the vodafone-mobile-connect-card-driver-for-linux:

Nov 12 22:34:03 kimmy pppd[9843]: pppd 2.4.4 started by yclian, uid 1000
Nov 12 22:34:03 kimmy pppd[9843]: using channel 7
Nov 12 22:34:03 kimmy pppd[9843]: Using interface ppp0
Nov 12 22:34:03 kimmy pppd[9843]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:34:03 kimmy pppd[9843]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfReq id=0x1 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfReq id=0x12 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfRej id=0x12 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfAck id=0x1 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfReq id=0x13 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfAck id=0x13 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP EchoReq id=0x0 magic=0x0]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP DiscReq id=0x14 magic=0xe0777e]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [CHAP Challenge id=0x1 <5053860912aec751b049750c32c838e8>, name = "UMTS_CHAP_SRVR"]
Nov 12 22:34:03 kimmy pppd[9843]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Nov 12 22:34:03 kimmy pppd[9843]: sent [CHAP Response id=0x1 <2fb0aedcf34cb0db311ad1a157c5be04>, name = "admin"]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP EchoRep id=0x0 magic=0xe0777e 00 00 00 00]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [CHAP Success id=0x1 ""]
Nov 12 22:34:03 kimmy pppd[9843]: CHAP authentication succeeded
Nov 12 22:34:03 kimmy pppd[9843]: CHAP authentication succeeded
Nov 12 22:34:08 kimmy pppd[9843]: local IP address
Nov 12 22:34:08 kimmy pppd[9843]: remote IP address
Nov 12 22:34:08 kimmy pppd[9843]: primary DNS address
Nov 12 22:34:08 kimmy pppd[9843]: secondary DNS address
Nov 12 22:34:08 kimmy pppd[9843]: Script /etc/ppp/ip-up started (pid 9845)

Now, disconnecting it again, connecting with gnome-ppp will start working:

Nov 12 22:34:24 kimmy pppd[9936]: pppd 2.4.4 started by yclian, uid 1000
Nov 12 22:34:24 kimmy pppd[9936]: using channel 8
Nov 12 22:34:24 kimmy pppd[9936]: Using interface ppp0
Nov 12 22:34:24 kimmy pppd[9936]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:34:24 kimmy pppd[9936]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfReq id=0x1 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfReq id=0x15 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfRej id=0x15 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfAck id=0x1 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfReq id=0x16 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfAck id=0x16 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP EchoReq id=0x0 magic=0x0]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP DiscReq id=0x17 magic=0xe0cb68]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [CHAP Challenge id=0x1 <7c2c8c8e00cabc94481272f65eb30ebb>, name = "UMTS_CHAP_SRVR"]
Nov 12 22:34:24 kimmy pppd[9936]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Nov 12 22:34:24 kimmy pppd[9936]: sent [CHAP Response id=0x1 , name = "maxis"]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP EchoRep id=0x0 magic=0xe0cb68 00 00 00 00]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [CHAP Success id=0x1 ""]
Nov 12 22:34:24 kimmy pppd[9936]: CHAP authentication succeeded
Nov 12 22:34:24 kimmy pppd[9936]: CHAP authentication succeeded
Nov 12 22:34:27 kimmy pppd[9936]: local IP address
Nov 12 22:34:27 kimmy pppd[9936]: remote IP address
Nov 12 22:34:27 kimmy pppd[9936]: primary DNS address
Nov 12 22:34:27 kimmy pppd[9936]: secondary DNS address
Nov 12 22:34:27 kimmy pppd[9936]: Script /etc/ppp/ip-up started (pid 9938)

That's not annoying enough. NetworkManager now marks my network as inactive unless I'm connected either to eth0 or wifi0, which I did not have to do in the past. The consequence? Every time when I start Firefox, it works offline.

I found out that there're other users that are facing similar issue, like in question #28829. I did not use the NetworkManager.conf workaround as suggested in the page since I'm not familiar with the dbus stuff, but looking at the file gave me a clue that running Firefox as root would fix the problem. That was right but who would want to do that? ;-)

A better solution would definitely be altering Firefox settings. Question #96 suggests to set to true but it already is! Then I saw toolkit.networkmanager.disable and toggled it to true, restarted Firefox and.. Yes, this is the solution, it disables Firefox from consulting the NetworkManager.

Read the knowledge base if you want to know more about it.

- yc

Saturday, November 8, 2008

Steve Ballmer is.. funny but great

Went to the 2008 and one of the sessions that I attended was Microsoft on Open Source and Silverlight. When the speaker, Chris Levanes, talked about the open source involvement of Microsoft and their peguins and lab, I remembered Steve Ballmer's "Linux is a cancer" comment. I found it irony, but.. then again, business is business and Ballmer said that like 7 years ago. The world has changed.

Ballmer (the monkey boy that most guys would call) is a passionate guy and that's the quality he has. These videos are amusing and they will really make you to remember him.
Now.. before we laugh at him, here're some facts:
  • Ballmer is the CEO of Microsoft.
  • Ballmer is fucking passionate, or, he can really express himself in a crazy manner.
  • Ballmer is one of the richest men in the world.
Can you do better than him?

- yc

Thursday, November 6, 2008

Profiling a Remote Application in Eclipse

I came across this guide which mentioned about attaching the Eclipse profiler to a remote Java application. I was stuck for some hours, asked my question in #java and #eclipse but got no response.. then, realized that, the instructions are old!

Instead, I visited the TPTP site, downloaded the Agent Controller and followed the instructions in this page to get things up and running. Basically,
  • Add $TPTP_AC_HOME/lib:$TPTP_AC_HOME/bin:$TPTP_AC_HOME/plugins/org.eclipse.tptp.javaprofiler to $LD_LIBRARY_PATH
  • Add $TPTP_AC_HOME/bin to $PATH
  • Run to configure the AC
  • Run to start AC
  • Add '-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf' to your JAVA_OPTS (ldd and nm are good commands)
  • Start your Java application
  • Profile and hook into the application by selecting "Attach to Agent" in the Eclipse's dialog
- yc

Friday, October 31, 2008

XML-RPC vs. SOAP vs. REST thoughts and Spring Beans

Recently I am working on the remote API side of my project, and the protocol that we chose is XML-RPC. Somewhere in two blogs returned by Google search suggested that REST > XML-RPC > SOAP. SOAP can only be considered for its wide enterprise adoption and protocol stack (with security management, transaction control, etc.) and therefore it is complicated. Yes, the person created XML-RPC wasn't an expert in XML but it's neat.

Why not REST then? I used to work on design and technical issues of Mule ESB and I was exposed to REST of its sweetness (the simplicity, the CRUD stuff) before more people started to talk about it (now they talk about Cloud). I learned that SOAP is for SOA (Service Oriented Architecture) and REST is for ROA (Resource Oriented Architecture). They are two different paradigms, and the purpose and design of these layers are therefore different, e.g. you don't carry a service/RPC mindset when you create a REST API.

So, no REST for now as IMO it requires more effort to design a proper API. Never I'll create SOAP due to its complexity.

What about JSON-RPC? I had a short discussion regarding this with @ditesh at I love JSON for its interoperability and speed (vs. XML parsing). But the available implementations turned me off pretty quickly, most of them stuck in year 2005~2007. For a publicly available remote API, a well-adopted and "mature" protocol is a much better choice.

What about the Spring beans stuff mentioned in the topic? I found the Apache XML-RPC server can't be integrated with Spring naturally (it has but not enough of bean property methods) and the API is quite ugly, e.g. XmlRpcSystemImpl.addSystemHandler() takes a PropertyHandlerMapping, why not XmlRpcListableHandlerMapping?

I took a similar approach suggested by Tomas Salfischberger in his blog and here they are:
  • An implementation of Spring's AbstractController.
  • An extension of PropertyHandlerMapping, this bean is used by the previous.

public class MyXmlRpcController extends AbstractController {
private XmlRpcServletServer server = new XmlRpcServletServer();
private boolean introspectionEnabled = false;

protected void initServletContext(ServletContext servletContext) {
if (this.introspectionEnabled) {
try {
XmlRpcSystemImpl.addSystemHandler((PropertyHandlerMapping) this.server.getHandlerMapping());
} catch (Exception e) {
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
this.server.execute(request, response);
return null;
public void setHandlerMapping(XmlRpcHandlerMapping serverHandlerMapping) {
public void setIntrospectionEnabled(boolean introspectionEnabled) {
this.introspectionEnabled = introspectionEnabled;

public class MyXmlRpcHandlerMapping extends PropertyHandlerMapping {
private Map serviceMap;

public void init() throws XmlRpcException {
this.load(Thread.currentThread().getContextClassLoader(), serviceMap);
public void setServicesMapping(Map serviceMap) {
this.serviceMap = serviceMap;

<bean id="xmlRpcHandlerMapping" class="my.MyXmlRpcHandlerMapping" init-method="init">
<property name="servicesMapping">
<entry key="membershipService" value="my.service.XmlRpcMembershipService"></entry>
<bean id="urlHandlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<bean id="xmlRpcController" class="my.MyXmlRpcController">
<property name="handlerMapping" ref="xmlRpcHandlerMapping"></property>
<property name="introspectionEnabled" value="true"></property>

- yc

Friday, October 17, 2008

The guys behind the new Maybank2U, please read

Epic fail! For the past few days, I had been hearing people ranting about the new site in Twitter, Facebook and my IM.

I haven't been using my Maybank account (basically abandoning it unless there's a need to M2U to some friends for convenience sake, oh.. and, it has more ATM machines than HSBC that is true) for the past 2 months ever since I changed my job.

As I am NOW doing some book keeping, as well as to experience the pain others are suffering, I convinced myself to log into the site. Clicking on "Transaction History", the cool Ajaxy waiting icon appeared and.. woohoo, a few 10 seconds later:

Ah, ArrayIndexOutOfBoundsException, caused by a JSP tag. I don't want to know what else they're doing with Struts and in the JSP, but surely, these guys wrote some shit to make almost every customer suffers.

- yc

Monday, October 13, 2008

I love Java

Love? Love comes with struggles, frustrations, hate; it's unconditional. There's this "I Love *" meme initiated by the folks at and in supporting of it and to show my love to the programming language and its community:

I love Java for how advanced it is, for the standards (see JCP and JSRs) that have been defined, for the other languages that you can run on top of it, for its rich frameworks and libraries, ...

I hate Java, for the same reasons too. :)

Note: The Sun's Java Virtual Machine (runtime) is called HotSpot. It is released under GPL, it wasn't.. before November 2006. Here is a list of JVM implementations.

- yc

Saturday, October 4, 2008

Let's complain about the local taxi service!

In a yumcha session last week, my friends told me that the taxi service in our country has recently been rated as the worst in the region. This morning, one of my friends shared this article in Facebook, which is on the same topic.

The past 2 months, I have been driving frequently than I ever had before. I hate (hated, hate still) driving because it adds one more car to the already-busy traffic, it pollutes the environment, it causes fuel depletion too. For these reasons, I always took taxi last time (for years), because I didn't travel much.. I didn't feel the pain although I ranted about it sometimes.

What're the problems? Two problems:
  1. The taxi drivers never use the meter if you're traveling from one town to another. Say, Setapak to Mid Valley, Chow Kit to One Utama, KLCC to anywhere, etc.
  2. Most Malaysians do not queue (esp. couples), I usually shout to stop them from taking my taxi.
I drive because I travel far these days and I got enough of being ripped off by the taxi drivers. But that doesn't solve the problem I faced and other people are facing. So, inspired by OpenMalaysia's Yoon Kit, I decided to lodge a complain to the ministry of domestic trade and consumer affairs.

Please join me:

The local taxi service has gotten out of control to the extent that we are now rated as the worst country in taxi service provision in the region. We're also featured in the MSN Singapore News<> too.

I am a residence of Kuala Lumpur and the situation has become worse to me these days as I have to travel frequently than I ever had to, to/from Mid Valley, 1 Utama, KLCC, etc.

The taxi drivers never follow the meter, every time I travel to/from these places, I have to bargain for a good price in order to get into the cab. At the first place, it is so wrong for them to break the rules, secondly, it has made me to look like a an idiot for so many times by walking from one taxi to another. There was once in Mid Valley that I had to try seven taxis.

Another issue is that, most general passengers do not use the queue and taxi drivers just stop their car before the station when someone waves their hand at another end.

Can someone do something about it? It's not just hurting the local consumers, it's also tarnishing the image of our country because tourists don't really love it too.

Act now!

From @yoonkit: @yclian you may need to name specific taxi companies and events, otherwise they won't know how to react.

- yc

Tuesday, September 23, 2008

Aflexi (CDN) Prelaunch

The CDN project that I am working on - Aflexi, is now on prelaunch. There are two videos added to the website:
Feel free to leave your comment there and share with your friends about us too. :)

Updated: Removed the links below as the videos are no longer there. Go here instead.

- yc

Thursday, September 18, 2008

Unable to open this mailbox

I just set up courier-imap on my machine but I couldn't open the INBOX:
2 NO Unable to open this mailbox.
I thought it would be a permission problem but the dirs are set with 700. I also read that it could be the server's date time, which didn't seem to be the case at all.. I then bumped into this thread in the Ubuntu forum to find out that I should have used maildirmake command to create the maildir, bah.

- yc

Wednesday, September 17, 2008

Invitation to Bloggers Buff 2008

A blogging forum/workshop for Malaysians is back this year. Read more about it at its website.

- yc

Tuesday, September 16, 2008

Seperating visual effects from HTML using jQuery

I remember reading Matt Ryall's blog on 10 things every web developer should know a while back and I would like to highlight the clean code suggestion made there.

I'm migrating the existing Aflexi website to Drupal and at one point I came across an existing code which.. is not too ugly but hard to be integrated into its Menu feature. The code has a few divs that jQuery uses to create sliding effects, I could actually put them into the template page.tpl.php but using jQuery to inject them at the end of page is certainly a better practice.

So, in my template.php, I have:

$('#nav').append('lots.of.divs'); // Here's the injection
$(document).ready(function() {
UiHelper.registerSlider('', '#sliderWso', '#pointerWso', 300);
drupal_add_js(join("\n",$js), 'inline');

By the way, I make the divs a one liner using:

echo 'paste your html' | tr -d '\n'

Then, talking about injection, this is brought into my attention as well - jQuery-AOP.

- yc

Saturday, August 16, 2008

Victim of Silverlight, Thanks to NBCOlympics

I missed Phelps' incredible match which he historically tied Spitz's record. I then had to look for the replay online (it could be on the TV some time, but I'm not sure when).

I bumped into the NBC Olympics page but unfortunately the site doesn't support Linux users.

I wondered why, 'til I logged into a Windows machine to view it remotely and found out that the NBC site is using Silverlight, bah. I have heard of Moonlight but I don't think I will invest any time now to find out how to get this video working on my machine. (Separation of concern, hey)

If Microsoft wants to win this RIA game, they gotta make it work on the Linux platform.

- yc

Friday, August 15, 2008

Unprofessional Support-Fu, Let's Talk about It

Check this out. A 22-minute call from an angry customer to the Astro customer service. Most people would say that the customer was being unreasonable and having unbalanced hormones. But I have a different opinion -- that's very bad customer service by Astro.

I am a nasty and very-nice customer, it all depends on the issue am having and how the personnel speaks to me (of course, the same to most people too). I always dial the hotlines whenever I have something to complain or to inquire or I feel that I need to talk a bit with someone on a good afternoon. Always, really. To the extent that my colleagues questioned me a few times if I was simply too free.

At the same time, for the past 2 years, I worked on two support projects, providing technical support to customers around the globe. I was trained and I was also responsible to train new guys to come into this field.

My experiences with TM and Astro were usually bad. And what would I say for this case? Terribly handled. This case could be resolved in 2 to 3 minutes and it was ridiculous to drag it 'til more than 22 minutes 31 seconds.

To handle this emotional customer, Jeeva should:
  1. Apologize for the misunderstanding ("that's your problem, I can't..")
  2. Not question / argue with the customer, there's no rationality at another end dude. Be polite and say "I'm sorry" to calm her down, and bring her back to the point. What do the customers need? Solution.
  3. Not keep quiet to dilly-dally the call.
  4. Escalate! Or maybe not, because it would have been settled if Jeeva had better support-fu.

I always like the Atlassian's core value #3 - "Don't fuck the customer." Seriously don't. If you ever want to do it, do it in the nice way.

- yc, bloody hell.

Saturday, August 2, 2008

Can't Delete Recurring Events in Google Calendar

In my Google Calendar, I have a bunch of recurring events from a project calendar that were moved to my default calendar when the calendar was removed, strange. When I tried to delete them by selecting "All Events in the Series", it came back with an unhelpful error message: "An error has occurred. Please try again later."

I followed the suggestion in the mailing list and it managed to solve my problem. Basically,
  1. Export my calendar to an iCal file.
  2. Delete my calendar / all events of it.
  3. Import the iCal into my calendar.
- yc

Wednesday, July 30, 2008

Sliding down, Scriptaculous and jQuery

Haven't been hacking JavaScript "seriously" after a few years, I got myself back into doing it two days ago. I wanted a slide up/down effect on a panel when a button is hovered.

I first came across the Scriptaculous but I wasn't satisfied with the size of the JS files, Scriptaculous+Prototype+jQuery, as I use Thickbox as well (too bad, Lightview is not free).

I received some questions in Twitter and Facebook about "why both?", so I knew I needed a change unless I had a good reason. I then spent a bit of time in the morning to read the jQuery's documentation and found out that it's easier to get this done with it.

Here's the code comparison:

jQuery's Snip

jQuery("#woPageSelector").hover( function(){ jQuery("#woPageSelectorContent").slideDown(300); }, function(){ jQuery("#woPageSelectorContent").slideUp(300); } );

Scriptaculous' Snip

var mouseOverHandler = function(event) {
$('wpPageSelectorContent').slideDown({duration: 0.5, queue: {position: 'end', scope: 'pageSelectorsPanel', limit: 2}});
$('woPageSelector').stopObserving('mouseover', mouseOverHandler);
document.observe('mouseover', mouseOutHandler);


var mouseOutHandler = function(event) {
$('wpPageSelectorContent').slideUp({duration: 0.5, queue: {position: 'end', scope: 'pageSelectorsPanel', limit: 2}});
$('wpPageSelector').observe('mouseover', mouseOverHandler);
document.stopObserving('mouseover', mouseOutHandler);

$('wpPageSelector').observe('mouseover', mouseOverHandler);

By the way, if you really have to use Prototype and jQuery at the same time, you may want to read this page to prevent conflicts.

- yc, woohoo!

Sunday, July 27, 2008

Second Day of BarCamp Malaysia - Awesome!

The second day of BarCamp was simply.. Awesome! I talked about being a newbie wireless user yesterday and I have another newbie experience today on OpenOffice Presentation. We are newbies in certain areas of our life at every single day to learn new things, aren't we?

I started my day by attending a wireless network hacking session by the iTrain guys. A very great and rich session indeed, with a speaker who couldn't stop reminding us that he has a longer toy than us, he showed a number of tools to make wireless hacking easier. And not to forget, Linux is the best platform to launch attacks. It's a shame that the demo didn't work and the session dragged quite a while to make my slot left with 30 minutes time.

Yes, my talk on CDN fell in the same lecture room. Being a big fan of Steve Jobs' style presentation, I made my slides as clean as possible with just keywords, although I didn't deliver a smooth one like his (hopefully next time), thanks God that the decision to make the presentation short saved me from rushing given such limited time (of course, the reason wasn't to run into Ditesh's talk but to have more QnA and interactions).

Followed by it, it was Talat's talk on "Hidden Impact of Higher Mathematics on the World Wide Web". Talat and his talk reminded me of the Oxford Murders.

After having our Subway lunch, I ran into (once again) the Lecture Room 1 as Kamal and Aizat planned to run a ligthning talk session there. So, when I thought I would finish up my day all in Lecture Room 1, we got the news that the session got forked and we just merged with folks in another room.. which started with a talk on hiding porn video files.

It's so excited to see how much information people could share in that one hour time!

- yc, in and out.

Saturday, July 26, 2008

First Day of BarCamp Malaysia

Was ruined, by my own paranoia, which I will talk about it later.

Quickly run through, my camping started from Gavin Bong's "Google Android" talk. A pure technical talk on Android which got us hanging to decide whether we shall go for this toy.

The second and third talk that I attended fell in the same time in the schedule, Chee Seng "Flex and JRuby on Rails" and Yoon Kit's "The OpenMalaysiaBlog Story", attended just half of each of them. I liked how Yoon Kit's presented the stories in a mind-mapping-like diagram.

As I slept pretty late last night, my brain wasn't in any good condition to absorb more knowledge, I ended up looking for my friend in a Silverlight's talk, by the Silverlight guy. I blogged about Silverlight last year by the way. The product is quite interesting, slides were pretty, but the presentation was pretty screwed as the speaker came late and more than 50% of the slides were skipped.

The fifth talk, "Mobile Future" by Henry from Nokia. This is the talk that got me (bored) to hook into the IRC to chat with the #myoss guys. What went wrong? Henry was not actually being at the wrong place but there were just too many technical guys being in the room to generate him some problems.

IRC? I then realized that I have some applications running and they were trying to authenticate with servers and some of them were using plain text authentication. If they were ever sent, they were sent to the network set up by KageSenshi. Browsing is pretty safe on this laptop, as everything is tunneled over SSH to a server, but not other applications! I was not sure at all how they worked, but I could guess that the applications would check for availability of the servers before sending authentication information.

Now, why waste time guessing if I could just run back home with a cab in 10 minutes? That's how I finished my camping today. Can't blame KageSenshi if he really got my passwords. ;-) Of course, the biggest mistake was ever telling him that it happened. That was really a stupid ~20-minute, everything uses SOCKS now at my end and I feel fitter and happier.

I'm done, first-day Barcamp journey of a newbie wireless user.

- yc

Friday, July 25, 2008

Things do Go Wrong Sometimes

Chuk Munn is a Sun Evangelist who I met last week, a comment from him in the Malaysian Java User Group lately, however, went very wrong and was found in strong disagreement by a number of us.

It's a topic on class-loading which he shared based on his past experience that "(you shall) never use a functionality from an open source project if it is available unless you absolutely have to."

I'm not sure what he was trying to sell, maybe the Java Logging API provided by the SDK versus Log4J. But certainly from me, I would rather put the blame on the container of not doing a good isolation work instead of blaming open source.

- yc

Wednesday, July 23, 2008

Ubuntu Hardy Update Freezes during "Generating locales..."

I was upgrading a Ubuntu machine at work yesterday, it froze while it set up the locales:
Setting up locales (2.7.9-4) ...
Generating locales...

(you can go for a coffee now, like, taking a shower and drive down to the town to buy it from Starbucks)

I killed dpkg and restarted the set up but it didn't help. More errors while after packages were being set up:
perl: warning: Setting locale failed.

I didn't get a good response from the #ubuntu channel but some Googling got me to bump into this forum topic. There are a number of solutions being suggested in the topic, what worked for me was by booting into the recovery mode to run the package manager again.

- yc

Tuesday, July 22, 2008

"Shutting down" the RMI Registry

This blog is a quick tip to shut down the RMI registry. Something I encountered just now while writing the tearDown() method for a test case.

When a RMI registry has already been created (via LocateRegistry.createRegistry()), re-creating it will give you an ExportException:
java.rmi.server.ExportException: internal error: ObjID already in use
at sun.rmi.transport.ObjectTable.putTarget(
at sun.rmi.transport.Transport.exportObject(
at sun.rmi.transport.tcp.TCPTransport.exportObject(
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(
at sun.rmi.transport.LiveRef.exportObject(
at sun.rmi.server.UnicastServerRef.exportObject(
at sun.rmi.registry.RegistryImpl.setup(
at sun.rmi.registry.RegistryImpl.<init>(
at java.rmi.registry.LocateRegistry.createRegistry(
at org.mule.transport.rmi.RmiMessageReceiverTestCase.registerRmi(

Yes, you can't create the same registry twice, therefore you may want to dispose the previous one after every test (not actually necessary, as you could just share the same instance for all tests). An RMI registry can be disposed with the UnicastRemoteObject.unexportObject() method, by passing the Registry object to the method argument. Take note that LocateRegistry.createRegistry() and LocateRegistry.getRegistry() give you a stub to the remote object as a different object, so please use the same reference returned from the createRegistry() method.

- yc

Monday, July 21, 2008

A Networking Session with Sun / Java Evangelists

There was an invitation sent to MyJUG, to a networking session with the Sun / Java Evangelists last Wednesday at Monash University. The turn-up wasn't that high and I reached there pretty late too, I guess everyone was pretty stuck at work or in the jam. Thanks Chee Seng for the ride, otherwise I would have stuck 'til the event had ended.

Good to see familiar face like Colin Charles (the MySQL guy) and Loke there, and finally met up with Monica Ng (the Marketing Communication Consultant of Sun). The evangelists in list anyway, were, Matt Thompson, Reginald Hutcherson, Lee Chuk Munn, Peter Karlsson, Colin and Naveen Asrani.

Sitting alongside with the evangelists was fun. We started our technical conversation when Chee Seng introduced himself as a Flex guy. Chuk Munn and other folks started to bash Flex to promote JavaFx, something that I did not show much interest on which I might give a try now after being told that the beta release will be a very fine product.

We also touched on the performance enhancement of Java 6 SE Update 10 as well as the new Open Solaris. We all left after some folks distributed the live CD of the OS.

It would have been a greater event without the nearly 2-hour jam. Hopefully Sun will make it a weekend next time.

- yc

Catch Aflexi + CDN Talk in Barcamp Malaysia

Mentioned in my earlier blog that I will be presenting at Barcamp Malaysia this weekend (Sunday) on the topic "Content Delivery Network".

The agenda shall go like this:
  • Problems of the current state of the Internet
  • Introduction to CDN
  • Existing CDN Providers
  • Who use CDN?
  • Aflexi CDN model
I will put up the content of the slide as soon as I have completed it. Still fixing up stuff for prototype development here.

- yc

Monday, July 14, 2008

PropertyPlaceholderConfigurer.ignoreUnresolvablePlaceholders and my precious one hour

To speed up my prototyping process, I decided to use Mule to takecare of the integration of my core code with the persistence layer for me. Yes, basically I am lazy to write all the polling, updating, etc. This did not turn out good as I was stupidly assuming a startup problem a Mule issue and tried to fix it in the past 1 hour.

So what was it about?

I have a Mule configuration and also a Spring beans configuration which is used to configure datasource. PropertyPlaceholderConfigurer is also defined in the Spring configuration to read a file and those properties will be filled into the datasource settings, e.g.

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<property name="url">
<property name="username">
<property name="password">

Great, unit test goes easier now. Not yet.

I have this JDBC query settings in my Mule configuration:

<jdbc:connector name="jdbcConnector" dataSource-ref="dataSource" pollingFrequency="5000">
<jdbc:query key="getSurrogateById" value="SELECT * FROM surrogate WHERE surrogateId=${header:test}" />

Tried to start Mule, but it failed with this error:

[07-15 00:47:34] ERROR AbstractConfigurationBuilder [main]: Configuration with "org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'jdbcConnector' defined in null: Could not resolve placeholder 'header:test'
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(
at org.mule.config.spring.MuleApplicationContext.<init>(</init>

Changing the Mule version didn't help (something stupid that I did), until I uncommented PropertyPlaceholderConfigurer, Mule was able to start. That gave me the clue to look into the class (which I didn't have to as the stacktrace was obvious enough) to find out the ignoreUnresolvablePlaceholders property.


- yc, finished ranting

Tuesday, July 8, 2008

Configuring CNAME to SWURL

I just received a tweet about how did I configure to point to, something that I actually was stuck in a while. Here is a short blog about it.
  1. Configure your DNS CNAME
    Create a new CNAME, e.g. www, and point it to your SWURL's host, e.g.
  2. Configure your SWURL
    Go to SWURL > Settings and add set the CNAME http:// field to your new domain alias, e.g.
Clear enough? I actually found it from this conversation.

- yc

Monday, July 7, 2008

How Generic Shall it Be?

I have been writing the protocol API using Java 1.5 these days. There are some tempting features to use, but I'm not sure how evil they will be.

For instance, I use annotations to reflect clauses mentioned in the technical specifications:
@PublishEvent(events={"UserNotification.EventType.ACCOUNT_CREATING", "UserNotification.EventType.ACCOUNT_CREATED"})
public void createUser(User caller, User targetUser) throws PermissionException;

I also use the generic feature:
public interface User<P extends Profile<?> extends Entity
public interface Profile<U extends User<?>> extends Entity

That sounds a bit funny hey. I haven't yet found a good guide on how you should use generic smartly. Comments?

- yc

Sunday, July 6, 2008

Blog Ads == Sign of Immaturity

Feel free to disagree.

I have never been a fan of putting blog ads in my blog, as you can see as well, I apply a plain and simple layout. This is due to one very fundamental belief that Web 2.0 is data driven.

I once stood up in a public forum to point out that, people should be utilizing tools to efficiently obtain information/data/feeds, web browser is just an option. One reason to go against using web browser to visit a blog or news site is the unnecessary download of images, JavaScript, stylesheets, etc.

This belief has turned to an even-firm conviction as I started to use Swurl last week.

It has been so many years, and it looks like people still need more time to adopt Web 2.0 in the "right" way. What about the ads companies? Maybe they have to find ways to inject ads into content when web/HTML presentation is abandoned.

By the way, I made some DNS configurations, you can now reach me at

My blog address is now:
My Swurl page is at:
My (new) OpenID is at:

- yc

Friday, July 4, 2008

Welcome to Aflexi

Hi guys,

I did not touch on this in my status update a few weeks back. Anyway, here it is, I have left CustomWare Asia Pacific, a company that I first joined after my undergraduate study and which certainly had shaped my career pretty well -- worked on Atlassian and MuleSource products.

I am now starting a new business with my friends, a company called Aflexi, with a goal to transform the current state of the Internet to a better one, with CDN (Content Delivery Network). I am holding the position of V.P. of Engineering and.. we're still working on the website, feel free to follow our Twitter here. Catch me in the BarCamp Malaysia (first and ever) as well, there will be a session that I will be presenting CDN to the folks.

Anyway, it is the birthday of Rob (founder/CEO of CustomWare) today, so.. happy birthday mate.

- yc

Wednesday, July 2, 2008

How opportunity is given to your team members? If you are given this common scenario.

Firstly, I am not facing such a problem now. The situation came into my mind and I was thinking about what would be the best solution(s), if it happens one day that I have to make such decision.

I scrolled over my long list of MSN buddies, but I couldn't find the right people being in the right companies (true that, there's no perfect company and each company has its own culture) to answer my question. If there's any books that you can recommend, do let me know too.

Here comes the question. Say, if you are a team leader who is running a small team and there is an opportunity which can only be given to only one team member. An opportunity could be, a chance to move to another project, or to lead a new sub-project in a team.

Very common problem right? But I would like to know how differently people will handle this. Generally, the leader will short-list the potential ones from the team and make internal discussions with the superior and/or the candidates; or, instead of short-listing the guys, you make this information completely transparent to the team and let those who are interested to come back to you.

I gave two suggestions above, but each comes with its own set problems. The first one could possibly kill the opportunities of others, the second one could generate more competition in the team, so..

What will YOU do and suggest? And, what organization you are in? An open one? You may want to tell me how often do you share information with the team.

- yc

Saturday, June 28, 2008

Changing Context Path of Hudson

Just a quick tip for whoever wants to change the context path of Hudson stand-alone continuous integration server. It runs on Winstone, simply adds the --prefix=/${context.path} to the start-up command.

Yes, they named it "prefix".

- yc

'publickey' SSH Authorization fails if 'authorized_keys' file is writable by non-owners

I didn't realize this. SSH kept prompting me to fill in password even though I forced it to use just 'publickey' authorization:

$ ssh -i id_kimmy -v
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/yclian/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/yclian/.ssh/identity
debug1: Trying private key: /home/yclian/.ssh/id_dsa
debug1: Next authentication method: password's password:

ssh -i id_kimmy -o 'PreferredAuthentications publickey' -v
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/yclian/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/yclian/.ssh/identity
debug1: Trying private key: /home/yclian/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,password).

Fixed by revoking write permissions (chmod 700) to the authrozied_keys file. Very simple logic, brrr.

Some links that I came across:

- yc

Friday, June 27, 2008

Maven does NOT support SOCKS for HTTP

I have a internal repository which can only be accessed through SOCKS, so I thought, if I set up a <proxy> in settings.xml with SOCKS_5 as its protocol, it shall work -- to download artifacts from the repository through the proxy. By the way, the documentation is not clear about what you should specify for the protocol. I used SOCKS_5 because ProxyInfo sounded right.

After a few attempts, I realized from the error logs that Maven did not go through the SOCKS proxy I defined, it basically skipped it. I hooked my IDE to the process to for some debugging to realize that Wagon (the transport abstraction of Maven) chose to use LightweightHttpWagon to download the artifacts and would only know how to deal with HTTP based proxy. Wagon chose it by looking up for Plexus component with the role-hint of http, damn.

I believe I could create a local repository by mounting the remote end using FUSE/sshfs. I didn't anyway, I made HTTPd to allow external connections to the repository with basic auth enabled (the server uses Archiva anyway). That's quick and at least I wouldn't have to guess why scp or file wasn't working later.

Playing with Maven is a pain, sometimes.. or most of the time if it doesn't work.

P/S: If you can really make Maven to work with HTTP+SOCKS, let me know and tell me that I'm wrong.

- yc

Monday, June 16, 2008

WTF is wrong with RMI

Yes, WTF is wrong with RMI. Taken from the "Getting Started using RMI" page:

Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object. For an explanation of how code downloading works in RMI, please take a look at the tutorial on Dynamic code downloading using RMI.

UPDATED: Omg :) That's documentation for 1.4.2. If you refer to the latest one, it actually highlights on the classDir. So ultimately, my problem of not referring to a newer documentation.

Not paying much attention to these lines, it got me wasted a few valuable hours to get a simple example working. I have a Hello interface and a HelloImpl implementation with a main method in it to do the binding.

I kept getting either:

java.lang.ClassNotFoundException: foo.Hello
at Method)


java.lang.ClassNotFoundException: foo.HelloImpl_Stub
at Method)

Whenever I ran:
java -classpath classes/ foo.HelloImpl

The error is misleading. It made me wondered why Java would complain about ClassNotFoundException when those classes were in the classpath! To put that paragraph in bullet points:

  • Please set the CLASSPATH variable before you run rmiregistry, e.g.
    export CLASSPATH=classes/
    rmiregistry &
    java -classpath classes/ foo.HelloImpl

  • Or, please set the -Djava.rmi.server.codebase system property to point to your classpath when you start your application, e.g.
    rmiregistry &
    java -Djava.rmi.server.codebase=file:classes/ -classpath classes/ foo.HelloImpl

Yes, it was actually my problem of not reading the documentation clearly. But can't just the Java guys fix it so that it will pick up from the classpath without setting either the environment variable or system property?

- yc, rants!!

Sunday, June 8, 2008

Can't call method "value" on an undefined value at /usr/share/perl5/IO/Uncompress/ line 64

I tried to install SocialText Open about two weeks ago and it had then screwed up my CPAN. This is the error that showed whenever I tried to install a module:
Can't call method "value" on an undefined value at /usr/share/perl5/IO/Uncompress/ line 64

For not being a Perl user (I'm a Java guy after all and a Linux end-user), I went to #perl of to seek for some help and I was asked to raise a bug instead in the Ubuntu site. I didn't do it nor tried to fix it after that as I was stuck with other higher priority tasks.

I have a little bit more time this afternoon so I asked Google for an answer and it appeared to have more results this time (two weeks ago, it had just two entries). That basically has concluded that this is a pretty new problem on Debian/Ubuntu.

Removing libcompress-raw-zlib-perl solved my problem, as suggested by nxadm. You may also want to try other options provided by other blog readers if you hit into similiar issue.

Good luck messing with Perl.

- yc

Saturday, June 7, 2008

PGP Signing and Encrypting Emails

In our company, we use PGP to sign or sometimes encrypt emails due to the agreement with customers who demand high security. However, as for my personal mails, I have never put PGP into the equation.

So I spent some time in the afternoon to set up PGP for my personal accounts (and got the chance to play around with revocation too). I got myself to set up Enigmail too, a Thunderbird extension to manage PGP keys and your mails with them. As a Linux user, I actually use GnuPG more (and it works, I'm not sure why uploading keys to MIT server failed a few times on my browser and Enigmail) and here are the commands to share, for GnuPG and support for OpenPGP:
gpg --gen-key
gpg --export >
gpg --export-secret-keys >
gpg --armor --export >
gpg --armor --export-secret-keys >
gpg --armor -a --export >
gpg --armor -a --export-secret-keys >

Remember to protect these files, e.g. chmod 700 *.

I will be digitally signing my emails from now on anyway and whenever necessary encrypt them. Here is my public key for, which you can also find in the MIT key server:
Version: PGP Key Server 0.9.6
Comment: PGP public key for


I have a question, where would be the best place to store my private keys? I actually had them packed in a protected zip and sent over the wire to somewhere. The sites returned by Google suggest to do paper or disk backup.

Now if every one in this world uses PGP and applications are built with its support, will people still be the victims of phishing?

- yc

Friday, June 6, 2008

Some Status Update

Haven't been blogging much as I have been busy with some stuff lately, although I have been heavily blogging in CustomWare's intranet, like one blog or two blogs per day. This is a quick blog to update you about what I'm up to these days.

We, the Malaysian Java User Group, just had a meeting two weeks back and we want to keep this momentum up. Naresh has volunteered himself to speak on Spring and what we have to do right now is to bake when and where it will be.

The Malaysian Flex User Group had a "write a review for Flex builder 3 and win a free license" event not too long ago. I got one. :) Here is the review.


Thursday, May 15, 2008

Job-Ad: Hiring Geeks to Support an Open Source Middleware

Posting a job advertisement that I have just posted in Lowyat.NET forum.

Hi guys,

My company is looking for experienced technical guys (and girls of course) to support an Open Source middleware product (Java-based). If you have strong enthusiasm in open source or you want to pick up challenges to learn a middleware in and out (so that you can write one yourself in future, I guess?), you may want to continue reading this. If you think you can do greater things than being a support engineer, you're out, go achieve your developer / architect dream.

The primary nature is fairly simple. You will be one of our team members in covering support within a specific daily time-frame (yes, not 24x7 standby) for the global customers of this product. You will be receiving support tickets from the customers usually through portal (there could be other communication protocols) and reply to them within the defined SLA. No, you won't be picking up a phone call from a desktop customer then guide him how to install and uninstall an application (even if it happens, that's very-very rare). You will be dealing with project leads, developers, system administrators who have questions or problems with integrating the product with other systems (such as WMQ, Oracle DB, SOAP, etc.), using the API, etc.

You are, of course, having other things to do in your job such as sharing knowledge with teams and customers through wiki or knowledge-base, writing extensions for the product, etc.

The requirements?

1. Your attitude. Like I have mentioned at the introduction of this post, if you think you want to support this product, you should drop me an email. If you think a techie's capability is judged by the lines of code they have written or you think doing professional support is a shame, you are out.

2. It requires you to have good understanding with messaging and integration. I hope you have heard of EAI patterns or MEP, have experience, or you are ready to learn them.

3. You learn things quick. Yes, it would be the best if you already have a few years experience in the industry, but one with experience could take 1 year to learn SOAP but a whizkid could take just 1 day. When a high severity ticket is filed, you will not be having your own sweet time to slwoly learn how to setup MBeans in JBoss, there is an SLA! So yes, you have to learn things quick.

4. You can communicate. Not just to have good command of English but you are able to deal with customers politely and professionally. You also need to be able to communicate with the internal teams efficiently. If you are a geek who will just be sitting down and segregate yourself with the world, this job doesn't suit you.

If you think you are the person with the requirements mentioned above or you have a friend who is interested, drop me an email at yuenchi.lian _AT_ By the way, our office is located at Plaza Sentral of KL Sentral, the hub of public transportation.

Saturday, April 26, 2008

Hardy Heron

Left office with update manager on to upgrade my work machine "Nemesis" to Hardy Heron. Gotta check it tomorrow. :-)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy

However, I have no luck on my home machine "Kate". I have filed a bug report at Launchpad and hopefully I can get some help from the community.

- yc

Saturday, April 19, 2008

A Review on Adobe Flex Builder Linux Alpha 3

Initially when I started to write this review, I downloaded and set up Adobe Flex Builder Linux Alpha 2 on my Ubuntu machine, faced some troubles which some will be addressed at the Troubleshooting section. It was left with just three days for evaluation and I got stuck with work. By the time I had the time to start a proper review on it (by following the materials provided by Adobe), it was already expired. I had to download the Alpha 3 instead, which was released on 31st of March.

Just in case that you had the wrong idea, Adobe Flex Builder (I will call it the "general release" to avoid confusion), which can be obtained from this address, is not the same project with the Linux release. They are both on two different projects, where the former follows the Flex product schedule; the latter at this stage is not a full release and not all features of the general release are implemented in it. Please read the release notes of it for a list of supported and unsupported features.

To give a short introduction about myself, I have no Flex technical experience prior to doing the review, knowing just general idea of it. However, I'm a supporter of the MyFUG (Malaysian Flex User Group) and I attended most of their meetings.


Flex Builder is an add-on to Eclipse IDE, a well-known IDE especially for Java-based development. The general release is a commercial add-on but is completely free for educational purpose, it is also available free for 60 days evaluation. The Linux release however is release for evaluation purposes only and it has a fixed expiry date for each release. If you want to find out more about the price and licensing details of Flex Builder, please read this link.

Eclipse is a mature, feature-rich and extensible IDE. Having Flex Builder to be an extension of it gives developers a very-well integrated environment for different kinds of development that could fall under the same project, e.g. developers can easily switch from Flex Development perspective to the Java Development perspective, etc.


As you would have already read from the release notes, the Linux release doesn't support design view at this stage. It provides you with Flex SDK version 2 and 3, Flash Player, JSEclipse, Adobe AIR support and more others that you can read from the What's New.

Without a Design View could actually be a big issue to some people, but given that Unix-based users generally love text more than GUI, it could just not be the case. Plus, writing Flex application using vi editor can longer be that quick in comparison as the Flex Builder provides you with features such as content assistant, quick navigation to API source, etc.

Followed the review guidelines, I developed a simple application with an advanced data grid (read also this) which its data is populated from a local XML file through the HTTP service. The advanced data grid is part of the Data Visualization which is shipped as a trial with the Linux release since Alpha 2, it therefore places a "Flex Data Visualization Trial" watermark in the UI as you can see from the screen-shot below. Another feature that comes as a trial is the Automated Testing.

The solution to remove the watermark seems explained in this blog entry.


So you may question, how bad it is without the Design View. I wrote nearly 50 lines of code with not more than half of them are realizable in the general release via Design View, i.e. <mx:Application/>, <mx:Panel/> and <mx:AdvancedDataGrid/>. The rest of the code is <mx:HTTPService/> and action scripts. Therefore the answer is very subjective to the nature of the application which you are building. If it consists of a lot of UI components, the development can definitely be sped up with drag-and-drop and other features provided by the Design View.

I am not too sure if the general release has the same behaviour (which I doubt no), content assistant does not work for advanced data grid. It turned out to be quite annoying, but knowing that Data Visualization is still at trial, we can safely say that it is not a bug.

I am also very much concerned with having a Maven 2 plug-in for Flex development. There is a popular issue tracking this at SDK-12730.


I had some issues initially when I tried to install the Flex Builder on my system, which is an Ubuntu 7.10 Gutsy Gibbon running on a 64-bit machine. There were a few requirements mentioned in the release notes that I missed out the first two:
You will have to run update-alternatives to replace the default java executable, e.g.
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.5.0-32bit/jre/bin/java 50
I also hit into the following error when I was trying to start the installer with JRE6:
Runtime link error - it appears that libXt got loaded before libXm,
which is not allowed.
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
at sun.java2d.SunGraphicsEnvironment.addDirFonts(
at sun.java2d.SunGraphicsEnvironment.registerFontsInDir(

The quick workaround to this is to set the AWT_TOOLKIT environment variable with the value XToolkit.

Further Reading and Other Resources

Friday, April 11, 2008

I'm a Java guy

Learned from KageSenshi that, there is a meme happening at the Fedora Planet, that is to execute this command:

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head

Here's my result:

yclian@nemesis:~$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
110 ls
109 cd
41 sudo
39 svn
37 mvn
21 cat
12 java
10 $JAVA_HOME/bin/java
9 find
8 sh

svn, mvn, java. What a Java guy.

It's your turn now. :-)

- yc

BridgeComponent.. OMG

In Mule, BridgeComponent is the root of a lot of evil if you do not pay enough of attention, for instance, you might be wondering why interceptor was not working then realized that BridgeComponent was the culprit!

What is a BridgeComponent? According to the API documentation:

The BridgeComponent is a standard Mule component that enables a bridge between an inbound and outbound endpoints. Transformers can be used on the endpoints to convert the data being received in order to 'bridge' from one endpoint transport to another.

When the BridgeComponent is used, it configures itself so that it will not actually be invoked, instead it tells Mule to bypass invocation of the component, which has a slight performance improvement. Note that because the component is never actually invoked any interceptors configured on the component will not be invoked either.

It is an implementation of the Messaging Bridge pattern in integration. A messaging bridge is responsible to connect two different channels, it is smart because it has a big list of channel adapters.

Fair enough, the API documentation has warned you about interceptor. It's all your fault if you did not read it.

I had been working on a response router problem since morning, scratching my head since then, and in the end realized that the culprit of my unexpectation was the BridgeComponent. What is a response router? Basically, in Mule, a response router is used for request-reply scenario, where a request will be blocked until a response is formed (usually using an aggregator) from results of asynchronous calls. But what is the problem? When my client sent a request to Mule, it received a null response straight after the invocation, before the asynchronous calls were ever made.

I had done a lot of debugging, drilling into the code to find out which part that I could have missed out, perhaps it would just be a missing property? Yes, there was a lot of WTFs. Until I did a full code search on "*ResponseRouter" and noticed that DefaultMuleProxy was in the results..

What had happened? The DefaultMuleProxy is a proxy to a UMO component and it handles its lifecycle (start/stop), interceptors and message routing (which includes response router). When you use a BridgeComponent, request will be forwarded from the inbound to the outbound directly without invoking the UMO component, and thus the response router part will not be not taken care. As Mule dispatches messages asynchronously if ReplyTo is detected at the outbound, a null response will be returned. This explains why I was getting a null response.

So, please take note when you are using BridgeComponent!

- yc

Sunday, March 30, 2008

Art and Stance

Heard this from a drama just now and it makes a lot of sense to me. Architecture is an art, thus as an artist you should have your own stance. Put aside your boss' and customers' opinions.

Likewise, software architecture is an art, your software is an artifact – a piece of art. Therefore, you design it and you justify each part of it.

- yc

Saturday, March 29, 2008

FOSS-SM April 2008 Meetup, Selenium Web Testing Tool

I will be giving a presentation on Selenium this Thursday at the FOSS-SM meeting, more details can be found here:

Your support will definitely be appreciated, please join me to attend this.

- yc

Friday, March 28, 2008

I'm Clean

Did you mean clean? My colleague David showed this to me when he was looking for my online profiles.

Google gives 20,500 results for yclian, 7,760 for "Yuen-Chi Lian", 3,360 for yuenqi, 1,060 for yuenchi.lian, 290 for "Lian Yuen Chi".

Anyway, you are urged to join the Earth Hour at 8 - 9pm of your time tonight, read more about it from the link.

- yc

Tuesday, March 25, 2008

Fashion for Software/IT Guys?

The IT people generally prefer wearing t-shirt and jeans to work, at least that's what most of my IT friends prefer. In some companies, which professional dressing is required for Monday to Thursday (like mine), traditionally, guys will go for a simple sleeve and slack, girls will prefer chino/straight skirt. And they all like moderate colours (just not funky or too bright). Let's call this "standard" dressing.

Especially in Malaysia, which is warm every day, people go with one-layer dressing, you hardly see someone with coat, cardigan, jumper, sweater, etc.

If you wear something that's not within the standard, say, a short sleeve with a skinny/fit tee at the outside and a bright tie. Your colleagues will start questioning why you are wearing in this way, or telling you that you should be wearing in that way, blah and blah.

I have recently changed my fashion style, GQstyle is my source of inspiration (no, I don't buy Paul Smith or Moschino, I can only afford around the price of TopMan). I bought cardigans, new shoes, belts, ties, and braces.

I don't agree that you wear simply because you just want to cover up some parts of your body, I believe I wear is to show who I am and how unashamed of my own ideas and mixtures. When I feel gloomy in the morning, I will pick light blue as the fashion of the day, it makes me looks brighter. When I can't think of something better for that day, I will just grab a cardigan to make myself to not look too plain.

I always like to look at how the Paul Smith's models wear. I think IT guys can wear like them too. Don't you think so?

- yc, geek.. talks about fashion

Saturday, March 22, 2008

Dangerous Constructions

The Adrian Newey-penned RB4 was suspected in violation of the regulation about "dangerous constructions". It has now given green light by the FIA guys anyway.

Adrian Newey is a Formula 1 technical icon, and that got me to think; To think about as a software designer or architect, have you ever designed a dangerous construction that performed godly. What can be classified as dangerous construction in software engineering?

I have watched how ugly the suspension of RB4 turned in Melbourne and Malaysia. Kind of scary.

Wednesday, March 19, 2008

Qi4J on the 13th

Supported by the Malaysian Java User Group, the FOSS-SM hosted the March meet-up with the presence of Rickard Oberg on the topic of Composite Oriented Programming in Java using Qi4J.

It's a good occasion to meet Rickard in person and other JUG guys -- Edward, Bernie, KC., ..

Qi4J in short is an implementation of Composited Oriented Programming (COP), an idea heavily influenced by the concept of Domain Driven Development (DDD). You can read more about its background from this page. Aspect Oriented Programming (AOP) and Dependency Injection (DI) are essential parts of Qi4J to achieve DDD (you might want to check Matthew Podwysocki's blog).

In Qi4J, you no longer think about objects but composites. A Composite is a collection of fragments, where a fragment can be a Mixin that holds the state of the composite, a Constraint that validates the usage, a Concern that handles contextual behaviour or a SideEffect that is used for notification. Here are some resources to help you more with it:

I like the general idea personally, just like how I like AOP at the first time I got in touch with it. Clean code, domain centric, separation of concerns, and low coupling between components (that also promotes reusability).

There are some concerns from the ground too, that,

It is Hackish

To some people, the framework looks completely like a hack to achieve something can not be originally done by Java. I beg to differ with that point, programming to me is a lively and creative area of computer science, with a good design and deep thoughts, we are actually leveraging the Java platform to introduce a new programming style. Just like how people use Spring and its applicationContext.xml to do AOP.

Learning Curve and Adoption

Learning curve is a major concern too. The discussion focused on how long it would take for new and old Java programmers to adopt to this new programming style. My opinion is, what truly drives someone to do something to be different from the norm relies on how widespread and the quality of the new concept; as well as how conservative an individual would like to remain, a comfortability issue. Likewise, not everyone uses AOP, ORM, etc. because they do not see the point, accept the idea, or are comfortable with what they are currently doing. But certainly, Spring has a very good documentation and from the way I look at it, Qi4J is going to have one too. :-)


A realistic concern. I talked to Niclas and Edward (folks from Jayway, the core committers of Qi4J) after meeting. They shared with me that, which is also written in the website, Qi4J is not production ready. The product is still undergoing development and the team has not yet done any performance tuning. Take note that it doesn't even have a binary release at the moment. A more mature codebase should be ready by end of this year.

I am ending this blog entry here. Like I said, I like the idea of it and Qi4J definitely worth revisiting at a later time and since it is an OPS4J project, I will definitely find a time to contribute to the codebase.

Lastly, please visit our JUG's blog for a list of other blogs that discuss about the meeting.

- yc

Sunday, March 9, 2008

An Era Where People Express

I did not study the history of civilization and democracy in detail, all I have is from the high school. But I am certainly sure that the result of the 12th general election yesterday has certainly marked a watershed in the history of Malaysia after half a century.

One factor contributed to the setback of the ruling coalition is how the government stumbled badly on the issues of bloggers, Internet media and street demonstration. They made a wrong move -- they tried to control, suppress, and ignore our voice.

Web 2.0 should be called World 2.0 instead, as it redefines not just the Internet but the world in terms of learning, communication, collaboration, and business. People are more open, open to discussion, open privacy boundary, open source, open API, ... They express.

When you go online, you see the mood and state of mind of your friend from his MSN personal message or Facebook status. You read about his life, work and vision from his blog. You can see his social activities from his Flickr and Facebook photo tags. You are also invited to events to get into a closer touch with the people. Then, you learned that you are one of us, we want changes, we want our voice heard, and we dislike how authority controls and manipulates.

Among our generations, there are still people who remain behind the times and you could be one of them. How are you repositioning yourself?

In the city that I am living, a lot of people carry an MP3 player like I do in the train, but not many move with the music like I do. Let's move.

- yc, expresses

Friday, March 7, 2008

The Day We Decide

If you are a Malaysian, you are supposed to know about this; if you are older than 21 y/o, you are one of us who can decide; if you are not a Malaysian, basically, today is the day of general election.

I want a effective, fair and clean government, for the people.

- yc

Sunday, March 2, 2008

Are you overworked, IT guys?

I have come across so many friends who are overworked by their employers, especially those from the IT field, the issue of underpaid sounds serious in Malaysia. I could be wrong, so feel free to drop a comment if you have other opinions.

In Malaysia, our salary has been stagnant for years, and I believe that's part of the reason why it attracts foreign investors. When it comes to the argument of employees being overworked, there are two factors that we can look into:

  1. Employees are not being efficient.
  2. Management is being unreasonable, in terms of deadline and human resource.
Most of the time, both are valid. For an old-school manager who is not willing to adopt to new methodologies, his interest is to squeeze the most out from the project and his employees for a high ROI. Driven by this, he is likely to commit to an unreasonable deadline and cut down the cost by hiring just-sufficient (usually turned out to be not, due to inefficiency) human resources.

Sounds familiar to you? I am happy that I am not working for this kind of company.

In the end, the development team faces huge pressure, as the deadline comes closer it turns worse, and they stay late to work even on the weekends. Driven by this, the employees are no longer efficient and neither they are happy and motivated -- They will choose to leave.

What will happen when they leave? The company has to hire and train new guys again, that's a terrible investment and due to their management style the company will forever be haunted by high turnover rates. And generally (yes, I say generally, not all, based on my experience) since most Asian companies share the same management style, the employees will end up in the same type of company and they will.. be forever unhappy until they are retired.

I have created a Jyte claim: You are overworked and your employer is not hiring sufficient human resources. When I'm writing this, one of my friends is making the decision to leave her company. Why? The project has to be delivered on April, but she has been working 7 days per week since late-January. On Friday, she was talking with me on MSN when she was still in the office, the time was 1am morning.

- yc, what do you feel?

Monday, February 18, 2008

Where the Malaysian Java User Group is heading to?

Not just the website, there are more things that you can do for the group, really. I am a believer of "community for the people, by the people". The group will never work without a group of good leaders, active members and industry support. So here are a few suggestions:

  • Spread the words
  • Be the committee
  • Be the sponsor
  • Keep an eye on us


I have just blogged about the direction of our JUG in the website: what we have been doing, what we can do, and what we will be doing. The blog can be found at:

- yc

Wednesday, February 13, 2008

FOSS-SM February 2008 Meet-Up

I'm just back from the FOSS-SM (Free/Open Source Software Society of Malaysia) meeting. Thanks Kenneth Wong (of Exoweb) for giving us the presentation.

Had some talks with the Jayway folks, Niclas Hedhman and Edward Yakop, at the mamak after the meeting. Niclas mentioned a lot of names, and yes, I did not know who's Rickard Oberg (the creator of XDoclet and Webwork, the brain behind JBoss). Then I heard some stories about Joost too.

Next month, we might hear something from Rickard, on Qi4J.

- yc