Philly 2

Ange and I made a return trip to Philly last weekend to see dead people. We visited the Body Worlds exhibit there, which consists of actual corpses whose blood has been replaced with plastic (let’s see if they notice the difference!). And then their skin, musculature, and innards are disected for all to see. It was actually pretty interesting, and not too disturbing except for the guy that was carrying around his hairy skin like a coat. I learned some new words that will come in handy next time I am impersonating a doctor.

After that, we met up with high school buddy D.A. and chowed down on some food at Monk’s Cafe. Here, a religious order painstakingly prepares hamburgers and beer for your consumption on the holiest day of the week. And you don’t have to know any Latin. It was good catching up and great food too.

Next, AC and I headed to a gelatto shop whose name escapes me. I haven’t had gelatto before, but let me tell you, one day this thing is going to be big. I had something made with coffee and she had something with sweet potatoes in it. Even so, they were both delicious.

Finally, we capped off the day in the Eastern State Penitentiary. This is where I finally got my camera out and managed to snap a picture or two. Eastern State was the birthplace of the Pennsylvania System (a plan to rehabilitate prisoners), and ultimately a model for how not to treat criminals. Some say the Pen is haunted. And by some, I mean Steve Buscemi. But whatever. On evenings in Fall you can pay extra and be guaranteed to see ghosts – for they host a haunted house after hours around Halloween. We, however, just did the historical tour because we had to head back.

Stoned

It’s time to play the blog drinking game: every time someone says they’ve been bad about updates, you drink. Get your shotglass ready…

So anyway, not a lot has been happening lately. Last weekend I bought a countertop for my kitchen: Impala Black granite. I purchased from Lowe’s after the “20% cheaper than home centers” place never called me back. But I got pretty much the exact same stone (and for less). Here’s an interesting fact about granite: there are only so many different colors, and apparently, they don’t go in for variety in naming. So I GISed to get a picture from some other vendor: clicky clicky.

I’m still under budget, but I expect that the aquisition of a new over-the-range microwave and a table saw will put me a couple hundred over.

Also, I patched over the hole where my vent hood used to be. It’s amazing that you can slop a bunch of mud over a hole and no one is the wiser. Actually, I didn’t do a very chocotastic job on it so I may give that one another go this week, but it remains the last engineering hurdle for me to overcome.

Nerd stuff

I’m entering a new phase in the product cycle at work so I get to think more about the current state of the way-behind-the-times while designing a new system.

Swing’s MVC design for tables and combo boxes and so on totally misses the point. MVC is about abstracting away the UI from the model; making the tables explicitly require a model that implements a javax.swing interface does nothing to reduce the coupling between interface and core code. What if I want a curses-based view instead of Swing on top of the same model? I am annoyed that Gtk2 seems to have picked up this misfeature.

Why did Java “5” introduce only an “enhanced for-loop” to go with generics? They should’ve taken a cue from STL and stressed algorithmic reuse. Where is a method like Perl’s map? Also, while we’re at it, I want real closures.

EJB is way too complex, and Sun figured that out, and released a new spec. So far things are looking much better. I don’t like annotations as they clutter the code and seem like a reinvention of #pragma: it looks like something the compiler shouldn’t know about, but does. On the other hand deployment descriptors were 1e15 times worse. The EJB 3 persistence model is a lot cleaner, and surprise, you can use your database code outside the container now. Way to finally support one of the basic goals of OO. In fact, I had a real-world problem to solve earlier this year: write a small application that reuses our DB backend stuff, all command line based, without hitting the EJB tier. This is harder than it sounds, and eventually had me writing my own datasource provider with connection and statement pooling that wrapped the JDBC drivers of our database. Ick.

I hate VMs. Operating systems are there for a reason. If I get another OutOfMemory exception because I didn’t pass -Xmx19201231230 to my leak-free Java program…

AJAX? A new name for what we did with javascript in hidden frames back in 1996? Okay, XmlHttpRequest, I’ll give you that. But it doesn’t deserve being thought of as a new technology. Same for “Service Oriented Architecture,” “Enterprise Service Bus,” and every other re-invention of RPC.

I still think Grady Booch is an idiot.

Kernel programming is fun: you can use goto, bitwise ops, cast pointers to structures, and it’s all okay. Also: don’t comment too much.

Traffic

You know what’s great? When you are on your way home from work and a high speed police chase breaks out, ending in a wreck about 100 yards in front of your vehicle that ultimately closes down the interstate, such that your conveyance must execute a three point turn an hour later to go the wrong way off the highway, thus extending the usual 45 minute commute to three hours.

Oh wait, not great. What’s the word I’m looking for? Suckass.

Dam

A.C. and I went hiking last Sunday, on what was supposed to be a two hour, 6.8 mile loop around Loch Raven north of Baltimore. Of course, it was a total debacle thanks to Bryan Mackay, author of Baltimore Trails, who is officially no longer my friend.

Soon after beginning the hike a few things became apparent: the trail is not blazed, and Mackay has done a craptacular job of indicating which way to go. At least three forks in the trail passed without comment, so we had to backtrack a time or two, including one unfortunate half-mile side-trip ending at an abandoned campfire and a newspaper dispenser.

The point at which A.C. likely gave up hiking for good came at the 4 mile mark, where we are advised that the only ways to continue are to go back the way we came, take a two mile death-defying road detour, or walk across a shallow river along some near-pebbles strewn far and wide. We elected to do the balancing act, and while neither of us fell in, our collective nimbleness was tested far too often. I’ll stick to bridges, thanks. A much easier crossing point, several hundred yards upstream, again was omitted.

All the same, I did get some half decent snapshots of the dam and the lake. And we made it back to the car just before the sun disappeared, which is always a plus.


Bad music

My new contender for worst song ever is the dance mix of “Kiss the Rain.” Somehow I managed to escape this song for most of its lifetime; however, it caught up with me: they play it every single time I am at the gym. Hearing the lady wail a barely-on-key refrain over and over and over again provides a strong incentive to either work out more often such that if I ever meet the guilty sampler, I may handily pummel him, or else to never work out again. I’m not sure which.

Also, gym people, please stop playing anything by Cher, kthx.

New computer

Allow me once again to sing the praises of freecycle, the group that exemplifies “one man’s trash is another man’s trash.” While I’ve unloaded a few junky things this route, last week was my first pick-up. A poster offered an “old” Dell case with Pentium III (733 mHz) motherboard and CPU, and I didn’t hesitate to grab it.

Now, let’s put “old” into context: the machine was evidently made around Y2K. I had my firewall running off of a machine that was also given to me, “old,” in 1999. It was a Pentium 100 that used to belong to a Gateway, had 64 megs of RAM and sat in an AT case. Remember ISA? Big keyboard connectors? Serial ports? This machine has served me faithfully, running a 2.0 Linux kernel for years, delivering mail and proxying all of my network traffic, even back to the days when the upstream connection was a modem. As of yesterday it was on a 160 day uptime — certainly I’ve had longer, but still not bad. I think the last downtime was when I painted my room and had to move it.

Enter my new “old” box. It came without RAM, but luckily I already had 512 megs of SDRAM sitting around. The CPU, video card, and network card included all looked fine, so I grabbed one of the net cards from box #1 and threw it in, swapped in my hard drive, and had it up and running. The fan was very noisy, so I took a trip down to Best Buy.

When are we going to get a Fry’s in NoVA already? To think that my best local so-called computer store is Best Buy… this is a sad state of affairs. Well, they did have case fans, but only the kind with blue blinking LEDs. Resigned, I plopped down my $10 and headed home to install the thing. The good news is that the machine is now quiet enough to act as the new firewall for my home. The bad news: blue blinking LEDs. How am I supposed to sleep with these things flashing all night? There’s no off switch and you can’t cover up the fan. One of these days I might take a soldering iron to the blinking light portion of this thing.

Anyway, a new, much faster, hash is born. Let us hope he is as reliable as his predecessor. And I look forward to getting a free Athlon 64 in 2011.

hashed

Despite earning my degree in computer engineering, I haven’t done anything useful with assembly language since I was a strapping young idealistic lad convinced that compilers lie along the road to inefficiency. Much has changed. Heck, I write Java code for a living now — pretty much the opposite of efficient. I have to have a gig of ram just to run that sucky ant program.

While hacking my MP3 player, I discovered that the filesystem uses hashing to quickly lookup file names, which brought up the question of which hash function it uses. While I suppose one could reverse the hash function knowing a very large set of inputs and outputs, I decided it would probably be much more expedient to just put my atrophied x86 asm knowledge to work for me.

This turned out to be a lot easier than I thought. It only took about 20 minutes and I never had to step through code in a debugger.

Step 1: Disassemble Windows program for loading files onto the device, including the data segment. Look for the offset of a useful printf format string (“hash is %d, expected %d”).
Step 2: Search disassembly for loading said offset in a call to printf. Not surprisingly, this is right after the computation of the hash.
Step 3: Examine nearby calls for things like shifts and mods (common hashing operations).
Step 4: Relearn the stupidities of the x86 ISA (ecx is a loop counter, eax and edx figure in mysteriously for divides, etc).
Step 5: Convinced that a nearby call is it, reimplement in C and test.

Booyeah.

My eatin’ room

As promised, here is another installment of My Kitchen Hates Me. Since last update, some doors have been added to the high cabinets and they have entered actual use; most of the base cabinets are in place and just need to be leveled and mounted to the wall; the pantry is ready to go; the trim was painted white and looks really nice. Still remaining: I need to get a vent hood and possibly cut down the appropriate cabinet so that the hood will fit over the existing hole, buy a countertop, move two base cabinets over about 4 inches so that a drawer will open fully instead of hitting the door molding, attach cover panels and kickplates and doors and drawers. So, most of the hard work is done.

When I get an ETA on the countertop install, I’ll start planning a welcome-back-to-my-house party as only the brave have ventured in since… how many years has it been since I started this project? Dave, you’ll have to drive down from Philly (and bring some cheesesteaks).

In other news, A.C. and I and a bunch of others went kayaking on the Potomac. I now regret not having tried that much earlier. It’s a lot easier than my previous kayaking expedition, which I spent the whole time calculating how quickly I could pull my skirt and how many ways I would die if I didn’t. Kayaking the Potomac is a breeze, like those pedal boats but not as cheesy.

Blah

Last weekend saw the debut of my cowor-ker’s new rock band, the 15th Annual Rosslyn Jazz fest, GT vs UNC — watched at Mister Days, and lots of work on my kitchen. My goal was to complete the kitchen cabinets on Sunday; I didn’t, but I did at least finish hanging all of the wall cabinets. So if I get the base cabinets finished this week I can go buy a countertop. Expect a kitchen pictorial update soon.

I have also made some progress on my Karma reverse-engineering project. It is taking longer than I had hoped since I have had to learn all sorts of esoteric kernel stuff, but now one can, if one is bold and doesn’t mind kernel deadlocks or huge memory leaks, mount and read the files from the Karma. Neat.