Thursday, May 29, 2008

Some "Really Neat" PHP Resources

I'm currently working on a personal PHP project and I just wanted to sort of "bookmark" the resources I've gathered and found useful over the past few days.

This is just my second PHP project and I feel like I'm beginning to like PHP better and better by the day.

Hope you also find these resources "really neat".

Wednesday, May 21, 2008

Effective Java, Second Edition

Joshua Bloch of Google is coming up with his second installment of the famous Effective Java book.

0321356683 Effective Java (2nd Ed)


InfoQ has an interesting article about the upcoming book and provides a sample chapter on Generics free for download.

Other books from Bloch include:

I've benefited a lot from the original book and I'm excited to see how this updated version will turn out.

Sun Tech Days in Manila

Sun Tech Days will be in Manila from June 17-19.
Now in its 10th year, Tech Days is a Worldwide Developer Conference that spans 15 cities across the world reaching more than 100,000 developers. This is your chance to develop skills and advance your career in a Web 2.0 world; share knowledge and grow your network; participate in communities with fellow developers changing the face of technology.

Below are some details on what the sessions will be like:
Two Java development tracks will cover sessions in the following areas:


So if you're in the area, and have some annual leaves to spare, be sure to check them out.

Does Certification Help?

I was recently asked by a fellow Ranch Hand (through Private Message) regarding my take on Certifications.

Subject:
Does Certification Help?

Message:
Hi, I have done SCJP, SCWCD and will now give SCBCD and then SCEA. You have done these certifications. Does these help in career? Which country do u reside and what technology u work on. Which technologies do u see as emerging ones in the next 2 to 3 years which will stay long.

Reply:
I'm from the Philippines and in a way it helped me in my career because whenever we get assigned to a different client, our 'paper' credentials are what they are interested in first.

But when you start working in a project, those certifications don't really matter anymore and what matters more is that you deliver on time and with quality.

I must say that my drive for taking certifications is really to push myself towards a learning objective. Without these certification exams, I think I'll be learning on a per need basis (I'll just search the web whenever I encounter a problem). But these exams help me focus on topics which should come in handy in the future (even though some of them I don't need yet).

For technologies, I think Web Services will be there for quite some time (but it's unfortunate Sun hasn't released the new exam for JAX-WS yet). After I finish SCEA Part II and III, I'm thinking of taking exams from other providers such as the Adobe Flex exam and probably some .Net exams.

Anyway, I hope this reply isn't too long and I hope these are the kind of answers you're expecting.

In summary, I think certifications help in two areas.

  1. It helps in the candidate screening process

  2. It helps developers have a learning objective


So would I recommend taking certifications?

By all means do take certifications, especially if your company sponsors them.

But remember that at the end of the day, it is your work attitude and contribution that will really matter.

Wednesday, May 14, 2008

TopLink JPA and HSQLDB Quirk

I discovered a weird issue when using HSQLDB as database provider for TopLink JPA.

We need to explicitly include the toplink.target-database property in the persistence.xml file to make it work.

[sourcecode language="xml"]

[/sourcecode]

Without that, you are most likely to get this error below when you run your application:

[sourcecode language="java"]

Query: DataModifyQuery()
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
...
Caused by: java.sql.SQLException: Table not found in statement

[/sourcecode]

I did not have that property set when I was using TopLink JPA with MySQL so I was a bit surprised why it was not working initially when I switched to HSQLDB.

Anyway, here's the complete properties element of persistence.xml for HSQLDB for your reference:

[sourcecode language="xml"]








[/sourcecode]

Hope I can save you guys a lot of trouble through this post.

Because it certainly took me hours to figure this thing out.

Email/IM Notification with Log4J

For years, Log4J has been the de facto logging framework for Java. I'm not sure if most developers are already aware of this but there are a lot of other neat things you can do with Log4J aside from writing debug lines to plain text files.

Among them are sending notifications through email, IM or even JMS when your log levels reach a certain threshold. It's a pretty useful feature especially if you need to be notified in real-time of problems encountered in your application.

I'd like to share with you some articles which I found useful about this topic:

So whether you're developing a desktop or a web application in Java it's nice to know that you have these options.

Tuesday, May 13, 2008

Wi-Fi Detector Shirt

After downloading the quickfix library from SourceForge, I was redirected to a very interesting advertisement from ThinkGeek.



That of the Wi-Fi Detector Shirt.
Here at ThinkGeek we're pretty lazy when it comes to technology. We expect our gadgets to do all the busywork while we focus on the high level important tasks like reading blogs. That's why we hate to have to crack open our laptops just to see if there is any wi-fi internet access about... and keychain wi-fi detectors, we would have to actually remove them from our pockets to look at them. But now thanks to the ingenious ThinkGeek robot monkeys you can display the current wi-fi signal strength to yourself and everyone around you with this stylish Wi-Fi Detector Shirt. The glowing bars on the front of the shirt dynamically change as the surrounding wi-fi signal strength fluctuates. Finally you can get the attention you deserve as others bow to you as their reverential wi-fi god, while geeky chicks swoon at your presence. You can thank us later.


This is so cool and funny at the same time.

Monday, May 12, 2008

Collective Intelligence in Action

Finally, I won a book from JavaRanch!

Praise God!

The book is entitled:

1933988312 Collective Intelligence in Action

Unlike other books in Collective Intelligence, the methods and examples presented in CIA are based in Java.

I've already joined many other book promos in the Ranch (Head First PMP, Rock Star Programmers, JQuery In Action), but this is the first time I actually won something.

And what a perfect timing it is, since I badly need to make the search algorithms I'm currently working on in our church ministry to be "more intelligent".

I would like to thank JavaRanch, Manning and the author Satnam Alag for such a wonderful book.

Sunday, May 11, 2008

Reflections of a Mother

I gave you life, but cannot live it for you.

I can teach you things, but I cannot make you learn.

I can give you directions, but I cannot be there to lead you.

I can allow you freedom, but I cannot account for it.

I can take you to church, but I cannot make you believe.

I can teach you right from wrong, but I cannot always decide for you.

I can buy you beautiful clothes, but I cannot make you beautiful inside.

I can offer you advice, but I cannot accept it for you.

I can give you love, but I cannot force it upon you.

I can teach you to share, but I cannot make you unselfish.

I can teach you respect, but I cannot force you to show honor.

I can advise you about friends, but cannot choose them for you.

I can advise you about sex, but I cannot keep you pure.

I can tell you the facts of life, but I can’t build your reputation.

I can tell you about drink, but I can’t say “no” for you.

I can warn you about drugs but I can’t prevent you from using them.

I can tell you about lofty goals, but I can’t achieve them for you.

I can teach you about kindness, but I can’t force you to be gracious.

I can warn you about sins, but I cannot make you moral.

I can love you as a child, but I cannot place you in God’s family.

I can pray for you, but I cannot make you walk with God.

I can teach you about Jesus, but I cannot make Jesus your Lord.

I can tell you how to live, but I cannot give you eternal life.

I can love you with unconditional love all of my life . . . and I will!!!

Always, Mom

Taken from another Wordpress blog.


Happy Mother's Day!

Friday, May 9, 2008

PDF Reader/Bookmarker based on AIR (A Failed Attempt)

After seeing this sample application, I had high hopes in creating an AIR application which can load a PDF file, render it and have the usual Adobe Reader controls.

But the moment you try to close the application, it will save the current page you are reading and when you open the application again some time in the future, it will bring you back to exactly where you left off.

Something like the bookmarker.js from the PDF Hacks book or this plugin variant but better (at least that's what I think).

That was until I discovered that AIR didn't have (yet) that tight integration with PDF that I was looking for.

If you've seen the example application, you may be wondering how the developer was able to control navigation of the PDF file. As it turned out, the PDF he created had additional document level JavaScript that he invoked from AIR.

As far as I know, document level JavaScript can only be added through software such as Adobe Acrobat (which is NOT free, unlike the basic Adobe Reader).

Ah too bad, I'll probably give it another shot in the next releases of Adobe AIR.

Until then.