Archive for October, 2006

A Ghost Story

Tuesday, October 31st, 2006

Sometimes, a good ghost story can help you professionally (as a software engineer).

Prettifying Python’s unittest output (and making it more informative)

Sunday, October 29th, 2006

Yeah, I still write code. I just can’t publicly talk about it. Yet.

Recently, I have been writing unit tests that involve passing source code through GCC and then running the resulting compiled binary. Given that PyObjC already does this for the unit tests of ffi, I started my test harness by ripping off that one.

My tests actually look for very specific warnings and failures from GCC. So, I augmented the script slightly to allow me to embed “expect this warning/error” into the source to be compiled.

When such a test fails, it is terribly useful to actually see the command line that was invoked. Unfortunately, it doesn’t appear that Python’s unittest TestCase class has a hook for composing the failure details. But it does have a hook for easily setting the class of the exception that will be raised. From there, it is easy enough to pass a reference back to the TestCase into the various assert methods to allow a custom exception class to provide more info.

Don’t bother trying to parse that paragraph, just read the code:

class TestCaseAssertionError (AssertionError):
    def __str__(self):
        if len(self.args) is 2:
            msg, testCase = self.args
            return "\\n\\nCompiled using:\\n\\t%s\\n\\n------ Details ------\\n%s\\n------ End Details ------" % (testCase.commandline, str(msg))
            return str(self.args)

class DgTestCase (unittest.TestCase):
    failureException = TestCaseAssertionError
    def __init__(self, filename):
        self.filename = filename
        self.commandline = None

    ... at some point, the command line is composed and self.commandline is set ....

    ... then, in a test case ....
    self.assertNotEqual(actual.strip().find(expected.strip()), -1,
    ("Expected to find:\\n\\t%s\\nNot found in:\\n\\t%s" % (expected.strip(), actual.strip()), self))

Easy enough. Now, when a compiler failure occurs, I can easily copy/paste the command line to see the full output or deduce the issue further. Though the above is completely specific to my needs it would be easy to generalize.

Arandas: Centinela Party

Friday, October 27th, 2006
The Gang

Following the amazing tour, Centinela had a couple of tents set up in the parking lot. Each tent contained the entire Centinela product line (including both the high-end 3 year anejo and the Cabritos label) open for tasting. More like open for uninhibited pouring.

And pour we did. The fine crew at Centinela were also making mixed drinks of all kinds, including an excellent Sangria with Tequila in it. Ironically, the margaritas were really bad. Very bad. But Tequila in Fresca is surprisingly refreshing.

After an hour or more of “tasting” all of their products, Centinela offered a bunch of their product for sale. They even broke out a box of their seven year anejo for both sale and for tasting. Amazing stuff.

Mariachi Band Plays at Centinela Distillery

As the working day drew to a close, the staff all joined us and it turned into quite the party. A mariachi band seemingly came out of nowhere and entertained us for a while.

Mariachi is quite distinct in the musical structure and sound. Apparently, Jalisco is the source of all things traditionally thought of as Mexican, including the Mariachi band.

Delicious Tacos

Then they brought out the food. It was simple fare. Completely delicious. Centinela served a big tray of roasted peppers, a gigantic pile of succulent carnitas, and a mystery meat stew. And a big pile of fresh corn tortillas.

Carnitas? Perfectly roasted pork bits on the center-top taco in that picture. The odd chunk of meat on the left is pig’s heart. Yummy stuff of which I ate much much more pig’s heart as bar snacks later in the weekend.

The red goop on the other two tortillas was a delicious tomato based stew with chile peppers and random chunks of meat, mostly tripe.

Read the rest of this entry »

Arandas: Tequila Centinela Distillery Tour (Or: How to Make Really Good Tequila!)

Saturday, October 21st, 2006
Christine Visits Centinela Distillery -- Makers of incredibly tasty tequila.

On Friday (Oct 13, 2006) afternoon (after flying all night and 4.5L of tequila’s worth of bus ride to the hotel), we headed to Tequila Centinela for a tour of the distillery.

If you are in need of a good Tequila, you cannot go wrong with any Centinela product. They are all rock solid product that can be enjoyed as a sipping tequila or in a well made margarita (no mixes). Seriously good stuff. If you can find it, the three year añejo is an absolutely delicious sipping tequila that can usually be had for around $80/bottle. Rarer still is the seven year añejo. Right at the edge of useful aging span for a tequila and an absolutely sublime product.

Bbum Visits Centinela Distillery -- Makers of incredibly tasty tequila.

At left is Christine standing below the main tank/sign of the distillery. Of course, there is a photo of me in the same spot.

We then got a full tour of the operation and then partook of a rather awesome seemingly impromptu party in their parking lot.

The full story contains all of the details.

Read the rest of this entry »

Congratulations to Lily & Julio (and a HUGE Thank You!)

Wednesday, October 18th, 2006

Christine and I took a rather amazing trip over last weekend. We were honored to be invited to Lily & Julio’s wedding in Arandas, Jalisco, Mexico.

Lily & Julio Arrive!

First: Congratulations to the bride & groom!

I have known Julio for nearly a decade now. One Awesome Dude who deserves to be really happy. And happy he is as he is now married to The Very Awesome Lady Lily.

Congratulations, Julio — we are ecstatic that you have found such intense happiness with someone who is so happy with you!

The wedding was one amazing event. It was a 12 hour celebration of a magnitude that will be hard to describe.

One heck of a great way to kick off what is bound to be a long and happy marriage. Congratulation again!

The wedding was legendary. 800 guests. 15 days before the wedding, there was a change of venue from an already built facility to an empty field. And the execution was flawless…

More on that later.

Castillo De Cristal Hotel

I’ll be writing up the trip over a few posts. Like the wedding, the trip was something special… a unique bit of traveling experience.

To give an idea of how unique, at right is the picture of the hotel that Christine & I spent the weekend.

The owner always wanted to live in a castle, so he decided to build one for himself right in the middle of a block of downtown Arandas. Over time, his daughter turned it into a Hotel and a completely unique hotel it is. Every bit as unique on the inside as out.

But more on that in later posts…

Bbum Visits Centinela Distillery

And, of course, we were in the heart of Tequila country. Not surprising given that the Wall Street Journal labeled Julio (& Tommy’s in SF) as “epicenter of tequila” and Lily is the grandaughter of the founder of the company that makes El Tesoro tequilas (US market name), an absolutely delicious tequila.

While we didn’t visit the La Alteña Distillery, we did tour the Tequila Centinela distillery found on the outskirts of Arandas. Not only did we receive an interesting and educational tour of the facilities, the Centinela folks threw us one hell of a great party.

Details to follow….

So, yeah, it was one hell of a trip. Once in a lifetime kind of trip. Several posts and lots of photos to follow. We spent 3 days with lots of the incredibly fine folk from Tommy’s Blue Agave Club, including many demigods (of which, I hope to join their ranks in January). This is a very special group of people; it was like hanging with old friends — like the whole group had done trips together many times before even though we were new.

North Korea detonates second nuke test?? (Doesn’t look like it)

Tuesday, October 10th, 2006

When North Korea detonated their first nuclear bomb in a mountain on Sunday/Monday, I submitted a link to the USGS earthquake site showing details of the related seismic event for addition to the related BoingBoing article (which kindly posted a link to this weblog, thanks!).

Now, there is a Reuters article indicating that Japan is claiming that NK may have conducted a second nuclear test.

However, at this time — 5pm PST, Oct 10 2006 — there have been no new events in the North Korea area on the Asia Region seismic activity map.

And the AP has a similar story on the wire that indicates that neither the South Koreans nor US seismic monitors show any sign of an event.

Not so coincidentally (I suspect), there was a magnitude 5.8 seismic event southeast of Japan. It sounds like someone might have jumped the gun on the reporting.

Typically, when a seismic event occurs, the USGS site is updated extremely rapidly. Updates frequently occur within minutes of an event in CA. And the site reports events of extremely minor magnitude; often reporting magnitude 1.0 and 2.0 events caused by quarry explosions at the end of Stevens Creek Boulevard in Cupertino.

So, unless there is a significantly greater delay in event reporting for global (or Asia region) seismic events, then it is unlikely that Korea has managed to detonate a second device. There certainly could be a delay — it did take a few hours for the original event to show up on the map.

Red Spider Mite Infestation

Saturday, October 7th, 2006
Red Spider Mite Infestation

There is a morning glory growing along the fence on the west side of my backyard. It was a volunteer that came up late in the season and never did particularly well.

Recently, the vine has been looking less healthy than usual. I glanced over to see how it was fairing and noticed a rather odd brownish growth on the top. How very odd. Looks almost like a fungus or mold.

Red Spider Mite Infestation

Closer inspection revealed that, in fact, the machine has the worst infestation of Red Spider Mites I have ever witnessed.

That “growth” is a solid mass of mites. There has to be millions on the plant, with a couple of other vertical spikes covered in swarms almost as thick.

Now wonder the plant is just incredibly unhealthy! About the only thing keeping it alive is that morning glories are pretty much very fast growing weeds.

Click through to see a detail shot of the primary mass of bugs. I think I’m going to spray the plant with water or something and then rip it out. But sticking my hands on a plant that heavily covered with web and mites gives me the heebie-jeebies.

Read the rest of this entry »

South Park: “World of Warcraft”

Wednesday, October 4th, 2006

Best. South Park. Ever.

Well, not really. At least, not unless you got sucked into World of Warcraft for a bit.

If you have, it is a damned funny episode. And accurate in that South Park satirical fashion. Going on a 15+ hour quest is not all that uncommon, especially not at the higher levels.

Which is really why I stopped playing at lvl 54. It became a job. A fun job, but a job none-the-less. All that planning, coordination, managing and strategizing, etc… is actually quite amazing.

For those that don’t want to commit a sizable chunk of their lives to the rather excellent experience that is WoW, Joi Ito has written quite a bit on the subject. He is both a talented writer and has devoted enough time to “go deep” in the game. I was even in “We Know” and “We No” for a bit. Was a lot of fun.

Aperture: The Color Tool

Wednesday, October 4th, 2006
Purple Herb Flower
Purple Herb Flower

A couple of days ago, I blogged about the release of Aperture 1.5 and how I really dig the refinements and performance boost. Using the photos at right as a [macro — hey, I’m a happy flower photographer and I’m not afraid to admit it] example, I was able to use the color tools to refine a photo in ways that I couldn’t before.

I’m not the only one digging the new stuff. Duncan — a professional photographer from which I have learned a huge amount — takes on the Aperture color controls and also offers a comparison with similar features in Adobe’s lightroom Adobe Photoshop Lightroom.

Neat stuff. Now I need to go and adjust a few photos given what I just learned…

Aperture & drag and drop

Monday, October 2nd, 2006

One of the spiffy new features of Aperture 1.5 is the ability to drag-n-drop images out of the Aperture window and into anything that can accept a JPEG.

When I first did the import, it was one of the first things I tried and it didn’t work. I was bummed. But then I realized that it was tied to the preview image generation.

If a photo hasn’t had the preview image generated yet, it can’t be drag and dropped. As soon as the preview generation process is done, everything works as expected — drag and drop works beautifully.

BTW: If you haven’t done so, check out the profiles provided on the Aperture site. The Vince Laforet profile is quite interesting; he describes how he took the shot of the guy messing with the light bulb on top of the gargoyle head about a zillion feet up the side of the Chrysler building in NYC. Pretty neat setup.

Now, I just need to find me a dentist’s office that is going out of business…