rlucas.net: The Next Generation Rotating Header Image

August, 2006:

Social Networking Connection Policy for Current / Prospective Investment Candidates

*Update:* This policy is dumb-assed and I have rescinded it; see [http://rlucas.net/blog/metablog/rescinded_social_networking_connection_policy.html my more recent post]. Policy on adding connections: Please note that I do not accept connection invitations from folks who are, or in the immediate future will be, prospective investments for Voyager. This is to avoid either actual or apparent leaking of information or impropriety in investment decisions. (I am happy to re-connect after active investment consideration is over!)

A Rational Scheme for Medical Laboratory Results

Medical laboratory results these days are a hodgepodge of numbers on various scales and with various units. For example, the Merck Manual lists various laboratory test normal ranges and their units:

Hematocrit: Male 41-50%, Female 35-46% Hemoglobin: Male 13.8-17.2 g/dL, Female 12.0-15.6 g/dL ... Sodium: 135-146 mmol/L  

These “normal ranges” can be sort of misleading. If your value is numerically half of the lower-end of the hematocrit range, for example (say, 20%), you would be sick but still alive. However, if you have only half the normal range of sodium concentration (say, 70 mmol/L), you’d be dead.

This is crappy. It imposes a high cognitive load on doctors by requiring them to know a variety of “normal” ranges, it makes lab results opaque to patients and the uninitiated, and it has a “hidden memorization cost” of knowing the implications of going outside the normal range (such as the difference between having half the normal measurement for hematocrit vs. sodium, above).

I propose a replacement scheme for all scalar laboratory values (at least those in the main test batteries, like the chem-N and CBCs). In my scheme, all “unit” lab results are replaced (realistically, augmented) by “rational” values. Rational values are normalized at 100 for the center of the range. The “normal range” is represented by the range 90-110. The values associated with roughly 50% mortality are set at 50-150. The ranges 80-120, 70-130, and 60-140 will be pegged at some statistics-based measurement, either based upon standard deviation or upon increased chances of negative outcomes, whichever an appropriate standards body decides best (there are some labs for which it might not make sense to have it be standard deviation-based, others for which it would).

The correspondence of “unit” to “rational” measurements is not necessarily linear; the formulae to determine this will be decided per-test, reviewed annually by the standards body, and published as an appendix to standard references and on the Web.

The “core rational” lab values are those which are unadjusted for average adults. “Adjusted rational” lab values are adjusted for sex and body mass. “Peds adjusted rational” values are adjusted as above but with age ranges.

All lab reports will show these values on the summary page; “unit” measurements will be provided as well (they will doubtless remain indispensable for certain purposes). Color-coding would be straightforward: green for +/- 10, yellow for +– 20, orange for +– 30, and red for +/- 40.

This will become an ever more crucial part of diagnosis as we move toward greater automation (e.g. field lab-testing machines that paramedics could carry) and de-skilling of the medical profession (nurse practitioners, paramedics, self-administered care and monitoring, etc.). It also becomes a key part of the understanding required for personal medical choice as we move the economics of health care toward a (partial) patient-pays model.

If someone wants to give me a grant for a year of my time with a couple of assistants, I’ll go ahead and set this up. Drop me an email – rlucas@tercent.com.

Brooklyn Restaurant Review (Seattle, WA)

Date: 2006-08-18 Reviewer: rlucas Review: The “Brooklyn” Restaurant (Seattle, WA) Summary: C minus for overall experience We recently got hit with a heat wave here in Seattle, and so my wife and I decided to celebrate having survived another blistering weekend day by going out. I was looking for a steak, so we hit up the Brooklyn, where we’ve enjoyed happy hour before a time or two. Unfortunately, we had a very disappointing experience. Despite our having made a reservation, our table wasn’t ready when we showed up five minutes fashionably late. The hostesses suggested we sit in the waiting area, which is a bit of a dismal nook (in retrospect, having gone for a Martini at that moment would have significantly improved the evening). When we were seated, it was in the bar area in front (at the time, I didn’t realize there was a real dining room in back or I would have agitated for it). This might have been OK during a less busy time or in the daylight. As it was, the room had noisy acoustics and folks were crammed in rather close to one another — our evening out together was now being augmented by the evenings out of various folks, such as some chatty tourists from Boston. Furthermore, at night, the high-pressure sodium (bright orange and buzzy) street lamps come on, and shine through the blinds in a most unflattering way. This would have been water under the bridge if the rest of the experience had been excellent. It was not. Her seafood something-or-other was quite passable — B+ / A- — but my filet mignon, a dish I order once or twice a year, was a C cut of meat, too large by half and stringy and oddly marbled. Our waiter was professional and prompt, but — and it’s hard to say if this is an impression we formed due to the other factors or not — he seemed awful /weird/ in an inexplicable way. The wine by the glass selections were good, not excellent, but definitely above average for by-the-glass (handy descriptions of the 8-9 types provided a guide and doubtless helped us make satisfying choices). In the end, we left feeling like we’d dropped a c-note in vain. The Brooklyn is forever cast in my mind’s eye in the light of a high-pressure sodium streetlamp — with not a jot of the luxury and escapism that is the stock in trade of even merely good steakhouses. Conclusion: Avoid the Brooklyn — and if you do end up there, avoid the front of the house in the evening, and the filet mignon unless you hear otherwise.

Picoformats – The Lazy, Curmudgeonly Answer to Microformats

I like the idea of Microformats — they’re essentially loosely standardized schemata with a strictly standardized syntax (which plays nice with (X)HTML — hence the “h” in front of hCard, the new groovy Microformat version of vCard). They’re 90% of the way to my new Nirvana of all-text interoperability (I no longer trust binary formats unless the readers and writers are Open Source and old).

But I hate angle brackets, and I hate having to do crap that the computer should be doing.

So, I’m defining Picoformats. It’s like this. You can do a pReview, or pCard, or pCalendar, or whatever — we’ll call it a pThing. If there’s a corresponding Microformat or other similar format defined, you SHOULD include the constituent fields that the format defines as required; if not, you SHOULD try and include the same fields when do you do the next pThing.

You SHOULD write in plain English, or whatever you like. You SHOULD write in the format you like, but you MUST NOT hand-code more markup than necessary, memorize any XML namespaces, or be tied to special-purpose tools.

You SHOULD prefix the constituent parts of your pThing schema with the name of the field, set apart in some reasonable way, like being the first thing on a newline before a comma, like this:

Name: Bob Smith  

or with some easily-added formatting, like this:

Name Bob Smith

or whatever happens to work for you. You MUST NOT freak out if the word you use to represent the field is not exactly the same as in the corresponding schema, although it’s AWFUL NICE if you keep it real close (like “Date Reviewed” instead of “dtreviewed”).

You SHOULD keep all the schema fields in the same document, right up next to each other, and delimited in some easy to dig way like starting on newlines or something.

You MUST trust that Google and its heirs will help people find your pThing, and that smart people like Ana-Maria will help computers understand your pThing. You SHOULD help them both out by writing a parser to a standard format if it’s easy to do.

Now: to write a pReview or two.

Full Sail Session vs. Domestic Beers

A few weeks ago, P—- made fun of me for ordering a bottle of Session brand beer at Captain Ankeny’s, one of downtown Portland’s best Wednesday night deals ($1 cheese pizza, $2.50 microbrews). “Session?” he chided, “why spend two bucks on that when you can get a pint of good stuff for fifty cents more?”

Fifty cents or no, I enjoyed my pizza and my Session. But the point he raised is a valid one: if you pour a Session out of its dark brown stubby bottle, you may be surprised to see a hue more reminiscent of Foster’s than Full Sail. It’s a golden lager, not an ale, and certainly not heavy on either hops or malt flavors.

Is this just a case of “meet the new boss, same as the old boss?” Are we being led astray by marketing, by the clever ruse of Full Sail Brewing, who now are trying to parlay their well-built brand into high-margin success by selling us swill at a premium?

This calls for a blind taste test. Three glasses, labelled underneath with the beer type, with equal volumes (~ 4 oz) of Session (bottle), Bud (can), and MGD (can). Mixed in a dark kitchen and scrambled around so I honestly didn’t know which was which when I took them into the living room.


Beer #1: Lightest of the three by a hair over #2. Head seemed to come down the quickest with the least residual foam on the sides. Steady but modest effervescence, with a few bubbles adhering to the glass.

Beer #2: A bit darker than #1, but still a light color; this is more like gold with a bit of copper in it than shiny 24k stuff. The head has gone down but left an even cylindrical section of foam still stuck to the sides of the glass. Effervescence is continuous at about the same rate as #1 but with no bubbles adhering to the bottom.

Beer #3: Significantly darker than the other two (actually, about as dark as both put together — when #1 and #2 are next to one another, they make about as dark an image as #3 alone). Still not “dark” by any means. The head has gone down leaving an uneven “mountain range” ringing the glass. Bubbles are slower and bigger; there are many large bubbles adhering to the bottom.


Beer #1: Smells like cheap beer. Kind of a sharp odor, with a sweetness.

Beer #2: Smells like cheap beer, but a little more vegetable smell, and a smell like wet old clothes.

Beer #3: Smells like honey with a bit of spice. I am getting a feeling that a bias toward #3 may be setting in.

First taste:

Beer #1: Mild taste, a bit of sweetness, almost no hops.

Beer #2: Sweeter, still quite mild. Almost no hops. I think there’s a bit of a chemical aftertaste.

Beer #3: Sweeter still, with more alcohol / carbonation to attack the palate (I’m not skilled enough to discern the two). There is a slight bitter, asparagus-like aftertaste.

Second taste:

Beer #1: This time, felt the carbonation / alcohol a bit more (mouth sensitized?). The sugar is the dominant taste, though it is very dilute, like a little bit of honey dissolved in water. I think now that this is sweeter (in terms of sweetness, not in terms of sugar content) than #2.

Beer #2: Getting a bit more bitterness (hops?) out of it. The sugars are there — you can taste them — but they don’t manifest as sweetness so much as in added body. The aftertaste is not so much a taste as a feel — the residual taste, strictly speaking, is sugary, but there’s a kind of oily, chemical feel.

Beer #3: More alcohol, lots more hops, and a return to the honey-sweet type of sugar flavor (tempered by those hops, though). The aftertaste is the most pronounced of the three; however, it’s more of a lingering bitterness / acidity, rather than #2’s weird chemical residue.


Beer #1: OK. Not great. Would drink it if it were free.

Beer #2: Sort of OK. Would drink it if it were free and I were trying to be polite. Would choose pretty much any microbrew or import over #2.

Beer #3: A little more interesting. “OK plus.” Would stand up next to mass-produced imports, or perhaps almost up to Sam Adams. Doesn’t seem like it would stand up to a real microbrew or a Muenchener bier.

Results (could you guess?):

Beer #1: Bud

Beer #2: MGD

Beer #3: Session


My methodology may be questioned, but the results seem pretty firm. Session is different from the major domestics. It’s probably also not as good as a “real” microbrew, if, like me, you enjoy strong or novel flavors (various forms of hops shenanigans, strong IPAs, infusions, Rauchbiers, steam beers, bocks, etc.). I didn’t bother comparing it to a domestic “ultrapremium,” though that might be a more valid comparison. At the price we’re seeing locally ($10/12), Session is a relatively good buy.

Date: 2006-08-18 Reviewer: rlucas Reviewed: Full Sail Brewing's "Session" beer Summary: Compared Session to Budweiser (Bud) and Miller Genuine Draft (MGD) Result: Session wins on hops, sugar, and alcohol.  MGD has a bad aftertaste. Conclusion: Session is not just a marketing ploy, but an OK value beer.  

Linux Software RAID and GRUB – Recovering From a Failure

A couple of weeks ago, I had the bright idea to move an internal server here at Voyager from my office into a data room. I issued the customary sudo shutdown now and proceeded to move the box.

I was dismayed not to see it boot right back up afterwards. Ouch! I had specifically configured it with software RAID because the hard drives in the old spare box were a bit dodgy. Turns out that was a good idea, since one of the drives had failed (apparently the one that had the GRUB bootloader appropriately loaded on it).

I was faced with two 20 Gig HDDs, only one of which worked exactly right, and a computer which failed to boot off the remaining HDD. A quick trip to uBid and $70 later, I had two 60 Gig drives ready to use (20 Gigs are darn near impossible to find). I knew enough about partitions and whatnot to get this much done:

– Got a bootable rescue CD with a good set of utils (PLD Linux) downloaded and burned (it’s good to have one of these handy, rather than trying to burn them as-needed — see below under “Tricky stuff” for my unfortunate experiences with that).

– Trial-and-errored the two old HDDs to find which one was failing. Removed the bad one and replaced with New HDD #1.

– Used cfdisk, the curses-based fdisk, to read the exact size and type of the good RAID partition from Old HDD. Used that information to create an identical physical partition at the beginning of New HDD #1, including the same (Linux Software RAID) partition type.

– Used dd, the bit-for-bit copier, to copy the verbatim entire partition from the Old HDD’s main partition, /dev/hda1, to the New HDD #1’s identically situated partition, /dev/hdc1, both of which were unmounted at the time.

– Swapped out the Old HDD with New #2, and repeated the last couple steps to make a new partition on New #2 and copy New #1’s first partition to it.

– Used mdadm --assemble to put the two identical RAID partitions — /dev/hda1 and /dev/hdc1 — back together into a RAID array and let it re-sync them until mdadm reported them to be in good health.

– Used GRUB to re-install the MBR on both HDDs. This was a damn sight harder than it sounds (see below).

All in all, it was a far cry from sliding a replacement hot-swap SCSI into a nice hardware-based array — but at $70, a fraction of the cost, though hardly timely (my use of this server is as a document archive, web proxy, cron-job runner, and general workhorse for background processing and speculative projects for automated information-gathering tasks — none of which are mission-critical for us at Voyager).

Tricky stuff:

– Windows XP apparently doesn’t come with ANY ability to burn ISOs. WTF, Microsoft? Operating system ISOs are just about the only legal thing I have ever wanted to burn to a CD, and that’s the one thing you won’t support? (Well, duh, really.)

– The latest Knoppix (5.0?) just plain barfed. It may have been the speed at which the dodgy ISO burning software I downloaded burned it (errors?). In any case, burned about an hour of my life trying different “nousb” and similar switches to no avail.

PLD Linux‘s rescue disk was small and booted perfectly (though I took care to burn it at a low speed).

– BLACK MAGICK: When booting from the rescue disk, to get mdadm to appropriately deal with the raid, there weren’t any md devices in /dev on which I could mount the RAID. I needed a couple of times to create the node /dev/md0 by issuing the commands:

mknod /dev/md0 b 9 0  

Which, as I understand it, is “make node /dev/md0, type block, numerical type #9 (the magic number for RAID?), and the 0th such block.” Then, since mdadm refused to automatically find and mount the drives for /dev/md0, I had to find the UUID for the RAID volume thus:

mdadm --examine --scan  

And then copy the UUID (thanks, GNU Screen!) into the command:

mdadm /dev/md0 --assemble --uuid=<WHATEVER>  

– Getting GRUB installed on the hard drives was, in the end, easier than I thought but was rocky due to the complexity of the issues involved and me not understanding them fully.

If you search for “software raid grub” you’ll find a number of web pages that more or less get you there with what you need to know.

For me to get GRUB to work, I did the following.

– First, I had the /dev/md0 partition (the “RAID partition”) holding my / (root) partition, with NO separate /boot partition. That means I had to make each of /dev/hda1 and /dev/hdc1 (the “RAID constituents”) bootable. Much of what you read follows the old advice of having a separate / and /boot, which I did not have.

– Second, I had to boot from the rescue CD, get the RAID partition assembled, mount it, and chroot into the mount point of the RAID partition. Like:

mknod /dev/md0 b 9 0 mdadm /dev/md0 --assemble --uuid=<WHATEVER> mkdir /tmp/md0 mount /dev/md0 /tmp/md0 cd /tmp/md0 chroot .  

Note that since the partition names and numbers were the same on my New #1 and #2 drives as they were on the old ones (hd[ac]1), there’s no problem with the old legacy /etc/mdadm/mdadm.conf and it can tell the kernel how to assemble and mount the RAID partition (important for below).

– Then, once chroot‘ed into the RAID partition, I ran run-time GRUB (“run-time GRUB” being when you run grub as root on an already booted machine for purposes of installing stuff or whatnot; this is opposed to “boot-time GRUB” which looks pretty damn similar but is what is run off of the master boot record — MBR — of a bootable partition onto which GRUB has been installed) off of there, which used the existing Ubuntu menu.lst file. For some reason, that file ended up binary and corrupted. Therefore, I had to scrap it and come up with a new one. Here’s the meat of my new menu.lst:

# Boot automatically after 15 secs. timeout 15  # By default, boot the first entry. default 0  # Fallback to the second entry. fallback 1  # For booting Linux title  Linux root (hd0,0) kernel /vmlinuz root=/dev/md0 initrd /initrd.img  # For booting Linux title  Linux root (hd1,0) kernel /vmlinuz root=/dev/md0 initrd /initrd.img  

– Using that menu.lst, the commands I entered in the GRUB shell were as follows:

device (hd0) /dev/hda root (hd0,0) setup (hd0) device (hd0) /dev/hdc root (hd0,0) setup (hd0)  

The rationale behind this is that the first three lines install the current menu.lst (that is, whichever one it finds in /boot/grub/menu.lst) onto the MBR of /dev/hda, the first bootable HDD, and the second three lines install onto the MBR of /dev/hdc, the second HDD, but fake out the installation there of GRUB to act as though it’s on the first, bootable hdd (hd0).

Do you get it? After chrooting, I fired up run-time GRUB, which automatically looks in its current boot/grub for menu.lst. I told it to put MBRs on both /dev/hda and /dev/hdc to make boot-time GRUB behave as specified in the menu.lst. The menu.lst lines say “use hd0,0 (e.g. hda1) as the root directory, find the kernel (vmlinuz) and initrd there, and once the kernel get loaded, tell it to use /dev/md0 as the real root directory, which it can do because it reads /etc/mdadm/mdadm.conf or /etc/mdadm.conf to figure out its md devices.

What puzzled me at first was, "how does the kernel get loaded when the root is /dev/md0 and you obviously must run mdadm in order to assemble and mount /dev/md0?" The answer is that when you do the installation commands listed above, it tells the boot-time GRUB to act as though (hd0,0) (AKA /dev/hda1 or /dev/hdc1, depending on whether the BIOS points to hda or hdc for booting) is its root directory. So, boot-time GRUB, all the way up through the loading of the kernel, treats /dev/hda1 (or hdc1) as its root, and only at the stage where the kernel is loaded enough to check mdadm.conf and run mdadm does it then do a little "chroot" of its own. If I've got this completely wrong, please [rlucas@tercent.com email me] and tell me I'm a bonehead (and include a link to your, more informed, writeup).

There's an elegance to the whole Linux software RAID thing, but it took a darn long time to comprehend.

Earnings Calls in a Trippy Vortex

Today, I called up a news release on finance.yahoo.com for a fairly dodgy publicly traded company. Although I expected to find a transcript of the earnings call, or perhaps a brief table summarizing the expected and actual earnings numbers, I was given a link to the full audio of the call.

When I clicked the link, a full-screen window of Windows Media Player popped open and started playing the earnings call, with a huge, trippy, psychedelic vortex being rendered in the middle of the screen!

(As it happens, a mind-warping black hole of profits is the most appropriate metaphor for what this earnings call was all about.)

Thanks for a bit of inspired weirdness, Microsoft. It was certainly more enjoyable than discovering that your flagship email client can’t “archive” two folders at once.

PayPal Continues to Suck

[PayPal http://www.paypal.com/] has always sucked. This is well accepted on the Internet. Witness: http://www.google.com/search?q=paypal+sucks … Results 1 – 100 of about 1,680,000 for paypal sucks. Here are the specific deficiencies I have most often heard cited: * Freezing of funds for arbitrarily long times with no explanation. * Bizzarely intricate information requests. * User unfriendliness to payors. In my case, I went to eBay to purchase some computer hardware. When I won the auction, I went to pay by credit card in the way most readily presented — which was PayPal. Due to some transactions I did the better part of a decade ago (they still had my address from 1999-2000), I was unable to log in to PayPal (an eBay Company). (Incidentally, eBay usernames and passwords have different validation requirements than those for PayPal, e.g. 8 char passwords.) Then, once I got PayPal to send me a “forgot password” link, it told me to /telephone them in Nebraska!/ Bear in mind that this is in the course of attempting to /give my money to a guy on eBay/, and now “an eBay Company” is my biggest obstacle to so doing. The gentleman in Nebraska was kind, but ultimately frustrating — telling me that a “code 31” means that they had to close the old account, but the presence of a stray two dollars in the account meant it would take 72 hours before I could sign up with a new account. After which point, of course, the seller on eBay would have written me off as a deadbeat. The rep suggests that I open a new email account. Just for PayPal. Just for this transaction. *Who is on the buy side here?!* I am a pretty stingy guy — but when I do actually lay down the greenbacks, I just want a modicum of respect. To PayPal and eBay, I say: congratulations. I now will choose *any* method over PayPal whenever possible.

Everyone Is Here in the Future

I just came across what I am willing to call some of the most interesting and (personally) relevant cultural commentary I’ve seen in a while. No talk of Hezbollah, nothing on Bush or Britney — rather, art intended to make people living a software-mediated lifestyle stop and think a moment: (Warnings: Flash required; starts playing immediately with audio; possibly epilepsy-triggering.) http://redhanded.hobix.com/cult/everyoneIsHereInTheFuture.html http://redhanded.hobix.com/cult/everyoneIsHereInTheFuture2.html For those of us in the tech world — especially the parts of the tech world that occasionally sees comrades being struck down by angel funding coming out of the sky — this is worth seeing and thinking about. But not too hard. After all, you’ve got to get a business model and write some new dual-core turbo buttons for your mail merge.