If STDERR fails to close, what are you planning to do about it?

Checking [whether] standard error [closed in a Perl script], though, is a bit more problematic. After all, if STDERR fails to close, what are you planning to do about it? — The Perl Cookbook, 2nd Edition

They go on to suggest a couple of things, but it’s still a funny comment. By way of analogy, compare it to submitting a customer service request to a company saying that the customer service request system is not delivering any customer service requests.

On the very next page, it says “As of Perl v5.8 there is a way to mix [buffered and unbuffered I/O functions]: I/O layers. You can’t turn on buffering for the unbuffered functions, but you can turn off buffering for the unbuffered ones.” Great, really useful! I can turn off buffering on an unbuffered function and end up with: an unbuffered function! The presence of typos like this is really obnoxious, because when I find a confusing passage I have to wonder whether they are making a mistake or I’m just not understanding.

Read More

Viking Insurance, redux

A follow-up to my car post of a few weeks ago. In summary, the Viking Insurance rep made an offer for settlement, and I suggested they double it. They’ve called back and have said, essentially, “O.K., we’ll double it.”

Oh, and Audi performed the repair job on my bumper, which ended up running to $2000, for free. I’ll be posting an open letter to Audi in the next week thanking them.

Read More

So Many Bunnies at the Scotch Whisky Distillery

I’m thinking of writing a book called So Many Bunnies at the Scotch Whisky Distillery.  I’ve got the beginning worked out:

1 was named Ashton.  He slept in the mash tun.

2 was named Beryl.  She slept in a barrel.

3 was named Carol.  She slept in a barrel.

4 was named Darryl.  He slept in a barrel.

5 was named Errol.  He slept in a barrel.

There are a lot of barrels, you see.

OK, that’s a point-oh-one percenter.  The intersection of the set of scotch aficionados and the set of parents of infants.

We could go on. 16 could be Pete, who slept in the peat. 19 could be Sherry, whose butt slept in the sherry butt. And we could rewrite 4 to be “Daniel, who slept in the hogshead.”

OK, that’s a 1 x 10-7 percenter.  I’ll stop now.

Read More

Robbing a bank competently

A gem:

Perhaps an analogy would be appropriate:

There is a competent and an incompetent way to rob a bank. You can either plan ahead, consider the worst-case scenario, and get in and out without too much trouble. Or you can dream about your successes, not consider difficult possibilities, and have the result be a violent, bloody mess.

Robbing a bank is still wrong, but pointing out that the robbers royally screwed up isn’t an endorsement of the rightness or wrongness of the act itself.

Read More

John Kerry complaints

John Kerry: “I’m running for President to make the country we love safer, stronger, and more secure. I’m asking every American to be a Citizen Soldier…”

Oh, shut up.  Like what we need is another president who sees everything as a military conflict.

And try this: “John Kerry has the vision to create a new Manhattan Project to make America independent of Middle East oil in 10 years by creating alternative fuels like ethanol and making cars more efficient.”

Great, use the terminology of nuclear weaponry to discuss green ititiatives.

“John Ashcroft has launched an all-out assault on individual rights, allowing for a wholesale invasion of attorney-client conversations, e-mails and telephone calls. Immediately after the election, John Kerry will name a new Attorney General whose name is not John Ashcroft.  We will also fight to protect women’s rights, civil rights and workers rights and enforce anti-trust laws.”

Yeah, you know, that other stuff when we get around to it.  The important thing is just to have someone not named John Ashcroft.

“John Kerry supports expanding our nation’s hate crime law. He supports efforts to provide equal justice for all victims of hate violence, regardless of their race, religion, sexual orientation, national origin, gender or disability.”

A step-by-step analysis of the actual points, rather than the sloppy writing, on which I disagree with Kerry will have to wait until I have more time, but the author structures this paragraph as if B follows from A, which it most certainly does not. If anything they are incompatible, as “equal justice” is completely at odds with “special sentences for certain crimes”.

Read More