So now I’m severely allergic to shrimp

A year or so ago I helped Char finish off some noodles from a thai takeout place. The dish had shrimp it, but I don’t like shrimp so I didn’t eat any. Right after dinner, I noticed my lower lip had puffed up to twice its normal size. I’ve never been allergic to anything, but this was clearly a reaction so I decided to lay off the shrimp.

Last night, Char and I had salmon, and three hours later I noticed my eyelids were starting to swell. I was confused and tried a cold pack, but when that didn’t work I decided to sleep it off. But then I had trouble sleeping, so at 1:30 I checked the mirror. This is pretty much what I saw:

My face last night, pretty much

OK so it wasn’t quite that bad, but the skin around my eyes was extremely puffed up, swelling one eye somewhat shot. So, I woke up Char, and we were off to the emergency room.

The doctor agreed that this was probably an allergic reaction, and that my body has now, thanks to the earlier shrimp incident, produced masses of wonderful shrimp-killing antibodies that are just looking for something shrimpy to destroy. Although I didn’t actually have shrimp last night, I probably got exposed through the salmon, most likely by the guy at Whole Foods not changing his gloves before serving me. (Whole foods had a huge display of shrimp skewers, so it’s likely he’d been skewering shrimp before I go there.)

So now, it’s not just a matter of avoiding shrimp. Now I have to be the dork who demands extra assurance that my seafood hasn’t been anywhere near shrimp. As of now, I’m not allergic to anything else that I know of — I had had scallops the night before without incident. But given the severity of the reaction, it’s not improbable that the allergy could spread to other shellfish. Sigh.

Share

March Madness — nerd style

My work is doing a silly contest around the whole NCAA thing. Back in high school kids used to run around comparing their brackets and arguing over every detail, and I hated it. I don’t follow basketball at all, and other than knowing that Duke ususally does well I have no basis upon which to make any choices except the seeds.

So I decided to write a bracket-generating algorithm that uses the seeds to generate weights for a random function and pick teams that way. The algorithm works as such:

  • for a pair of teams, take their seeds and invert them (make small numbers big)
  • divide each seed by the total of the two seeds to get values 0 < = x <= 1
  • get a random number 0 < = r <= 1. If team a’s chance is >= that value, they win

The actual code isn’t as nice as that explanation, but it should be mathematically equivalent. Any errors in programming only make these results more my own. I took the results from the first run that (a) worked, and (b) had Wisconsin (my alma mater) not getting knocked out in the first round.

Based on brackets.py, the final four will be: Arizona, Kansas, Texas, and Ohio St.

Kansas will win.

Source code after the break:
Continue reading “March Madness — nerd style”

Share

So wrong it can’t be right

Often in my work, I need to create a placeholder animation, text, or graphic before the final version comes in. The problem with a placeholder is that if it remains in place long enough, it can eventually be mistaken for the genuine article. A temporary font becomes the final font. A temporary, unlicensed, low resolution google image becomes the final production image for a high definition show. Usually these mistakes are caught toward the end of the production, and there is much panic as proper replacements are tracked down. Other times the placeholder wins and is broadcast. How can we make sure this doesn’t happen?

The more common solution to problems like these would be to write “PLACEHOLDER: LOW REZ” on a graphic, or something boring like that. This solves nothing. Everyone knows it’s a placeholder, but it’s always good enough “for now” and will sit around forever, never getting replaced until the very end. Maybe it’s less likely to go on the air, but there’s still a flurry of activity as the deadline looms.

My strategy is to make the placeholder so ridiculous and obviously wrong that no one could ever mistake it for being correct. If there’s a question of font, don’t use Arial as a temp font, use something crazy like a party font. If you have a temp graphic that’s too small, shrink it more and save it as a 25% quality jpeg. Even on a tiny screen everyone will see the image isn’t good enough for broadcast.

In one case I had to attribute a graphic to Google Earth. No one could tell me the font, size, or positioning to use, so I created a title with 80 point font that says “GOOGLE EARTH IS AWESOME!!!!!” right across the middle of the screen. That got fixed quickly.

In contrast, a “temp” sound effect in our show was meant to be replaced with a new, awesomer sound effect. Unfortunately because the “temp” sound effect was pretty good, it became the final sound effect. We knew it was a temporary sound effect, but there was no rush replacing it so we didn’t. Had the temp effect been more inappropriate, we would have gotten around to creating something better.

Is this the beginning of a series of Getting Things Done posts? Geez I hope not. I’d like to think there’s a difference between a silly font choice and reminding yourself to pick up milk using RSS feeds, Google Maps, and SMS Messages. Is it possible to blog about tricks like this and not be contributing to the whole efficiency / Web 2.0 / Moleskine cult?

Share

Apple’s solution to confusing error messages:

Just don’t show them!

If you try to eject a CD or DVD and the drive is still in use by another program, an operating system can’t eject the disc because that might crash that program. In GNOME, a helpful error message is generated:

Unable to eject media
Details:
umount: /media/dvdrecorder: device is busy
umount: /media/dvdrecorder: device is busy
Error: umount failed
eject: unmount of `/media/dvdrecorder’ failed

This error is a little confusing, because the first line tells you the error, but the reason is buried in the raw log text. It would be nicer if it just said “Unable to eject media, disc is in use by another program.” But that’s still not great, because it doesn’t tell you which program is using the drive.

On Mac OSX, their solution is: just don’t show an error. You can push eject as much as you like, and the big eject icon will appear on the screen, but else nothing happens. Problem solved!

In another case, we have a fibre storage system that has an artificial read-only mode. In other words, a mounted drive appears to be writable but actually isn’t. I’m told on windows if you try to write to that drive you get an error. Probably “Unable to write to this drive.”

On OSX, it lets you write to the drive. But it doesn’t actually work. In fact, you can somehow read the files on that drive to supposedly confirm that they are there. But they are not. The next time you unmount / remount, or reboot, the files are gone. No error message, no indication of any kind that the procedure failed. I’ve also seen this problem with regular AFP network drives, where a file is written to a disconnected share and there’s no indication of a failure.

I can understand hiding weird messages from users, but sometimes an error message would make my life as an administrator a lot easier. We once lost 2 days of work to the “haha you thought you were writing to the drive” error, so this isn’t just an incidental problem.

Share

Summer news trend

A lot of people have noticed that during the summer the news media seems to pluck an issue from the air and decides to run with it all summer long. Previously we’ve seen the Summer of the Sharks, and the Summer of the Missing White Girls, and then the Summer of the Sharks again. In each case the actual incidence of these events hadn’t increased, but the coverage had.

What’s going to be the issue for ’06? What could possibly fill the airwaves of 24-hour news networks and yet still feel like news?

You can see why one might get the impression that Alberto is a big storm. Mentioned in the same headline as Katrina! “The Worst!” A hurricane wiped out a city a little while ago, so maybe this one could do the same!

Oh wait, no:

Alberto unlikely to become hurricane

I can’t remember ever hearing about storm “A” before. By the time I find out about a named storm, they’re usually up to D or E. This is because, of course, that most storms don’t become hurricanes and peter out before they’re worth discussing. If they’re already comparing tropical storms with Katrina, you can bet you’ll hear about B, and C, and D… all the way up to alpha and beta. I’m sure by October we’ll know more about plywood than we ever thought we could.

Share

annoying words

“vlog” is the most annoying word since “blog.” When “weblog” was shortened, it wasn’t called “wlog.” So shouldn’t “video blog” be shortened to “olog?” Or maybe “deolog?” Is any of these any less ridiculous than “vlog?”

Share

Jerry Orbach RIP

NEW YORK (Reuters) – Actor Jerry Orbach, longtime star of the “Law & Order” television series, died from prostate cancer on Wednesday, his manager told a local New York City radio station. He was 69.

Share