natural progression…
October 12, 2007 on 6:41 pm | In Technical stuff | No CommentsOK, for the most part, if your application (commercial or otherwise) has a small, let’s say trivial amount of data. Simply retrieving as few hundred records and displaying them shouldn’t be too IO intensive. but with natural progression, some trivial applications become non-trivial, and require a bit more care.
In my case, I retrieve some records via Hibernate. Then I display results via DisplayTag, and I wasn’t using partial-lists. Some of you might be thinking, “Hey genius, of course it’s going to be slow!” Well, you’re right: there’s a ton of object creation going on behind the scenes, and asking DisplayTag to decorate and sort n-thousand records is not going to work. With my non-trivial test data, I saw responses go from sub-second to ~5 seconds! So, with DisplayTag’s advice, I turned my attention to PaginatedLists. Nothing too crazy, basic ValueList Handler. I give PaginatedList instances a Spring-wired Dao, a SearchBean (search params) and an optional PagingAndSortingInfo reference. As you may have guessed, PagingAndSortingInfo knows the following:
- what column(s) are being sorted,
- in what direction,
- what page sizes are,
- and lastly, what page we are on.
As expected, performance goes back to sub-second. However, there’s a catch: I externalize all my queries (both big and small); regardess of what PagingAndSortingInfo may know, I can’t apply sorting information to an existing Hibernate Query. Since the returned is not a Hibernate Collection, Session.filter(…) is also out of the question. Lucky for me, there’s Hibernate Search. Hope it’s not too much work. I’ll let you know how it goes…
practice makes greatnesss…
October 9, 2007 on 10:24 am | In General | 5 CommentsI came across this article that discusses a but of greats (in sports and business), and I thought the last few paragraphs were very poignant:
For most people, work is hard enough without pushing even harder. Those extra steps are so difficult and painful they almost never get done. That’s the way it must be. If great performance were easy, it wouldn’t be rare. Which leads to possibly the deepest question about greatness. While experts understand an enormous amount about the behavior that produces great performance, they understand very little about where that behavior comes from.
The authors of one study conclude, “We still do not know which factors encourage individuals to engage in deliberate practice.” Or as University of Michigan business school professor Noel Tichy puts it after 30 years of working with managers, “Some people are much more motivated than others, and that’s the existential question I cannot answer - why.”
…
Maybe we can’t expect most people to achieve greatness. It’s just too demanding. But the striking, liberating news is that greatness isn’t reserved for a preordained few. It is available to you and to everyone.
Well, first off, I’ve never understood how Brady does that - he’s special. The article is dead-on, but one thing to remember is that some of the cases sited had horrible home lives. In large part due to their obsession to win or compete, etc. Of course, as with all things, some people are better at obsessing in controlled bursts than others. Tiger Woods comes to mind. The key to it is finding that switch, and being able to actual turn it off.
netflix, finally…
October 5, 2007 on 10:38 am | In General | No CommentsFirst off, I like Netflix a lot. However, like most real companies, with customers and stuff like that, they can be slow to add fairly simple features. The feature I have in mind is pre-fetching. It’s not that hard to implement. Yes, I understand they a larger user base than 1 person, and they also have a large list of titles to sort through, but I don’t care.
It’s a simple feature, and you aren’t building the wheel — there are sites and 3rd party libs that help make this easier. Anyway, they finally have it, and it’s a big help. Still, this shouldn’t take that long… By the way, the depicted movie, MST3K: I Accuse my Parents, is pure genius.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^

