Wednesday, August 30, 2006

Scheduling tips

My team was discussing scheduling this morning, specifically how we need to adjust our schedule to account for uncertainties upstream. I was reminded of a bit of scheduling wisdom given to me by a project manager at another facility some years ago. He would get the best estimates he could, multiply that by π, and present that as the final schedule; as he put it, an irrational schedule called for an irrational number.

Labels:

Color images from black and white film

There is a fascinating online photographic exhibit of color images taken in pre-WWI Russia called The Empire That Was Russia. The photographer, Sergei Mikhailovich Prokudin-Gorskii, would shoot a scene three times, each time through a different colored filter (red, green, and blue). After the plates were developed, he'd project each one through the same colored filter, combining the projected images into a single, full-color image. It's a wonderfully geeky trick, and the resulting images are gorgeous.

I decided to try it out for myself. I loaded up the Nikon FE with a roll of Tri-X (ISO 400 black and white film) and shot three frames, each through a red, green, and blue filter1. Here are the original frames:

Original B&W frames

From left to right, it's the blue filter, green filter, and red filter.

The next step was to combine them. I fired up the Gimp (open source equivalent to Photoshop) and opened each frame as a separate layer in a new image in additive mode. I nudged each layer so that they lined up exactly, then colorized each layer by opening the Color Balance tool and adjusting the color for the midtones (red for the red layer, green for the green layer, etc.). I left the shadows and highlights alone. Since the layers were additive, and each layer was a normal exposure, the result looked heavily overexposed (by 2 stops, go figure). I had to radically adjust the curves for each layer, flattening them out as much as possible.

Once I was done, I had a passable result:

Combined, colorized frames

Depending on your monitor settings, the result may look a little red to you, but it's a proof of concept. I doubt I'm going to do this very often (after all, color film exists for a reason), but it was a fun experiment. What I need to do next is colorize each layer to a "wrong" color (red as green, green as blue, blue as red) and see what kind of results I get.

1. Actually, a daylight correction filter for shooting daylight balanced film under tungsten light, but good enough for this purpose.

Labels:

Sunday, August 27, 2006

On the joys of pets

Meet Pernicious:

Pernicious

He is 17 years old, diabetic, has a hyperactive thyroid, is missing a little over half of his teeth, and is an evil little cuss.

He's also in the cat equivalent of intensive care right now.

Friday night, he gave out this panicky sounding meow and jumped up on the bed with us; after that, he was very disoriented, unsteady, and unresponsive. Our first thought was that his blood sugar had crashed (it's happened before), so we mixed a solution of Karo sryup and water, and we thought that it might be helping, but he didn't respond like he had in the past. The next morning, however, he wasn't any better, and we began to suspect he'd had a stroke. In addition to the disorientation and unsteadiness, it turned out he was blind as well. His pupils were fixed and dilated, and he didn't respond to us waving our hands in front of his eyes. Strokes in cats are rare, but not unheard of, and he's had enough problems that it was a likely candidate. We took him to the clinic (not our normal one, as that one is closed on the last Saturday of each month), prepared for the worst. It has been about 20 years since I've had to put a cat down, and it's one of the worst feelings I've ever experienced.

After running some tests, however, it turned out that his blood sugar was insanely high; they had to calculate it manually because it exceeded the scale on the machine. The tentative diagnosis is non-ketotic hyperosmolar diabetes; basically, the concentration of the sugar in his cells is so high that it's interfering with normal brain function, as well as causing a host of other problems, including dehydration so bad that his blood is almost too viscous for his heart to handle. The good news is that this is treatable; basically the plan is to slowly build up fluids via IV over the next few days. The prognosis is still very poor, but there's a chance that he can return to his previous quality of life, which wasn't too bad all things considered.

What's scary is that he had a checkup about 3 weeks ago, and his blood sugar was a little on the high side, but not enough to warrant concern. Something has changed radically in the last few weeks; either his insulin has gone off, or his dosage has become woefully inadequate, or something.

This is going to wind up being expensive. I know some people out there wonder about those of us who spend more than a couple of hundred dollars on a sick animal, but we don't have any children; our cats are our family. We've already prepared ourselves for the worst, so we're not going to any more extreme measures than what's being done now, and it's more than likely that once this problem is resolved, something else just as dire will come up and it will all be for naught. But this evil little bastard is special to us, and if he can return to his previous state, it will be worth it to us.

UPDATE



A weekend of IV fluids has worked wonders. We transferred him from the emergency clinic to the regular vet clinic this morning (Monday), and he's in far, far better shape than he was Saturday. He's still pretty lethargic, but his sight appears to be back, and he's holding himself a lot steadier. He's looking more and more like his old self. We're trying not to be too optimistic; no doubt this episode has put his liver and kidneys through the wringer, and they aren't that healthy to begin with.

But, it looks like we may get the old Snick back. He's even started growling at the staff, although one gets the sense it's more out of protocol than actual pique.

Labels:

Friday, August 18, 2006

Most Common Programmer Sayings


  1. But I didn't change anything!

  2. But what I changed shouldn't have made a difference!

  3. It works on my machine!

  4. Of course I checked it in!

  5. Yes, I made sure it built before checking it in!

  6. Yes, I have the latest version of the source tree!

  7. I thought you were handling that defect...

  8. Where's the spec?

  9. The problem's not in my code, it's in the API...

  10. Who the hell wrote this?!

  11. Where did that come from?

  12. Where did it go?

  13. Dammit, it was working yesterday, why isn't it working today?

  14. One semicolon can ruin your whole day...

Labels:

The junkie needs a new fix

Hell's Kitchen is closed. So You Think You Can Dance has put away the disco ball. Treasure Hunters (which is what The Amazing Race should have been) will award booty next week.

What's left? Big Brother? Yeah, right. My wife and I watched our first ever episode last night (mainly due to the hilarious recaps from Television Without Pity's divine Miss Alli) because we had to see Evil Dr. Will for ourselves. And now that we have, well, I think we've seen enough to keep us satisfied for the remainder of the decade at least.

In case it isn't clear by now, I am addicted to "reality" programming. It's not something I like to admit about myself, but I rationalize it by saying I like the good stuff, the "reality" shows where you win by being smarter or faster or more talented than your peers. Talent competitions like American Idol or So You Think You Can Dance, or puzzle-based shows like Treasure Hunters or the first couple of seasons of The Amazing Race (before it got all Fear Factor-y). Treasure Hunters has proven to be a highly addictive show, even despite the Wild Hanlons and the Fogels. Anyway, all the good shows have wrapped up, and I'm not sure where to get my next fix. I can tell it isn't going to be Big Brother, which manages to be irritating and boring simultaneously.

Not that there isn't good stuff to watch. Life On Mars is an excellent show, a cross between Quantum Leap and The Sweeney. Sam Tyler is in a coma in 2006, and his conscious mind is solving crimes back in 1973.

I have to wait until effing OCTOBER before I get my Battlestar Galactica fix, though, and that's proving to be rough.

Labels:

Thursday, August 17, 2006

At least the judiciary still has a spine

Since Congress has long since rolled over for this administration like a trained seal, we must rely on the Judiciary to check unbridled Presidential ambition. To wit, the warrantless NSA spying program has been ruled unconstitutional by a federal judge.

No doubt the White House will take this to SCOTUS, which after all has the final say on whether something is unconstitutional, but I'm fairly confident that the ruling will stand.

Labels:

Rules for being happy in software

1. Work for someone smarter than you.

1a. There's always someone smarter than you.

2. Never ask the questions "How hard can it be," or "What's the worst that could happen," unless you really want to know the answer.

3. Don't become overly attached to your job.

3a. It's better to be laid off early than late; you have a better chance of getting a severance, and there may still be jobs out there.

4. QA is not the enemy. Neither is the customer. Management occasionally is, but not that often, and to make up for they sometimes provide free pizza.

5. All programming languages suck. All platforms suck. All development environments suck. All text editors suck. All compilers suck. All database engines suck.

6. At some point in your career, you will come up with a brilliant idea that has nothing but disastrous consequences and will wind up as an entry in The Daily WTF. Accept that this will happen.

6a. You're never as brilliant as you think you are.

Labels:

Anything done for the first time unleashes a demon

And so here we are, the inagural post of yet another stupid blog. I have no idea where this will go; it may go nowhere, quickly. However, there are times when I must vent my frustration at my work, my country, my culture, and my self. Besides, everyone and his dog is getting a blog these days, so why not me?

Hopefully I'll be at least mildly entertaining. I'll certainly try my best.

By the way, this article's title is taken from an issue of Dave Sim's Cerebus; it was that title that compelled me to pick up the book for the first time, and I immediately became hooked. However, Jaka's Story was the high point for me, and when Dave started channelling dead writers I started to lose interest. I only got a little way through Going Home before giving up completely.

Anyway, I thought it was a good title. Maybe not. We'll see.