Sunday, November 27, 2005

Woke up this morning and discovered that two of our RM50 notes shredded to pieces. The only living object in our apartment who could reach into our wallet and who does not appreciate the real value of RM100 is no other then our Monster, Donut ...

At first, I was so so very upset because RM100 could buy me a lot of things eg: 10 “Magic the Gathering” booster packs or two gold class movie ticket or one very good Thai Massage or .... (the list can go on and on) but ... ahem, as an “understanding” father, I think I better give the Monster a benefit of doubt.

Maybe the "Culprit" is a bird or is it my other two green turtles who has committed the crime, right? So, here's how I started my very “detailed” crime scene investigation (CSI). Aha! I found two tiny pieces of RM50 notes hidden between Donut's fav places - the floor cushions. The tiny pieces matches perfectly with the big dollar notes plus the notes are slightly wet with Donut's saliva. Thus, little monster must be the Culprit. Better bring him for questioning .... After about 10 minutes of questioning, Donut finally admitted he chewed the RM50 notes.

...... no,no,no.....that pathetic or "please for give me" look will not help you a bit !

After he admited that he did commit the crime (no reason given), we decided to bring Donut to Local Police Station for confession..

Donut is punished in cage for two hours. We think that the punishment is too light.

Wednesday, November 23, 2005

Donut's latest Video

Oh my god, just realized that I haven't updated my blog for sometime, sorry for all my fans out there (I do have fans, right?.... or do I?) . Being very very busy on work, so sorry. To apologize, listed below are some Latest Donut Video we taken past weeks, I hope u will enjoy them, some of them are very very funny.

  1. Donut enjoying his daily greenie.

  2. Donut at daily training session

  3. Donut somehow don't remember how to do “High Five”

I promise I will continue update my blog...promise...till next time, kisses from Donut!!!

PS: All the video are encoded using WMV format, which is not "Linux" or "Unix" friendly..could someone tell me how to convert a WMV file to a more friendly real media file?

Wednesday, October 05, 2005

Why I love Pug so so much

Hi all

Check this out, this pug is so smart....
Nowonder my dog food consume so fast, must be that little buster!

For those who miss Donut, here his recent cutest picture..

Thursday, September 22, 2005

Donut Diary - Dogathon 2005

Hello, bow bow, wow wow!

Last week, my owner brought me to “Dogathon Kuala Lumpur” to socialize with other doggies. There were a lot of games,competition and foods for me ... bow bow, wow wow.... here were someof the pictures taken at the Dogathon:

There were many kinds of dogs at the event. Some with nice cloths and accessories, and some were “naked”.

“Cowboy” dog from Texas!!

Joyce bought me new clothes which was cute with red stripes but my father complained that my new T-Shirt is more expensive than his T-Shirt!

But I want all the nice clothes... I don't care...

“Hi, could I rest beside you for a while”

Out of sudden, I saw the biggest dog ever. He is really big!! very big!

So, now u see, how tiny I am.....oh man! I need some protection from the very huge dog.

Big Dog: Kiss my nose and I will protect u.

Me: OK, God Father ...

That is all for now. I hope u like my doggie adventures. Untilnext time ... au revoir !

Donut Diary - I went to Party!

30th July 2005- Saturday

I overhear there is a party for pugs. So I beg my slave James to bring me to the party.

“Hello, I want to go to PugSquad party! I want to meet with other pugs....please.......please!”

James: But I am so tired ... I need to rest OK?

Joyce: I am also very tired. Please understand OK, nice puppy!

Note: The PugSquad party is a monthly gathering event for Pug Owners in KL area.

I don't care....I want to Go To Pugsquad Party! I want to meet with other puggies ... bow wow, wow wow!!! If you don't bring me to party, I will bite the sofa, pee pee and poo poo everywhere...

OK, my slave owner finally granted my request and preparing me for my first big social event.

I am so handsome and so ready for Party, yes!!!!

At the party!

“Hi, I am Donut, very nice to meet you !!!”

L-R Doggies: Smith, Sugar and Donut

“Let go of me, your armpit is so smelly”

“Where are my slave (i.e James and Joyce) gone?”

“Who cares!!!, let's party again...1, 2, 3 and 1,2 3”..

Slave: “ So, u happy now?”

Me: “Yes!!”

Slave: “And, you want to go for next party?”

Me: “Yes! Yes! Yes!”

It's 10.00 pm and I'm so tired and sleepy already .... What a night !

Donut's Diary - Please Take me home II

8th July 2005


Ops, sorry, you probably don't understand my language.

I was picked up by my owners James and Joyce today, it's only a short trip from my ex-owner's shop to James's apartment (I mean "my home" also. I guess I have to stay with them for a very very long time). Upon arriving at the apartment car park, James "sneaked" me into a box full of toys and quietly transport me back to his apartment. I don't know what's the reason they are doing this but it's fun! I think my Master James's job is a spy or something because he introduced himself as (with a very cool voice) "Khoo, James Khoo, 008"...ha ha..

I popped my head out from my box and the first thing I heard from James and Joyce is "Donut, Donut"....hmmm...sound like they are very hungry, and they are looking straight into my eye while calling "Donut!!", scary.

Later I realized DONUT is MY NAME, although I don't know which part of my body look's like Donut, I kind of like the name..

Hey, got to go now, please leave a comments to my Master James to treat me I am so so lovely, and adorable, cheers!

Donut Diary - Please take me home

[Me talking to myself at one of Peg Shops in KL. yesterday]

..Wow, look at this puppy (A two months old pug, he is so adorable, I wants to take him

..Wait, stupid, you can't have the puppy, stay in Apartment in which Cats sand Dogs are prohibited.

..but, he is so cute, look at his eye, he is begging me to take him home.

..So, who's going to take care the puppy, what's ur plan to “sneak” the puppy in apartment. It's a huge responsibility to adopt a new pet, you know..

..but, he is so cute!!!! I don't care..I want! I want!


Paid RM200 down payment to the shop owners, I am taking him home this Saturday. Picture on next blog

[Movie Review] Nobody Knows

The movie “Nobody knows” tells a story about how four kids (All under age 12) survived living in a small apartment in Tokyo, after their Mother abandoned them. This movie left a powerful and deep impact on me. At this very moment, the movie ending is still stuck on my mind.  I dreamed about it and woke up several times, thinking about all the kids in the movie. I almost cried this morning when I discovered from stories in the Internet that the movie is actually based on a true event which happened in Japan during 1988  ...

When I was watching the movie, I was upset because if only people around the kids could have paid more attention to their needs, their circumstances could be changed for the better,  ....  I then realised that the movie also projected the reality around us that “Nobody knows” repeat similar events happening around us everyday. How many times that we just walk pass the homeless people and totally ignore them? How many of us know our neighbors's name and their family too? How long we haven't called back to our parents and to find out how are they? How many of our hearts turn numb when CNN reports war or disasters happening far far away elsewhere? How many people are desperately seeking for help but "NOBODY KNOWS" ?

If we could just care a little more .....

PS. Please watch this movie . Don't read any critics or reviews first . And most importantly do share your thoughts with Me.

[Tips ] – “On the fly” deployment under NetBeans

Here's my problem, I have three set of application configuration files (e.g. project properties, hibernate configuration, log4j properties, and others) setup for three different deployment environments, there are:
-1. Production, my application will be connected to client's Oracle database, and log level set to warning.
-2. Local, HSQLDB running on my local machine will be use, log level set to debug
-3. Test, for unit testing purpose

I am a lazy person, I wants my build script to prompt me which mode I would like to deploy, prior it compile, package and deploy my application. Listed below are the steps to how I achieve that:
- Firstly, I create a folder name "cfg" under project project, I then create “production”, “local”, and “test” folders under the cfg folder.
- Put properties files in to respective folder, shown in figure below:

- Open build.xml and add in new target, called “-pre-compile”, which will prompt user deployment mode, and copy respective properties to src directory prior any compilation, as shown in code below:

    <target name="-pre-compile">
            <input message="Please enter deploy mode? (production, local, test)->"
            <echo message="Copying application configuration file for ${mode} mode"/>
            <copy todir="${src.dir}" overwrite="true">
                <fileset dir="${basedir}/cfg/${mode}"/>

- Clean and Build my project, surprise, surprise, Netbean actually popup a nice dialog ask me to enter deploy mode, as shown in figure below:

- That's very nice, but I am lazy person, remember. I don't want to type "production", "local", or "test" each time I want to deploy my application. So, I modified ant script a little bit by inserting a validargs element at the input taks, as show in code below:

    <target name="-pre-compile">
            <input message="Please enter deploy mode? (production, local, test)->"
            <echo message="Copying application configuration file for ${mode} mode"/>
            <copy todir="${src.dir}" overwrite="true">
                <fileset dir="${basedir}/cfg/${mode}"/>

- Clean and Build my project, Netbean surprise me again, by showing me a popup with a pulldown showing available delopyment modes.

Now, that what I called hidden Easter egg in Netbean..Enjoy!

[Help Wanted] Where are the dolphins?

I always believe I still carry a young and innocent heart, that why, my girl friend always call me childish, that's another story. Well, this has all change after I read Tor Norbye's blog last night :-(. Thanks Tor!

In his blog, he pointed "deceptive" picture, where most kids who see the picture see dolphins. I just can't! Here's the picture:

I had spent a good 30 minutes last night just to locate dolphins from the picture,this include rotate my monitor, change brightens and contrast of my monitor, change color, photoshop it and layer it and others, but where is the damp dolphins?

Could u help? this is very urgent.Thanks! 

Please change your email subject before replying a email

I feel annoy when receiving a reply email, where the email content are not related with the email subject. People are just “lazy” to compose new email, and fill in address field with new email subject, they simply wanted hit reply button, where the addree is pre-filled, even if the content is not related to the subject. Here's what happen to me today.

(Phone ringing)
Me: “Hello, James Khoo Speaking”
Wong: “Hello, James, this is Wong, could u send me your project status report ASAP. I have send u a email to remind u this morning.”
Me: “No, I did not receive any reminder email from u this morning.”
Wong: “ I did send!”
Me :No, you didn't”
--- One Minute later ---
Wong: “ OK, OK stop fighting like a child, Could u check your inbox now.”
Me : “OK, opening my inbox, let me check, you did send me a email with subject of “[RE:Wanted to see Star Wars III this Friday?]..but I didn't receive any reminder email from u”
Wong: “Tha't the reminder email, check the content"
Me:"Then in the first place, why don't u cange the email subject.."

What do you u think?

My First Comic -Software War

This is my very first comic. All characters are created from Planearium web site which I discovered from my friend Paul's Blog. At the same time, I also found another great blogger, introducing the only Sun Supper Support Girl, very fun blog to read! Anyway, here we go ...
Note: (All characters's name has been altered to prevent any legal issues...peace!!)

  Well, we know which side will eventually win, right? Hope u enjoy this short comic ..... and May the Force be with U !!!

[Tips] Wanted to use Log4j with Sun Java System App Server 8?

I prefer log4j over JDK 1.4 logging library, hera are some of the "obvious" reasons: How about log4j comes with more appenders compare to JDK1.4 Logging, it easier to configure, and support many layouts. However, log4j does not “sits” very well in our App Server, some of identified problems are:
1.Deployed logging configuration file (i.e. is totally ignore, even we put in correct class path.
2.Logger ClassCast Exception upon restart of an application server instance.

A further investigate reveal that our Apps Server use JDK1.4 logging (i.e. Java.util.logging) via apache commons-logging, which should be avoided according to this article, I agree. So, here's propose “work around”:
1.Write you own log4j wrapper class. Refer to “Ch9, Log4j, the complete manual” by log4j author Ceki Gülcü for more information on how to write a good log4j logger wrapper class.

2.Create a new Logger Manager, which will a)Configure log4j properties if is not configured yet b)Return the logger wrapper class to calling class. As an example of such Logger Manager class:
2:public class MyLogManager {
3: private static boolean isLogPropertiesConfigure = false;
6: public MyLogManager() {
7: }
10: public static MyLog4JWrapper getInstance(String logInstance) {
11: try {
12: if (!isLogPropertiesConfigure) {
13: PropertiesConfiguration pp = new PropertiesConfiguration(Constants.PRJ_PROPERTIES_FILE);
14: String configFile = pp.getString(
15: "");
16: FileInputStream istream = new FileInputStream(configFile);
18: Properties props = new Properties();
19: props.load(istream);
20: istream.close();
21: PropertyConfigurator.configure(props);
22: isLogPropertiesConfigure = true;
23: }
24: } catch (Exception e) {
25: System.out.println("Error :" + e.toString());
26: }
28: return new MyLog4JWrapper(logInstance);
29: }
3. Finally, use LoggerManager, and MyLogJWrapper for logging in your J2EE applications, example:
   1:public class MyClass{
2: static MyLog4jWrapper log= MyLoggerManager.get(MyClass.class.getName());
6: public void someMethod() {
7: log.debug("Testing...");
8: }

Tips: Making Hibernate 3.0 work with Sun App Server 8.1

I am struglling a bit recently on making a J2EE references architecture
(JSF 1.1 + Hibernate 3.0) work for our Sun App Server 8.1. for a local
project here. It work finally, here what I have learn:

1. Always catch runtime exception
Remember to catch the runtime exception in your java program whenever
you calling any hibernate functions. Most of Hibernate exceptions are
runtime, which mean by default most of programmer, including myself
will “forgot” to catch it, and issue printStackTrace( ) to find out the
actual cause of the problem.

2. Hibernate require few reflection
permissions for data mapping and reflection, adds the following
permissions to your appserver server.policy, which is
located at $AppServer8InstallDir/domains/domain1/config.

grant {
permission java.util.PropertyPermission "*", "read";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
permission java.lang.RuntimePermission "getProtectionDomain";

and finally

3. Copy Hibernate libraries (together with the runtime libraries, such as
your JDBC driver) to the Sun Java Application Server Class Path. For
Sun App Server 8.1, this will be at
Restart your application server.. that's all

Wednesday, September 21, 2005

My First Post

This is a very first post, just to verify everythings works....ignore it..