Watch out when you move /var in Ubuntu

June 14, 2007 – 19:20

When I was installing my Ubuntu, there was this part where an experienced admin would spend some time devising a plan for which part of file system should be mounted from which partition. I decided to skip it and kept everything except /home on one single partition - just to keep it simple. Well, at an unfortunate moment during the past weekend, it suddenly hit me that I should stop being such a noob, and “make things proper”. more…

Take it easy, Microsoft, will ya?

June 11, 2007 – 20:23

I have many friends over at Microsoft working on various great products this company has built, so I don’t want this post to sound like average Microsoft bashing. But it is just sad to see Microsoft decided to go after Jamie Cansdale for something he did that actually benefits Microsoft by adding a critical piece to the development stack. Whether it is well within Microsoft’s rights to take these legal actions against Jamie Cansdale, or whether the EULA in question is overly vague, is simply beside the point. The point here is Microsoft, or at least its bureaucratic corporate arm, has once again shown its almost complete disregard of the goodwill of the development community - even its own development community. I know “prosecutorial discretion” as a legal term doesn’t really apply here, but still, perhaps Microsoft could use some of that here, too?

It is when reading news like this that I feel very grateful for being part of the Java community, where openness is the spirit, and where I don’t have to lose sleep over worrying being hauled into a court by an army of corporate lawyers.

The self-calling limitation in Spring-AOP and one unintrusive solution

May 29, 2007 – 19:45

Spring-AOP is implemented by creating proxies decorating the target bean. One typical gotcha from using these proxies, for instance, in declarative transaction management, is the proxy can’t intercept a call made from one method to another on the same target object (typically a service bean), even though both methods are supposed to be wrapped by the proxy. more…

Ubuntu Network Manager - Feisty… Fowl-up?

April 25, 2007 – 23:58

I couldn’t wait until the Feisty release, and upgraded to the beta a couple of weeks before the release date. Everything else went through quite well, except for the new Network Manager. more…

Ivy has lots of potential

April 9, 2007 – 21:14

Having recently been severely frustrated by that other ambitious Apache project that aims at “making the build process easy”, and “providing guidelines for best practices development”, etc. - OK, who am I kidding? Yes, I’m referring to maven 2. :-) - I turned my eyes to Ivy, and, after a couple of week of using it, found myself comfortable enough to write this to recommend Ivy as an indispensable part in any serious Ant-based build tools arsenal. more…

A few thoughts on Yahoo’s free YUI hosting offer

February 28, 2007 – 10:20

YUI has been my favorite AJAX library for two reasons: its unintrusiveness to the server side, and the excellent documentation. It is interesting and encouraging to see Yahoo offer free hosting for YUI. While there are obviously valid reasons for some sites not to use this service (external dependency etc.), the power of yahoo’s server facility, the advanced cache control, and the on-the-fly file size reduction (up to 90% according to the announcement linked) are in no doubt going to be very appealing to many others. more…

Stronger Java, no sugar please

February 27, 2007 – 00:14

I just wanted to expand on Richard Relos’s we don’t really need closures in Java into a broader argument - syntax sugar is the least of what Java really needs now. more…

Singleton’s new Tinfoil Hat called “Don’t clone me!”

February 26, 2007 – 20:34

I have been interviewing a number of folks to help filling up some Java developer positions. More than one of them (mind you, referred through different sources) told me, as part of the answer to “how would you implement a singleton?”, that I must override clone() to make sure my previous singleton wouldn’t get, well, cloned. And they all told me that they learned it “somewhere,” only unsure where that “somewhere” was.

I did some googling and actually found a couple of “Java tutorial” sites that tell people to override clone() as part of a “standard” singleton implementation. I won’t be linking to any of those sites for the obvious reason of not wanting to bump up their google rankings. And I’m just gonna post some kind of “counter-jinx” here:

If you are preparing for an interview, and happen to stumble upon this blog, please, please remember that Object.clone() by default throws CloneNotSupportException if the class does not implement Cloneable, and I don’t really think you would want to tell your interviewer that you wish to have your singleton class implementing Cloneable. So, no, it’s completely unnecessary to override the clone() method in a singleton implementation.

Build Subversion 1.4.3 in Ubuntu Edgy

February 11, 2007 – 19:49

You'd (I did) think now that we have all figured out how to build 1.4.2 in Edgy, building 1.4.3 should be just some rather boringly repeated procedure. Nope.

For the APR and APR-UTIL packages required by subversion, there are libapr0, libapr1.0, and libapr1 and their corresponding libaprutil* in Synaptic. Despite that the libapr0 description says that it is "currently used by Apache2, Subversion...", or that 1.4.2 was happily built with libapr1.0, you want to get libapr1/libapr1-dev/libaprutil1/libaprutil1-dev, and use this configure line: (I don't care much about accessing through webdav)

CODE:
  1. ./configure --with-ssl --with-apr=/usr/bin/apr-config --with-apr-util=/usr/bin/apu-config

Programmatically Build a Spring Application Context

January 14, 2007 – 14:56

The new BeanDefinitionBuilder class added in Spring 2.0 allows an XML-less way to build application contexts programmatically. Can be very useful for, say, creating quick testing setups in one of those script languages. more...