Trolling with Java Web Frameworks
October 30, 2007 on 9:19 am | In Technical stuff | No CommentsNice Trolling with Java Web Frameworks post on Fred Daoud’s Weblog. It takes a moment to get into, but by the end you should be laughing quite a bit.
read the fabric-care labels…
October 28, 2007 on 2:22 pm | In General | No CommentsNote:this starts out as a rubbish about fabric-care…
It turns out that just because something is 100% cotton does not mean you simply wash it in warm water, or add fabric softener during the rinse cycle. Based on some horrible results, I should have realized this maybe 8 years ago, but that’s another story. Anyway, read the fabric-care labels on your clothes. Some cotton-based items are damaged by fabric softeners, like those stain/wrinkle resistant pants. I spill both food and drink often, some might say daily, so this is important to me.
As for the water temperature, you still need hot water for your whites; if you care for the environment, use warm water - Tide has some new detergents that work well in cooler water temps. However, your colored cottons may vary. Some need cold water and low drying only, or they’ll shrink! Well, the real problem is not the fabric, it’s the lack of reading the fabric-care labels. If I actually read them, I wouldn’t lose a good shirt on an average of every 2 months. The same goes for everything we do in life. Although you wont find care labels on your family, job or home. There’s existing wisdom on these subjects. You may have to search for it; or maybe just open your eyes and ears.
Case in point: The red brick walkway in front of my home was added in the 70’s, 2 owners ago. It’s an odd pattern that winds from the front porch to about 8 feet from the street. So, it doesn’t go directly to the driveway, nor does it actually go to the street. I never understood why. Some of the bricks started to fall into the ground. I knew this could be a bigger problem than just looks: mail-person trips on one of those, and I’m screwed. I called around for estimates, and selected a bid that wasn’t the cheapest, but a 3rd-generation concrete guy in the area.
You may be thinking: “have him remove the old walkway, and build a new one going directly to the driveway.” I assumed it would cost (much) more, so I decided against it. My neighbor, we’ll call him Dale (since that’s his name), mentioned that the walkway was considered odd when it was initially put in. It had not real goal, other than to be eccentric and draw attention. Here comes some of that wisdom… After I gave him some background, he schooled me on some things. The bricks were actually worth something (esp. to a brick/concrete guy), and that I should ask for another estimate for a shorter walkway. He was right: removing the old walkway, back-filling that with sod they took from another job, and adding a new concrete walkway, actually cost me much less. As I said, you may have been thinking that, but I wasn’t. You may also be the kind of person who already knew to read the fabric-care labels. If you are, I kinda hate you.
oh how true…
October 26, 2007 on 9:52 am | In General | No CommentsToday’s Dilbert strip is a poignant one. I tend to have tons of time on my hands; enough to read this strip, write a post on it, and think about how ironic this all is. If you read his God’s Debris, you get this kind of existential dialogue for an entire book. Expect, replace the garbage man with an old man, and Dilbert with a delivery guy.
good article(s)…
October 23, 2007 on 4:52 pm | In Technical stuff | No CommentsEoin Woods (an enterprise architect for UBS Investment Bank) wrote a solid 2-part article basically describing how to avoid some common architectural pitfalls. Here’s Part 1 and Part 2. Worth reading.
searching hibernate…
October 17, 2007 on 11:32 am | In Technical stuff | No CommentsHibernate Search (Search) is well-documented, with a clean and easy to use API. The first line in its architectural overview states that it “…consists of an indexing and an index search engine. Both are backed by Apache Lucene.” It’s really that simple. You’ll still insert/update records as you always have. Except now, you have the added benefit of using free-text queries to search your data. You aren’t forced to now search in one way or another - just more freedom (pun intended). If you have experience with Hibernate’s Query, Criteria, or JPA’s Query APIs, you are already half-way there.
getting it done…
To get this working, I had about four major steps. First, I added hibernate-commons-annotation, hibernate-search.jar and lucene-core.jar. Next, I then went about converting some of my named queries to lucene queries, but that was more busy work than anything. Third, I had to make my base Daos Search-aware, which really means adding three methods: one for (re)indexing (that gets called at startup), and two for creating org.apache.lucene.search.Querys - one for default field queries, and another for multi-field queries.
slight bump in the road…
My fourth step was less installation, and more problem solving. I ran into an issue when I tried top apply type filtering. It seems that the ObjectLoader and QueryLoader handled items loaded from the current Hibernate Session a bit differently. The ObjectLoader attempts to initialize the loaded item, just in case. While the QueryLoader only adds a loaded item as a result if it is already initialized. This may be correct, but it didn’t work for me. After some debugging and testing, I found that just as the ObjectLoader, initializing the Session-loaded object worked fine. After no word from the forum, I made the relevant changes to my local Search build.
Overall, getting Search up and running was mostly straight forward. Based on the fairly small dataset, I have no need for the sharding/partitioning functionality. I have heard that keeping indices in synch can become an issue. I don’t know if that was before or after the Search’ JMS-based workers.
Update: I did get a response on the Hibernate forum. There may be an additional feature added, but for now I can move forward.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^


