October, 2005


30
Oct 05

My experience with Delicious Library

Last weekend, I got an iSight. I didn’t actually need one for anything, but I was curious and I had a little spot bonus money to burn.

So, while I have yet to use it for its main purpose, video chatting, I have tried it for a different purpose: Delicious Library. This app has a neat trick of turning your iSight (or other webcam, really) into a barcode reader. This was so fascinating to me, that I bought Delicious Library just to play with this feature. That and tracking my books, CDs, video games, and DVDs seemed like a decent idea anyway.

Never mind that I only own about 200 books and can pretty much remember what and where they all are. Never mind that I only have a about 150 CDs (pathetically low!), and my video game and DVD collections are even smaller. Also pay no attention to the fact that I rarely lend any of these materials to anyone (or, at least, I do so infrequently enough that I can generally remember what I’ve lent).

So, while my use of Delicious Library is essentially and advanced form of procrastination, I did want to check it out to see if my parents would get any use out of it. See, they, at least, have quite a lot of books, and a certain subset of them are frequently lent. And I’m always looking for news ways for them to get use out of their Macs.

First, getting the barcode reading to work: this requires (unsurprisingly) adequate ambient light. And it requires a bit of fiddling with the item to be scanned. Sometimes, scanning works right away, sometimes it is a maddeningly tricky.

Second, scanning DVDs and games was generally pretty successful. One game I had (Halo 2, limited edition) had no barcode, and one game didn’t come up (Katamari Damacy).

However, scanning books was a different story. Most of my cookbooks scanned and loaded successfully, but when I moved to the bulk of my collection, paperback fiction, the success rate dropped dramatically. I think maybe 3 of 160 books scanned and were recognized. Of course, Delicious Library allows you to enter books by ISBN, which is much more reliable.

Delicious Library is using amazon.com’s web services to do all of its searching, and I find it curious how brittle an identifier the UPC is, as compared to ISBN. My unresearched theory is that UPCs tend to identify a particular printing of a book, where the ISBN refers to a book in all of its forms. (This may be a reflection on how amazon uses these numbers rather than what the standards themselves say). So, if your book isn’t very recent, or is an edition not sold by amazon, then the UPC is unlikely to work.

I still like Delicious Library (even if its use to me isn’t that profound), but I would recommend that if you are primarily going to index books, you might not want to bother with the barcode reading.

Update: The barcode reading works perfectly with books that you just got from Amazon. I was looking at my parent’s book collection noticing that a number of them are old enough to not have ISBN numbers (or any real identifier beyond title and author), so I expect that those will be fun to enter into Delicious Library.

Update to the Update: The barcode reading isn’t perfect, even with books you just got from Amazon. I had just bought 4 books, and the 4th book came later. When I scanned this book, Delicious Library first came up with nothing, then, on a subsequent try, came up with a different book!


9
Oct 05

Freecell math

The only game that my father plays on his Mac is freecell. He plays the version available in Rick Holzgrafe’s Solitaire Till Dawn X. This is a pretty nice version of the game (although it lacks game numbers and the ability to automate supermoves), and my father occasionally saves deals that stump him. Well, yesterday I tried one of them, and after a while, in frustration, decided to see if it was solvable by running it through the automated freecell solver. Sure enough, it was winnable, although in order to win, the solution took us through two situations where Solitaire Till Dawn claimed that there were no more moves. It lied!

In any case, I’ve often idly wondered what the mathematical properties of freecell were. It is somewhat obvious that not all deals are winnable because one can construct a deal that cannot be won. I’ve wondered if anyone ever modeled freecell to the point where they could predict the winnability of a given deal, or, more likely, prove that certain deals were not winnable. This was predicated on my amazement at the ability for freecell applications to never (in my experience) give out an unwinnable freecell game.

Well, I haven’t seen that there is a solid mathematical model for freecell (although, clearly there are algorithms for solving freecell), but the game has been subject to a lot of empirical observation. In fact, it appears that freecell implementations have to do no special work, because it is estimated that 99.999% (or 1 loss in 79,000 deals) of freecell deals are winnable.

Of course, reading the freecell FAQ made me realize that I’m a freecell amateur. A neophyte, even.


1
Oct 05

Am I a Java Luddite?

I’ve been programming in Java since sometime in 1997, and in all this time I have never embraced certain, now ubiquitous seeming, Java technologies. Mainly I’m thinking about the whole J2EE thing. Partly this is because I haven’t paid much attention to this (huge) development in Java. Partly this is because in 1998 or ‘99 I remember reacting very strongly to an attempt to convert my employer’s entire back office to J2EE.

Back then, I was reacting against doing engineering for engineering’s sake. I had no patience for computer science projects, which is what a J2EE conversion looked like to me. As I researched what EJB’s (the primary J2EE thingamajig back then) would give us that we didn’t already have, the only thing I could find was distributed transactions. I’m sure that there a few businesses that need distributed transactions, but I think that they are few and far between, and for certain we weren’t one of them. I didn’t have decision making power back then (and still don’t, for that matter), but I manage to write a convincing email. The J2EE conversion project never happened.

Since then, JSP was invented (and reinvented), JBOSS was released, J2EE seemingly took over. I’ve never like JSPs. I’ve like the concept of JSP, but not the actual execution. I haven’t looked at JavaServer Faces. I’ve been using Velocity for this task — very simple, very easy. In general, I’ve been sticking to J2SE and Apache Jakarta stuff. Does this make me a Java Luddite?


1
Oct 05

jabber followup

We’ve been running on jabberd2 on the new server for almost a week now. So far, so good. Folks are enjoying TLS support. Well, at least I haven’t gotten any complaints.

Some of us are excited about the new conference server (mu-conference 0.6.0), since it actually allows you to configure it, assuming that you have a client that exposes this functionality. The two that I’ve used are gajim (a python/pyGTK client) and, surprisingly, gaim. Gajim is more reliable in this respect (although I have a hard time playing with it at home — it segfaults on my AMD64! I assume this is a pygtk problem but haven’t had time to actually investigate [Update: this is caused by a known problem with gtkspell]). The other big win in this migration is the move the py-transports series of bridges (pyaim-t, pyicq-t and pymsn-t). These are both very easy to set up (and migrate from the previous jabberd 1.4 transports), but work quite well, too. Finally, typing notification via the AIM transport!

Further experimentation with Jive Messenger reinforces the concept that jabberd2 was the right choice. I have experienced weirdness with the conference server, and I couldn’t actually even log in using gajim. At some point, in my Copious Spare Timeâ„¢, I would like to actually investigate the JM problems enough to either come up with a solid bug report or, even better, supply a fix. Working on JM seems more tractable to me than jabberd2 at this point.

While I’m pretty happy with mu-conference so far, it would be better for jabberd2 to have its own native conference component, although I can understand not wanting to take on that work.