I am Finally 30

August 25th, 2008

Not that I’ve been waiting for this moment but it’s here.
I asked my parents on my father’s 62nd birthday dinner how they felt when they turned 30.
This was his answer, roughly translated…

“We didn’t have time to think about how old we were. We were too busy looking for food for you and your brother”

What an answer I thought. Do you remember how you felt when you turned 30? In my situation, I am a bit depressed. My parents had family to feed at age 30. I on the other hand… don’t really have anything to show for except for raging alcohlism and addiction to nicotine.

When I turned 21, I had some what of a dream to accomplish certain things before I turned 30. Would you like to know my top 3 list?

  1. 6 figure salary
  2. Run Full Marathon
  3. Fit body.

So, did I come close?

The answer is, sadly NO.

I don’t make 6 figure salary, I have not ran a full marathon and I am Fat.

Man. I wonder how many people actually achieves their goal before they turn 30?


Every Office has one.

June 3rd, 2008

Have you noticed this? I’m sure lot of you already have.

1. The smokers. I am one of them. When I first start my job, I usually look for fellow smokers. Why? Cause we stand in similar cause. We are all rejects of health craze society. We are rebels. We are “cooler” than most normal people. We also smell.

2. The Geek Squad. There are always atleast two in the office. They pretend to know everything about everything. Not only that, they are supirior among everyone else.  The laws of company HR nor socially accept professional behavior applies to them… So they think. Lot of times, they speak in different language, aka the geekian.  They are mostly Men. I should tell you though, if there are women among them, you should give you A game to hook up with them for they are FREAKS in bed.

3. The lazy fat people. These people are just… well… FAT and LAZY. They’ve been with the company for so long that they don’t give two shits about what people think. They usually smell too.

4. The Cool people. These people may or may not be good at what they do but they are fun to hang out with. Usually they have supirior social skills and hook up with eachother as many times as they can during company parties.

5. Alcoholics. I am one of them. We pretend we are part of cool people but when it comes down to it, we just wanna drink on company’s dime. We sometimes come into work with blood-shot red eye and smell like we just woke up next to ugly hooker next door. When you spot them, be sure to ask about the crazy night. They will tell you that they ended up with some hooker next door.

6. The grandpa/grandma crew.  These people are the ones who are about to reach their retirement age and usually very cool to hang out with. They give much wisdom to younger rookies as well as to seasoned employees.  Grandma crews are like your mothers. They look after you and they are almost always nice. Grandpa crews are like pimps gone wrong… Nah, I joke. Not all of them are. These guys are cool to hang out because it’s a site to see when they hit on younger lady employees.


Colbert Vs. Rain - Dance Off

May 21st, 2008

I was flipping through the channel and found myself watching Colbert Report on Comedy Central. They FINALLY Met… Rain and Colbert.  Hahahahaha. Good job Colbert on the dance moves. And Rain, thank you for not speaking. hahahahaha


Steven Colbert… Don’t try to beat Koreans.. We OWN YOU!

April 29th, 2008

Need I say More?

We RULE… That’s right… No matter how GAY Rain might be… We still Win

hahahahaha

I actually checked out the 1ist of the 100 most influential people of the year pole
and Steven Colbert is number 2, trailing “Rain” by about 190000 votes.
NOT BAD…

Here is something to think about…

The most influential people in our lives these days are Entertainers…. Hum… 


Drools 3.0.6 - Serialize compiled Rules

April 25th, 2008

I’ve finally figured a way to serialize the compiled rules for real time deployment. I’ve been struggling with serialization using Drools 3.0.6 for a while now. I’ve been told that many of bugs surrounding compiled rule object serialization has been fixed for later versions of Drools. Matter a fact, the process of serializtion completely changed from Drools 4.x and above.

For those of you still using Drools 3.0.6, (I wouldn’t be surprised If I am the only one) here is a sample way of going about it.

First, serializing RuleBase object is still out in Drools 3.0.6. It still complains about a class that doesn’t exists with release of Drools 3.

Way to go about it is to serialize the package. I’ve experienced class loader issues when serializing Package objects for prior releases of Drools, specifically Drools 3.0.5 and below. Drools 3.0.6 seem to have fixed these class loader issues.

When you compile rules, DRL or DRL/DSL, it produces a package object. These packages are added to RuleBase object through RuleBaseFacotry and finally, an instance of working memory is created. Out of the three step process, compiling the rules is the most memory intensive.  So serializing packages is where you will save most time and enhance performance. 

Before you start writing codes, be sure all your rules related java objects implements java.io.Serialize. But I’m sure you knew that already. =)

Using Eclipse IDE with Drools plugin, compile the rules and serialize the packages to Direcotry of your liking. Here is an example:

FileInputStream fsDrl = new FileInputStream(”myDrl.drl”);
FileInputStream fsDsl = new FileInputStream(”myDsl.dsl”);

Reader drl = new InputStreamReader(fsDrl);
Reader dsl = new InputStreamReader(fsDsl);

PackageBuilder buildPkg = new PackageBuilder();
buildPkg.addPackageFromDrl(drl, dsl);

Package pkg = buildPkg.getPackage();

The above code will give you the compiled package object of DRL and DSL. You can proceed on to serializing this package object using standard java serialize process. Here is an example:

File pkgFile = new File(”myPkgOut.out”); //the file name can be anything of your choice.
FileOutputStream fOut = new FileOutputStream(pkgFile);
ObjectOutputStream objOut = new ObjectOutputStream(fOut);
objOut.writeObject(pkg);
objOut.flush();
objOut.close();

Simple isn’t it? Reading in the serialized package is can be accomplished by using FileInputStream and ObjectInputStream available in standard Java.

Hope this helps anyone Drooling~


Trapped in the elevator for 41 hours!

April 22nd, 2008

HOLLY Crap!, Can you imagin being in the elevator for 41 hours?
By YOUR SELF?

I don’t know what I’d do if that was me.


Another free movie/T.V. show site~

April 18th, 2008

http://www.surfthechannel.com/

Yes… My coworker points out to me it’s Illegal, but who cares! The movies you see here maybe a bit off. I’m talking about Hand cam versions… Cool site.

 


Do you Hulu?

April 18th, 2008

www.hulu.com

One of my favorite site to watch movies and tv shows. Love this site. It can get a bit slow but who CARES! It’s Legal and it’s FREE!


Human Tetris…

April 17th, 2008

I tell ya… I feel like Japanese folks have done everything and they are running out of ideas for T.V. shows… HUMAn TETRIS???? Who thinks of things like this?


Drools 3.0.6 - API compiler gone crazy.

April 14th, 2008

I’ve become very friendly with Drools 3.0.6. So friendly that I am beginning to have fights about eachothers faults.
This one is the newest one I found.

Long story short, I implemented usage of DSL with DRL.  This method made it easier on the non-technical people to read the rule files.  Syntactically, DRL needs to identify a proper DSL in order to work properly.  When I say “proper”, I mean existing file. Check out this example:

package rule.sample.anjoe

import anjoe.test.pojo1;

expander anjoeDsl.dsl

Above is the first three lines in my DRL file.  The “expander” keyword identifies which dsl mapping file is used for this DRL. Have you ever tried to put wrong DSL file name as the expander value? The Eclipse IDE will immidiately tell you that there is an error.  But what about when compiling the rules using the API in online application environment?

The standard java code is used to read in the DRL and DSL files from the file location using Reader object. You create new PackageBuilder object and call addPackageFromDRL method with two parameters; DrlReader and DslReader. As far as compiler is concerned, both DRL and DSL files needs to be valid without any errors.  If errors exists, like wrong DSL file name as expander value, the method call should fail. RIGHT? apparently NOT!!!!

When compiling the rules through JAVA API, as long as you pass in proper DRL and DSL reader object into the addPackageFromDRL method, it compiles and everything is honkie-dorie~

In Eclipse IDE, this is a no no for built in IDE rules compiler will bitch at you right away.

Has anyone come across this? Shoot me an email. joe@anjoedesign.com