Wednesday, December 06, 2006

Mac Pro Optical Drive Door Problem

I recently became the proud new father of a Mac Pro 2xDual Core Xeon. It basically rocks the pants off the machine that it replaced - a poky 533Mgz G4.

But it has developed a slight problem with the little sliding door that protects the optical drive innards. It normally slides down when the tray slides out and then back up again after the tray goes back in. But mine now gets stuck when it's down. Like a depressive alcoholic, it just sits down there and sulks long after the tray has gone back home.

I can trick it back up again by raking my finger over the left side of the door a few times. I can't be the only one having this problem so I thought I'd pass it along.

Update 2007-09-19

I have not had a problem with the door for several months. Not sure what caused the problem to go away.

Thursday, July 27, 2006

New Job

I’ve changed jobs. Actually, I changed jobs some time back (April to be specific) but I have more or less forgotten about this blog in the interim.

So I’m no longer with I don’t want to even get into the reasons why I left. It would just remind me how unhappy I was there.

For the time being, I’m contracting for a company called PodShow. It was co-founded by Adam Curry, who was one of the early VJs at MTV. He’s an interesting guy but he lives with his family in London most of the time so he’s not often in the office. The other co-counder - Ron Bloom - basically runs the company. The two of them got very rich with their first start-up, Think New Ideas, which I believe they sold for $400 million.

Marc Frochtzweig and Stephen Rodriguez were two excellent product designers that I worked with at Tagged and they both moved to PodShow. They in turn brought me in. Ostensibly, I was going to be working on creating some address book importers for the big webmail providers (e.g. gmail, hotmail). I had just spent a lot of time doing similar work for Tagged so I was pretty versed in the way the webmail providers worked.

Before starting however, I took a vacation to Amsterdam and when I came back, they were more interested in having me design an email sending system. From there, I moved on to other administration tools and that’s basically become my domain.

Apparently, PodShow is interested in making me a full-time engineer but so far, they’ve failed to make it happen. They pay me awfully damn well as a contractor though so I’m not really complaining. But I bet I’ll change my tune come April 15th.

Wednesday, February 15, 2006

Hell is upgrading Oracle versions

We're migrating from Oracle 9i running on a single box (in MTS mode) to an Oracle 10g RAC cluster. For those that don't know, RAC is Real Application Server and it's (supposed to be) one of the ways that you create a highly scaleable Oracle system. Before we began I naively thought the migration would... a) cost a fortune, b) be a pain in the ass for the DBAs and IT folks but c) be relatively painless for us software engineers. To make a long story short, I was right about the first two points.

The problems for us stem from the sequence generation facilities. In Oracle you can configure the sequence generator to work in different ways but the way we've had it working for over two years is to generate numbers one right after the other. The numbers that come out of our sequences are in order and there are essentially no gaps between successive items.

One of the side-effects of this approach is that you can treat any such sequence-backed column as a kind of time-stamp; you can order records by their effective creation date just by sorting on the sequence-backed field.

When you move your database to a system that runs on multiple machines (i.e. RAC) you basically lose the ability to have your sequences work this way. More precisely, you can configure them to work that way but doing so means that the nodes in your cluster will need to constantly coordinate with one another and the ensuing chatter will take a big bite out of your performance.

So in switching to RAC we lost the comfort of being able to assume that successive sequence values would go in increasing order. Calling sequence_name.NEXTVAL three times in a row might get you: 47, 38, 52.

We had to hunt down every query in our application that ordered by a sequence- backed field. That in itself is no easy task when you have thousands of queries scattered across hundreds of files, some written in PHP, some in Java and some in PL/SQL. The most sophisticated tool available was grep and we had to manually inspect dozens of candidate queries to figure out which ones to go after.

Then began the hard work of actually fixing the queries. We had to change all the "ORDER BY" clauses to use a different field (or set of fields), specifically a DATE field. Unfortunately, a lot of the underlying tables didn't have any appropriate field so in those cases we needed to modify the schema. The problem then arises of what do with the millions of existing rows that were created before we needed to record the date. We ended up giving them an arbitrary date in the past but that just meant that the "ORDER BY" clause now needed to act on two columns instead of one.

All in all, it took three developers about two weeks.

* I started writing this post months ago but it got waylaid and forgotten. In finishing up I've tried to write in a manner consistent with my thoughts and experiences at the time of inception. I'd like the post to approximate my thoughts at the time

Been a long time

So let's see how long it's been since my last post...three months? Yikes. I'd appologize but then I don't seem to have any readers. I'm writing here to a future version of myself.