Year of the Sheep

As we turn the corner from the year of the sheep to the year of the monkey, leaving behind my year, my wife forwarded me a description of the sheep. I have to say that this is a pretty good description of me. close to my actual personality than my astrological sign would have you believe.

Thanks to others, the Ram will generally land on his feet. So great is his talent for knocking on the right door, he will have no problems with what the Japanese call I-Shoku-Ju , the life of the senses. If you have a nice country home full of good things and good conversation, frequented by artists, don’t ever let a Ram through the door — with his love of creature comforts, you may never be able to get rid of him!

Yessir, that’s me. I am a lander upon feets (frequently my own) and I am hard to get rid of.

Life, It Changes

I’ve been kind of loathe to make another post because I don’t want to knock the post about Jon Kincaid and his medical problems down the screen. However, unless I make this weblog a shrine to the big man, life must go on.

I’ll stay a little close to the vest about this subject, because I don’t want to be like the blogger who got fired from their contract job for posting about it. I have a new job, one that has me working in the Chicago Loop every day. It’s a contract position, for a Chicago based online travel company. I won’t use the company name in here, and I ask that no one does in the writebacks so that I can stay off of the Google radar on the subject. However, it shouldn’t be too hard to intuit what the company is. After nearly half a year of telecommuting, it’ll be different to get up and leave the house every day. Really the ideal situation would be to telecommute a few days of the week and go in a few at whatever the job is. Either one has its drawbacks, so if I could telecommute like Tuesdays and Thursdays, that would be perfect. You wouldn’t get so isolated, which is the big long term issue with permanent telecommuting, but you also get the advantage of sleeping later yet getting more work done some of the time.

White New Years

For the first time since we’ve lived here, we’ve had a serious shovel-the-walks and sled-down-hills snowstorm. I’ll let y’all in on a secret, one that I never speak out loud in my house (but my wife reads this blog, so the jig will be up soon): I like winter and I like snow. There. I said it. Serious piles of snow will make beautiful the ugliest bullshit man can create.

I feel like a kid again seeing the blankets of white covering everything. I’ve never been too outdoorsy of a guy, so on days like this I would curl up with a good book under a warm blanket or watch a good movie. Nowadays with broadband communications (and not being in Kansas) I have more opportunities to while away the hours, but the principle remains the same: have fun inside, drink warm liquids and be a dork. At age 15, I might have worked on my D&D characters (I always liked the preparations more than the games). Nowadays I might play a little virtual pinball, do a little blogging, and watch the Knightriders DVD. I can’t say I find this a bad day.

More Trains

In an odd coincidence, the day after I set up my old train set, we met friends down at the Navy Pier. Up in the “Winter Wonderfest” was a neat train setup, including some replica Metra trains and a replica of the Chicago skyline. Near this setup was a giveway table with brochures for MTH Trains and free copies of a magazine dedicated to the proposition that model railroading is “the Greatest Hobby”. I signed up for drawings to win stuff and carried off one of every brochure that was there.

Now what I really want is to get me one of the Metra locomotives and double decker passenger cars. The one they had running looked great. Just seeing it go by gave me that sinking “I’m late for my train” feeling, like I should start sprinting!

Train in Vain

The second XMas of our married lives, which was the first non-broke-student XMas of our married lives, my wife bought me a train set. I always wanted one as a kid and never got one, so she bought me one. At various points since then, it has been set up but mostly it has been boxed in houses with no good place for it. Today we had to tidy the joint to allow a maid service to clean and voila – my basement office suddenly had a huge open space in it. As I type, I have the minimal oval set up with the minimum respectable train (locomotive + caboose) circling in it. I don’t know why I find this so comforting, but it makes me happy to see it going round and round. I might need to scare up some more Bachman EZ Track, since I only have enough curved pieces to make one loop. I can extend it since I have lots of straight, but I can’t get tricky with curving.

The trick for me is moderating my newly rekindled enthusiasm for the train set. I’m so obsessive-compulsive that I can never just do a little of something. I must resist going nuts and spending lots of time on the train that 3 hours ago was in a box. If I can keep it to just a little thing I play with while I’m in the office, that’s good. The last thing in the world I need is one more time and money consuming pastime.

Back in Town

In a fun but grueling holiday tour, we went from Chicago to North Carolina, then to Georgia and back in 8 days. After having been through this trip, which involved around 35 hours of cross country driving, I definitely have a few more things to say about the state of commercial radio. I’ll save those for when I’m coherent and rested. I think I’ll be sleeping for New Year’s Eve.

Free High Speed Internet

These four words have become our differentiators on hotel stays. All things being equal, we look for the ones with free internet. I’m suspecting that all new hotels from here on out will either have ethernet ports wired in or have complete wireless coverage in all rooms, and that older ones will be retrofit. We might never use our free PeoplePC dialup account again. Now that Days Inns and Sleep Inns and other lower midlevel chains have it, that’s what we look for. All we want is a decent, clean room with free internet connections in a place that takes dogs. Do that, and we are yours.

Merry XMas

Merry XMas for those that celebrate it, happy holidays to them what don’t, peace and goodwill to all of us everywhere! Let’s hope for a better year next year, and a better world starting now.

XMas Wrapping

I normally don’t have much empathy for the harried soccer mom protagonists of Connie Willis XMas stories. I always wonder “If all this stuff is such a burden, why don’t they just not do some of it?” Yesterday I had one of those, though. Errands all through Chicagoland, picking up presents, running the dog to the groomer to be prettified, etc. This included my first ever trip down to Devon Street. We never did go to the Indian section to eat, but I had an errand down near there. It seemed a lot like Tijuana, actually. The buildings seemed in about the same level of repair and had about the same garishness of sign.

If all the last minute XMas shenanigans weren’t enough, my Handspring Prism picked this morning to crap out on me! I was planning on using that for reading material in the car as we ride around. Oh well. It is really flaking, and I’m pretty sure it is physical inside the device. Pressing certain parts of the case made it throw a fatal exception. This doesn’t look good. I’ll have to backtrack to paper books for the holidays. Yowza!

Bird Feeders

If I couldn’t tell in a thousand other ways that I’m getting older, here’s a telltale sign – I have grown fascinated with bird watching. We have a bird feeder that I tried a few abortive ways of setting up. The pole in the ground kept getting knocked over by squirrels, and the dangling via twine didn’t work because the squirrels chewed through it. Now it is hanging via metal wire, and from a tree that makes it harder (but not impossible) for the squirrels to get to it. I’ve seen a few attempts that consist of a long jump, a paw on the bird feeder, a scatter of seeds and a squirrel hitting the ground ass over tea kettle. I don’t mind the squirrels eating their share, just not hogging it all. Really, the birds are sloppy enough that they knock plenty on the ground anyway.

I don’t know that much about birds, other than I really like these beautiful red cardinals that are now hanging out in the backyard. At the point where I buy a book to identify these birds, then I guess I’ll offficially become a budding old man. I don’t plan on hiking to them, though. I’m happy sitting here in my home office, with a desk placed strategically so that I’m looking right at them all day.

XMas Cards

We’re trying to get all the XMas cards done today, since if they don’t go out this afternoon they won’t get there until after the day. It’s been kind of a challenge for me, since most of my friends are as mobile as we are and tend to have moved from year to year. That’s the most utilitarian part of the ritual – keeping everyone up to date with our (frequently changed) address, and keeping our records up to date. Every single year for the last 15 I think to myself “I’ll do the cards Thanksgiving weekend, then I’ll be done in plenty of time” and every year, we are sending them out on the 19th and 20th and 23rd. Procrastination cuts deep. One way or another, they’ll be done today either by being done or by us just stopping.

OS Con 2004

I think that I’m going to look into attending Open Source Con 2004. It will be July 26-30, 2004 in Portland Oregon. I used to live there and have friends there, and I would like to hang out and geek out and really enjoy myself. On top of the interesting sounding program items you can see on the webpage above, there’s room for a lot of good times there. Staying at the Marriott downtown, going out with friends to Todai sushi, walking across the Morrison Street bridge to get macaroni at Montage in the wee hours, going over to Powells Technical Bookstore. I would be able to experience for myself the joy of Voodoo Doughnuts! The store opened after I left, so I have never felt the voodoo. Man, it sounds like a good time! I need to start budgeting accordingly.

Outages and Outrages

My cable modem has been out for about 90 minutes, so I really can’t do a whole lot of my work at the moment. I have been answering emails and queueing them up, even though I can’t send any of them now. I’ll blog what I can without having net access, which probably isn’t that much. That’s a downside of having moved my FeedOnFeeds setup out to my hosting box. It’s on a more stable box and easier to reach from the outside world, but I can no longer reach it when disconnected from the world.

I have fallen off the stick of staying on top of my emails. Although it hasn’t ever approached the dark days of 2000 messages in my box, I’m also not able to keep it around zero either. Really, this hour without net access has been kind of nice in that regard. By replying handling and deleting them just now, I got it down to 15 and the longer I’m off the net, the lower that will go. There was a psychological win when I get it empty enough that the scroll bar thumb went away. So, it looks like unless Comcast gets it together soon I’ll be spending an afternoon keeping in touch with friends and colleagues. There are worse ways to spend the day.

Thanksgiving Travel

We considered travelling home for Thanksgiving, but decided against it. The Thanksgiving weekend is always a big pain, I think. It’s nice when everyone is close together, but when you are distant from your people, it’s horrible. The weekend is too short for lots of travel, everyone else in the country is getting on the same plane as you, things just suck. We’re opting to just stay here in Chicago, where we will try to find an Indian restaurant with a Thanksgiving buffet. We had great curried turkey years ago, and have been trying to recapture that experience ever since. Instead of doing a power travel for this weekend, we’re spending extra time over Christmas. For once, we might actually have 10 days or so to do all this stuff. We are always in a rush when we visit anyone because we have many people to see, spread out a lot of territory. For once, we might have a peaceful holiday.

The Pause that Depresses

I’ve never smoked, but I’m going through my own habit kick right now – trying to cut back on the amount of Diet Coke I drink. The key moment was last night doing the recycling, when I found three empty 12 pack boxes for the lemon Diet Coke. I’m the only one in this house that drinks the lemon ones, which means I drank those three 12 packs since the last time the recycling was done. I know I drank some of the regular ones too, so I’m consuming 6 or more cans of Diet Coke a day (this doesn’t count what I drink at restuarants, movies, etc.) I drink too much of it.

I’m allowing myself three per day – one in the morning, afternoon and evening. It will be tough. It’s not 9 AM yet and I’m jonesing for one. I’m trying to reach for plain old water when I would go for the Coke. It’s overall better for me, cheaper, keeps the appetite cravings down, etc. Oh, but the Diet Coke is tasty, and one sure would be good right about now….

Chicago Weather

From what I’ve been able to tell from my brief time here, Chicagoland residents are completely obsessed with the inclemency of their weather. In August I arrived in Evanston with the moving truck on the hottest day of the year, and even then people were talking about how bad the winter would be. Almost every conversation I’ve had with a neighbor involved winter, and always in the same tone of voice you tell a kid around a campfire about a bogeyman with a hook hand.

I’m expecting the winter to actually not be as bad as the ones I grew up with in Kansas. At the risk of sounding cliche, I actually did walk to school in the snow (but I wasn’t barefoot and there are few hills in NW Kansas.) The last few days have been cold, but last week I went all the way until Friday without ever putting on a coat. At several points, I felt hot and overdressed wearing sweatshirts. If it really does live up to the hype, I’ll eat my words but right now it feels kind of like new resident hazing.

As I’ve Matured

Getting old is a touchy subject with me. I joke about it a lot, but I don’t particularly like it (yes, I know it beats the alternative.) I don’t like big birthday celebrations because I don’t like to be reminded of the passing of time, taking comfort in whatever denial I can work up. I’m heartened that people tend to think I’m much younger than I really am (when we moved to this neighborhood, someone asked me if my father was transferred here) and I always enjoy the fact that most of my college buddies look 10 years older than me. I go to events and wonder “Who exactly are all these middle-aged people with the same names as my friends?” It’s an odd paradox, because I think in every way I’m a better person than I was when I was 21. I want that person’s body, metabolism and stamina with this brain inside it. But I don’t like aging, or more correctly, I don’t like slowly becoming aged. There are some upsides, though.

In that ilk, I found a great listing of lessons from aging posted on McGee’s Musings. My favorite couple:

  • I’ve learned that you shouldn’t compare yourself to others – they are more
    screwed up than you think.
  • I’ve learned that depression is merely anger without enthusiasm.
  • I’ve learned that it is not what you wear, it is how you take it off.
  • I’ve learned that you can keep vomiting long after you think you’re
    finished.
  • I’ve learned to not sweat the petty things, and not pet the sweaty things.

Key Lime

Thank god for Trader Joe’s. Having them available again is a bonus for living in Evanston. If I had more working capitol, I’d have opened one in Atlanta. Life sucks without them! Last night we went on a run, and got all kinds of neat and weird foods for cheap. I just had the first trial run of key lime marmalade on toast for breakfast. Yummy! I tasted it straight on the spoon and it tasted kind of funky and bitter but on the toast it was great. We also got lots of the frozen rice bowls, and I got a sushi plate for lunch today which was half the price of your typical grocery store sushi – under $4 for an 8 piece plate with shrimp and California rolls. Trader Joe’s does a body good.

Agile Data

Yet another great website I was pointed to by Darin (who really should be blogging all this himself). This one is the AgileData page. It appears to either be a page sort of centered around a book or perhaps the book came from the web page. Either way, it is focused on the problems of refactoring databases. This one is near and dear to my heart, working as I do every day with a horrible database schema that needs much help but will never get it. The problems of refactoring are so great and break so much in so many ways that it will never happen, minus a miracle. Well, these techniques might actually be that miracle.

There is no sense in me rehashing the page, since it does that quite well for itself. However, let me point out one particularly good essay describing the process of database refactoring. This is all good stuff. In an ideal world, none of us would need this. In the world we sadly inhabit, almost anyone that uses any sort of deployed database can learn a lot in this regard.

Update: I forgot to mention something earlier. On this page, they flag as important the fact that all the work product of the database refactoring should be version controlled. This includes any definition artifacts, scripts that manage or migrate the data, text files that support it, etc. This particular notion is something that I brought up as important over a year ago in a situation where there was a “reference database”, one instance of a database that was cloned at delivery time and shipped to customers. “How do you know if/when it was changed, and if it was when and by whom for what reason?” “Dunno” was the only response I ever got. I tried like a demon to get it into a versioned system, had succeeded at that, only to find it all undone and reverted to the uncontrolled, unversioned system. Que sera.

Why I Chose Hibernate

In my project, I wanted an O/R (object relational) mapping layer. This was to to prevent my code from having lots of low-level, literal database code throughout. There are many choices, and I chose Hibernate. In my first proof of concept, I had actually used Cayenne (I had also used it some at the day job). So what were the aspects of Hibernate that made me want to switch to it, learning curve and all?

First and foremost, Hibernate works with POJO (plain ol’ Java objects) without any special inheritance. A weakness of Cayenne is that your data objects must all extend from Cayenne classes. This can be a big problem if you actually want a specific superclass for them (like, say, extending Map). The Cayenne modeling step is quite cumbersome, and ultimately it creates for you an XML mapping document and shell classes. In Hibernate, you create your own XML document, actually a little simpler than Cayenne’s, and then go to town. No special class inheritance is required. In the Hibernate mapping XML, you specify what table and columns are mapped to the fields in your POJO. That’s all you need to do. At query time, the Hibernate engine will use introspection to find the accessors and load them up with data. The only rule is that you must have accessors (get and set methods) for every attribute you have mapped. This, if you have object Foo with field bar, you need getBar() and setBar() methods, and a Foo.hbm.xml document that describes the mapping. In it, you tell it what table and column the value for “bar” will come from. That’s it. The rest is done automatically.

Hibernate also allows for significant complexity in the mapping. If the mapped table has one-to-many or many-to-many relationships with other mapped tables, you can have them mapped as sets. That way, given an object of type Foo where the bar above is actually one-to-many with the Bar type, you can get a List of associated objects by calling the getBar() method. It’s all very flexible. This relationship can also be in the form of a Map type, where one value in a table is set as the key and another as the value. There is far more complexity available than I have yet used

The aspect that sold me more than any other, though, was the Hibernate Query Language (HQL for short.) It has much of the familar syntax of SQL, but with some wonderfully economical extensions. Because Hibernate knows how your objects relate to the database via the mapping files, you can do complete queries without using the database tables at all. “from com.example.Foo ” would result in a list of Foo objects, one for every row in the table to which it was mapped. Queries can be done by comparing the Hibernate objects, and implicit join logic can even be done by using properties of mapped objects. “from com.example.Foo where Foo.bar.barbar = 1” would select all the objects of Foo that are related to objects of type Bar with field barbar equal to 1. This is much more compact a query than the equivalent SQL would be with joins.

Putting all the above together allows for the situation in which I used it. I began with a database schema, and spent some time mapping that into the Hibernate data objects. This left me with a data object for every table that I needed to interact with. Because all foreign key relationships were mapped in, any access I need to use is transparent to me. If a class is related to a class via 3 intervening join tables, I can access property of the distant class by a.getB().getC().getProperty() . I need not directly instantiate any of those intermediate classes. In fact, I’m not even completely sure if they get instantiated at all. This is how JDO should be. I don’t know how the data comes across the wire, all I know is that I have an object that reflects the data. I can read it and use it, I can change the values and write it back, but I never actually touch the database layer directly.

Used in my Struts web GUI, these objects and their properties are highly useful. I have a list of objects of my type Category attached to the request or the application. Within the Struts JSP, I can iterate over this list access the attributes of this object, as well as any object related to it. This allows for easily setting the displayed name in a selection list to “category.name” while the value is “category.id” and if I need to I can access properties of my related Role objects via direct calls ala “category.role.id”. It makes for the handling of large amounts of dynamic data, which is a common task in web applications and a highly tedious one, nearly effortless. So far, I have been delighted with the choice of Hibernate.