You know you’ve been working too hard when… you spend the first 3 nights of your holiday dreaming about O/R mapping and lazy loading. Urgh.
In other news, its been really sunny here in Whistler, and the skiing has been great. Snow is a bit slushy lower down, but someone told me today that we’re due for some more snow tonight, which should help a bit.
Next week, we’ll be back to our regularly scheduled Java programming.
Read something yesterday about reflection vs. code generation, on the hibernate site.
It basically said that Smalltalkers prefer runtime reflection and C++ developers prefer code-generation. I’m neither (I was a Java developer before I wrote any Smalltalk, and I’ve never seriously coded in C++). But it occurs that while Java’s reflective capabilities are seriously cool, it’s strong typing means that there is always the slight disconnect that comes from having to use casts and instanceof checks (or always return Object and let the client code worry about it). Reflection in Smalltalk must be pretty fun though!
This is why sometimes reflection is the way to go and sometimes code generation is a better fit. Java sits on the fence on this one (as with so much else).
I’ve more to say on the subject of code generation, but I’m off on holiday now, so unless I get the urge and dive into an internet cafe while there, it might have to wait a week or so.