Why I no longer journal

I used to keep a journal, for several years. It was something my friend Katie taught me, and I cherised.And then I went travelling abroad. And I still kept a journal, and cherished it even more. It was a way of digesting everything I was going through, and seeing. I didn’t keep it as a record, or as something for anyone else to look at. I kept it for the process of writing, for the ways in which it made me think about my life.

But in the several years since I’ve been back (I was gone for 16 months), I haven’t journaled hardly at all (a few pages worth of entries). I think largely, it was because life at home simly isn’t as exciting as life on the road. Things seemed less worth writing about. And then it just became habit.

I miss it.

iPhoto books for my travel photos

I’m thinking I’d really like to finally get off my butt, and put together a nice hardcover book of all my travel photos, if for nothing else, as something for me to have, and to show to people who want to know more about my travels. I was thinking maybe one book for “Australia”:http://scottyallen.com/cgi-bin/indexer.pl/travel/australia, one for “Asia”:http://scottyallen.com/cgi-bin/indexer.pl/travel/seasia, and one for “Mexico”:http://scottyallen.com/cgi-bin/indexer.pl/travel/mexico/chihuahua. Or maybe just one for each trip. We’ll see…I was also thinking I should include excerpts from my dairy as captions and text. We’ll have to see how that works out.

BTW, this is a test of posting to my moveable type blog directly from 43things.com, which is a novel way to let me own my data.

Class::DBI woes

I learned about Class::DBI over the summer, and have really come to love it. Well, almost. The idea is that it’s an OO to RDMS mapper. And a really slick one at that. You basically tell it what table an object should be linked to, and what fields that table has, and what other objects are foreign keys on that table, and it creates all the basic RDMS methods you would want, from create and delete, to search, to getters and setters, to you name it.

However, I’ve been tearing my hair out for several days now with some really nasty problems with it. I’m trying to do something that’s a bit funky, and Class::DBI is making it that much worse.

Basically, I’m trying to do some node/association stuff. So I’ve got one node table, and one association table, with some periphery tables with one-to-one relationships with the main two tables, which provide extra fields for specific node types. So, for instance, there’s a user node, which has a seperate user table.

On the OO side of things, there’s a Node object, and a User object which inherits from Node. The idea is that the User object is a specialized version of a Node row, one in which the type field is set to ‘user’, and for which there’s a matching row in the user table. There’s some special magic using triggers, which reblesses objects into the right subclass when they get hydrated out of the database, as well as some more trigger magic which sets the type field properly.

The problem really stems from the fact that Class::DBI uses Class::Data::Inheritable to store trigger information. The HasA and MightHave relationships use triggers to do inflation properly (so that a createdby foreign key field becomes a User object when the node is hydrated). All the trigger information is stored in a single Class::Data::Inheritable accessor (__triggers).

Class::Data::Inheritable is built such that if a subclass changes the data, it gets it’s own, seperate copy. This is a problem for me, because the various initialization code doesn’t always get called in the same order, and definitely not in an order I have very good control over. Thus, if the User object sets a trigger before the Node object finished setting it’s triggers, the User object never inherits the all of the necessary triggers. Which really sucks.

And it took me many, many hours to figure this out. I guess the upshot is that I now know far more about the perl compilation process than I probably will ever need to again.

43 Things

I discovered 43 Things just yesterday, via some blog posting which I can’t seem to find now. It’s an interesting twist on the new social networking sites, and is particularly interesting, as it seems focused on getting things done, rather than just wasting time. This is one of those tools that makes me feel hopeful about the human race, and that some portion of it isn’t completely doomed to consumerism.