|
October 2003
[
geir
]
14:03, Friday, 24 October 2003
We just added the ability to create a map in VTL (Velocity Template Language) : #set($mymap = { $a : $value, $b : $more } )
[
geir
]
13:51, Friday, 24 October 2003
Working on a new project, I've been trying to figure out what to do for data access. I've been trying to decide between using bog-standard JDBC hell vs O/R tools like Hibernate, Castor, Cayanne, OJB, TopLink etc vs JDO implementation. I had a few important requirements :
I liked what I saw with Hibernate and OJB, didn't like Cayanne because it looked like I have to extend their object model for my data classes, and was worried that TopLink would be too expensive and Oracle would eventually pull support for other (non-Oracle) databases. I also took a gander at JDO - one thing that made OJB attractive was that I could supposedly use JDO later on. After deciding that I had finally hit analysis paralysis, I decided to just get going with Hibernate. I heard good things from people I trusted, and there seemed to be a lot of activity surrounding the project. They have been getting tons of exposure on TSS. The fact that the lead developer is now working for JBoss is worrysome, but I figure that shouldn' t stop me. The result : I am both manic and depressive. Manic because I was able to get it working fairly quickly. There are tons of tutorials out there, but all seem to be written with v1.x in mind, and the object model seems to have changed significantly in v2.x. No biggie - they gave me the flavor of what to do. The model they use is very nice - very clean and simple, and I was able to get basic mappings going fairly quickly. I was able to save and read object, so I was happy. It did a few bizarre things, such as failing silently when I asked to 'saveAndUpdate()' for a new, fresh object. The cause was because I had incorrectly defined what the 'unsaved_value' of a key was, and thus, when given the choice to save (i.e do an INSERT) or update (do an UPDATE), it decided that the key wasn't the 'unsaved value', and thus tried to do an update, and failed. This is scary, because I'd like to know if a data operation fails, even if clearly my fault. Depressive? Well, I like to use JNDI for configuration of things like this in a mind-numbingly simple way. I uses a little JNDI context that saves everything to the file system. I want to produce a 'SessionFactory', the thing that allows you to get configured sessions so you can do useful work, stuff it into JNDI, and then have my apps just pull it out and use it. Then I don't have to worry about ensuring that my app/container/whatever has the config code at startup - I can do it outside the runtime environment and all is well (and testable, etc). Turns out, I either don't understand something, or the JNDI support in Hibernate just won't work for me. What they do is serialize the SessionFactory, but expect that the Hibernate environment has already been configured identically when you pull that SessionFactory back out of JNDI. Instead of de-serializing back into a SessionFactory, they have custom deserialization that just figures out the name of the configuration, and looks into the hibernate config running in the JVM already to get the SessionFactory for you. This means that you have to do the config each time in the JVM before deserializing the factory. I don't see the benefit of this over just letting me ask for it by name... Alas. I'll either figure out what I'm doing wrong, figure out why it's impossible, or just fix it. Anyway, the upshot is that I like HIbernate, and will continue with it.
[
geir
]
13:28, Friday, 17 October 2003
codeja vu : the feeling that you are coding something that you already coded before. Time to refactor.
[
geir
]
13:40, Thursday, 16 October 2003
Good article by George Ziemann comparing the RIAA to the early movie business. I've always thought that the RIAA was going about fighting copyright theft the wrong way. (Yes, it's theft...). By destroying Napster, a centralized service with a huge community of interested and technically-able consumers, they lost the chance to move that community towards an evolved business model of selling music online and educating people that copying copyrighted material without the copyright owners permission is theft. They should have tried - if they failed, they could still kill it the way they did eventually. The result is a plethora of de-centralized distribution systems (hard to track), and a meme planted in the culture that it's ok to copy music (hard to unwind). I don't know how they are going to get out of this one, and quite frankly, I'd love to see todays technology evolve the business model.
[
geir
]
14:38, Tuesday, 14 October 2003
I had no idea that IDEA (my favorite IDE) uses Velocity (my favorite templating engine) for generation of class and method javadocs from templates. Good idea :)
[
geir
]
13:21, Friday, 10 October 2003
The DMCA needs to be amended to provide an exception preventing stupid protection systems. SunnComm, the 'inventor' of the CD protection system that installs a device driver on your computer to interfere with it's operations when reading CDs, intends to sue the guy that pointed out you can disable device drivers under Windows. Update : I guess SunnComm isn't as stuppidd as they originally appeared. They changed their mind.
[
geir
]
13:11, Friday, 10 October 2003
From CNET, Jonathan Schwartz on Merrill analyst Steven Milunovich "I wish he'd attend our analyst conferences."
[
geir
]
13:06, Wednesday, 1 October 2003
I took my brother and his fiancee out to dinner last night in Boston to a place called "Sel de la Terre". Nice, good food, no attitude. We ordered one of their favorite wines, a Pic St Loup from Languedoc. Not expensive ($35). Something was off. To me, it was like someone pressed shale and gravel and bottled what came out, with a bit of cork on the nose to round it out. Not really that bad, but subtle - missing any fruit or finish, and yes, there was cork on the nose. While we didn't want to make a big deal of it, I kept grimacing and they finally called the sommelier over. He brought a glass, tasted it and said that he thought that it was ok. It had opened up a bit while we were waiting, so it was becoming a bit better. (I still wasn't convinced having experienced it from the time it was opened, but it's their place, their town - I wasn't going to press it). Here's the impressive part - the sommelier came back 10 minutes later with a new bottle, said he agreed with us that it was off. He opened the new bottle - the difference was night and day. The sommelier had taken the glass that he tasted from with him when he left us the first time - I guess he thought about it, and tasted it a second time. Kudos to the guy, and because of that and the food, I wouldn't hesitate to recommend the place to anyone looking for dinner in Boston.
[
geir
]
12:55, Wednesday, 1 October 2003
Will design and implement distributed systems for food.... |