Skip to main content

One min read

Google has eventually released Google Collections Library 1.0 Final version. 馃檪 Now I can use it for my project. I was actually more looking forward to its release than the release of Spring Framework 3.0.

Download Page: Google Collections Library 1.0 - FINAL

Maven users can simply add the following dependency info to use Google Collections Library 1.0 - FINAL.

<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

21 min read

About a few days ago, I read this post, Java Challenge: Dropping Balloons in Java having an interesting question.

It's a question to find an algorithm that gives the highest floor where you can drop a water balloon without breaking it at a 100 story building. You have only two balloons. I had actually seen this problem before and solved it already. It was not balloons but eggs. The solution is simple. Since if you miss two chances then have no balloons available, you need to try from the lowest safe level which means throw it from the first floor then if it does not pop, pick it up and go up to the level 2 and repeat it until the balloon pops. When you get the level from which the balloon bursts after dropping it, one level below this level is the highest safe level. (e.g. If the balloon first breaks on the 20th floor, the highest safe floor is the 19th).

17 min read

Java EE Application Development using Tomcat, OpenEJB and Hibernate

Before I start writing this blog entry, I'd better point out a few things.

  • This blog entry is not about how to make a good Java EE application yet is about how to use OpenEJB on Apache Tomcat server with Hibernate as an implementation of the JPA. If you are looking for better Java EE development or similar, this one is not for you. 馃檪

  • I don't have enough time to explain all the details of how to install JDK, Eclipse, Tomcat and so on. So this post doesn't have that level of details. I simply assume that you've already known how to install JDK, Eclipse and Tomcat. Well, anyway, installing Eclipse and Tomcat are as easy as extracting a zip or gzip file and JDK installation is also not difficult at all.

  • This post does not cover how to use those tools and frameworks in the production environment. In other words, it is only for the development. Setting up the environment for development and for the production use have some differences. It is, however not that hard to figure out once you know how to use those in your development environment.

One min read

I heard very surprising news today morning which is SpringSource has agreed to be acquired by VMware.

http://blog.springsource.com/2009/08/10/springsource-chapter-two/ http://www.vmware.com/company/news/releases/springsource.html http://blogs.vmware.com/console/2009/08/vmware-acquires-springsource.html http://www.earthtimes.org/articles/show/vmware-to-acquire-springsource,921934.shtml

Looks like a good deal for both companies. 馃檪

VMware recently hired Mark Lucovsky from Google and now has SpringSource. I guess VMware is really doing well. 馃檪

3 min read

If your OS is Linux and you are using Eclipse, you might possibly see the following error messages or similar after installing lots of plug-ins in Eclipse. In my case, it usually happened after installing TPTP (I'm using Ubuntu Linux 9.04 Jaunty Jackalope Desktop 64bit by the way).

13 min read

It was a Gavin King's book from which I first heard about method chaining since it is not that popular style in Java.

Bauer and King in their book entitled 'Java Persistence with Hibernate' (2007), point out that method chaining is convenient in some cases and is more popular in Smalltalk than in Java for Smalltalk, unlike Java, does not have void type. Thus when a method is invoked, it normally returns the object itself in which the method is placed.

Although it is used to improve readability and to reduce the amount of source code, I didn't really like this style as it can be less readable and might make code difficult to debug. How can the technique to improve readability make the code less readable? By less readable, I mean the code may possibly be unpredictable or make the programmer confused in some cases.

Let's look at some example.

4 min read

You can ignore this warning now but should get the latest flash player if you are still using the old one having the security issues.

WARNING!!! (updated on the 16th of June in 2010)

A critical security vulnerability in Adobe Flash player was discovered about twelve days ago and Adobe has released a new version which has the problem solved. However, there is no 64bit version of Flash with the security update available yet. Besides, Adobe temporarily removed the 64bit Flash download link so you cannot download it now. Since security is concerned, I had removed the 64bit one and installed the 32bit version with npviewer through the synaptic package manager as it is the new version with the security update. Although this 32 bit one is very unstable and crashes many times, I cannot take the risk of having security problem. Those who have installed the 32bit version then have been experiencing the problem that you cannot click any buttons on the Flash player, open the /usr/lib/nspluginwrapper/i386/linux/npviewer file and add the following line just before the last line.

export GDK_NATIVE_WINDOWS=1

You can find more details from Fix the "can't click on flash" bug in Ubuntu with 1 command on the OMG! Ubuntu site.

So, please do not try the rest of this blog entry except for this one

I think there are numerous 64 bit Ubuntu users who are suffering from the crash of Flash Player just like myself.聽 There is a better way to install Flash Player for 64 bit Linux than installing one from the Ubuntu repository and that is what I am about to write.聽 This is obviously not the perfect solution yet I think the best way to use 64bit Flash Player for now.聽 I hope Adobe will release a stable 64 bit Flash Player for Linux soon.聽 Anyway, here we go!