Hibernate, proxies, and programming to interfaces

When working simply with Hibernate, you end up coding to concrete classes. This violates the idea that you should program to a type, not an implementation. It also means that various things you tend to do with Hibernate (like writing getters and setters) end up “polluting” your domain classes.

When working simply with Hibernate, you end up coding to concrete classes. This violates the idea that you should program to a type, not an implementation. It also means that various things you tend to do with Hibernate (like writing getters and setters) end up “polluting” your domain classes.

Continue reading “Hibernate, proxies, and programming to interfaces”

Hibernate Queries, caching, and mutable criteria

Hibernate has extensive support for caching built in (well, provided by various plugins, actually). This caching means that potentially expensive database operations can be avoided, especially in smaller apps (ie, non-clustered, which actually can go to quite a large size). Most people who use Hibernate caching are used to having object instances cached. Hibernate can … Continue reading “Hibernate Queries, caching, and mutable criteria”

Hibernate has extensive support for caching built in (well, provided by various plugins, actually). This caching means that potentially expensive database operations can be avoided, especially in smaller apps (ie, non-clustered, which actually can go to quite a large size).

Most people who use Hibernate caching are used to having object instances cached. Hibernate can also cache query results. However, there are some things you need to be aware of when you do this.

Continue reading “Hibernate Queries, caching, and mutable criteria”

New article category – Hibernate

I was checking over my web stats recently, and I noticed a trend has emerged solidly over the last few months: most of the search terms that lead to my blog are about Hibernate. Of my top 20 search terms, 11 were about Hibernate, and I’m in the Google top-10 for most of those terms … Continue reading “New article category – Hibernate”

I was checking over my web stats recently, and I noticed a trend has emerged solidly over the last few months: most of the search terms that lead to my blog are about Hibernate. Of my top 20 search terms, 11 were about Hibernate, and I’m in the Google top-10 for most of those terms (somewhat surprisingly…). Now, I’m not talking hundreds of search hits, but I am talking more than dozens.

All up, and at this time, I’ve written ten articles on this site about Hibernate, in various depth. To make life easier for people who are looking here for Hibernate-related material, I’ve added a Hibernate sub-category (underneath the Java category), and put those articles in it.

Caveat: I am not a Hibernate guru. I don’t even play one on TV. I’m merely a Hibernate user who has taken the time to write up things he has found out or thought about. No accuracy is assured, though I will happily accept corrections.

IMS Australia – first thoughts

Well, it’s about time, but Apple have finally rolled out the iTunes Music Store to Australia. Now I can see what all the fuss is about.

I can see that I am impressed with how easy it is – I’ll have to make a point to not impulse buy, because it’s just so easy to do. The integration with iTunes is so smooth as to be unbelievable – it is very easy to see that this is why they make iTunes and why it’s free. (Heck, the only reason I run Windows on my home PC instead of Linux is to use iTunes)

Continue reading “IMS Australia – first thoughts”

My blog is worth that much?

From Jason Yip:


My blog is worth $20,887.98.
How much is your blog worth?

And if anyone wants to buy it at that price (that’s US currency, of course), please feel free to let me know. Contact me before the end of 2005, and I’ll even through in a 10% discount… afterwards, of course, the price may be even higher, as I’m always making new value on the site.

Serious offers only, naturally. No tire kickers.

ehcache dissected

At work, we are a heavy user of ehcache. Well, we would be… it was initially written at Wotif, to overcome problems with the Jakarta JCS project. I recently had to sit down and figure out exactly how it works, and thought I’d take a moment to write it up.

*Update*: I tested the Hibernate serialization behaviour. See below for more.

Continue reading “ehcache dissected”

Why software development is not a profession

Software development is not a profession. It will never be a profession while people like the guy who wrote this lovely piece continue to get paid to develop software.

The reason, of course, is that professions have the requirement that professionals be competent.

Fortunately, I’m happy being a software craftsman

There’s no feeling like releasing software…

Ahhh… that’s the first production release of my latest project at work out the door today. I can’t talk too much about specifics, but it’s not a big secret that Wotif is enabling various B2B aspects of our web site, mainly with the registered hotels. Today saw the first big step in that direction. 🙂 And it feels great to see a new project go out and get used.
Continue reading “There’s no feeling like releasing software…”

Jason Fried on BaseCamp

A bloody excellent IT Conversation podcast by Jason Fried of 37signals, taken from O’Reilly ETech 2005.

Jason covers a lot of issues that are at the heart of Agile Development, particularly when it comes to keeping your codebase lean-and-mean, and the YAGNI principle.

Seriously: everyone should listen to this.

Airconditioning Dilemma

You work in an airconditioned office. The thermostat for the airconditioner is set to 23.5C. The thermometer gauge says that it is currently 24.2C. Do you:

A) Ignore it;
B) Close the door to the stairwell that all the cold air is escaping down;
C) Set the thermostat to 21C so that it gets colder. After all, it should go down to 21.7C, right?