Starting last October, we went through a process of upgrading the main application at Wotif to be running under Java EE 5 (not just Java SE 5). The biggest part of this was upgrading from EJB 2 to EJB 3.
One of the things I noticed was that EJB3 gives you a lot of choices for how to implement and configure EJBs and their associated interfaces. There’s a lot of “standards” on how to do it, many of them conflicting, but very little explanation of why. This is the set of standards I came up with (and was largely successful in getting implemented), and why I chose them.
Continue reading “Interfaces with EJB3”
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”
Cedric’s got an interesting post on obtaining extensibility via interfaces As usual, he makes a lot of very good points, and (again, as usual when I link to Cedric’s posts), there are a couple that I think could be elaborated on.
Continue reading “Interfaces are interesting…”
Joel Spolsky wrote an interesting article which had a brief history of Hungarian notation, amongst other things. Cedric Beust’s picked it up and made the claim that We are all Hungarian Notation users. I’m not buying it.
Continue reading “I’m not a Hungarian Notation user”
I rediscovered this article while doing some research. It gives an extensive list of reasons why your code sucks.
Stumbled upon this beauty today (minor changes to protect the guilty)
Continue reading “Beware the mechanical coder, my son…”
Meaningful names for variables, methods, and classes go a long way to making uncommented code possible. However, meaning is not conveyed simply by length.
Continue reading “Long != meaningful”
Been seeing this pattern a lot today. I’m working with integration tests, which have a lot of test fixtures around to do common tasks (such as inserting data into the database). These test fixtures propagate exceptions. In many cases, they simply declare that they throw java.lang.Exception. Ouch.
Continue reading “Don’t propagate exceptions in test fixtures”
I’m currently working my way through Michael Feathers Working Effectively With Legacy Code. Damn good book, BTW. Anyway, this was this section on “programming by difference” that got my thinking while reading it.
Continue reading “Programming by difference”