Categories
Uncategorized

Take California

Today’s Superosity has the best argument for picking Gary over Arnie for governor.

Categories
Uncategorized

T-shirt of the day

While biking westbound on Queen Street West to work this morning, I saw a guy with a big beer belly wearing a size XXL (what my buddy George calls “Fatboy Snug”) T-shirt that had the following on it in large yellow letters:

THE LIVER IS EVIL AND MUST BE DESTROYED.

Categories
Geek

"Programming Pearls" online

Joe Mahoney, on his blog Cheerschopper, points to Jon Bentley’s site for his classic book on good programming practices, Programming Pearls. Distilled from his columns from the magazine Communications of the ACM in the 1980s, the advice Bentley gives is still good today. I’m glad to see that he’s included samples from the book to peruse.

Here’s a good one on debugging:

The expert debugger never forgets that there has to be a logical explanation, no matter how mysterious the system’s behavior may seem when first observed.

That attitude is illustrated in an anecdote from IBM’s Yorktown Heights Research Center. A programmer had recently installed a new workstation. All was fine when he was sitting down, but he couldn’t log in to the system when he was standing up. That behavior was one hundred percent repeatable: he could always log in when sitting and never when standing.

Most of us just sit back and marvel at such a story. How could that workstation know whether the poor guy was sitting or standing? Good debuggers, though, know that there has to be a reason. Electrical theories are the easiest to hypothesize. Was there a loose wire under the carpet, or problems with static electricity? But electrical problems are rarely one-hundred-percent consistent. An alert colleague finally asked the right question: how did the programmer log in when he was sitting and when he was standing? Hold your hands out and try it yourself.

The problem was in the keyboard: the tops of two keys were switched. When the programmer was seated he was a touch typist and the problem went unnoticed, but when he stood he was led astray by hunting and pecking. With this hint and a convenient screwdriver, the expert debugger swapped the two wandering keytops and all was well.

A banking system built in Chicago had worked correctly for many months, but unexpectedly quit the first time it was used on international data. Programmers spent days scouring the code, but they couldn’t find any stray command that would quit the program. When they observed the behavior more closely, they found that the program quit as they entered data for the country of Ecuador. Closer inspection showed that when the user typed the name of the capital city (Quito), the program interpreted that as a request to quit the run!

Bob Martin once watched a system “work once twice”. It handled the first transaction correctly, then exhibited a minor flaw in all later transactions. When the system was rebooted, it once again correctly processed the first transaction, and failed on all subsequent transactions. When Martin characterized the behavior as having “worked once twice”, the developers immediately knew to look for a variable that was initialized correctly when the program was loaded, but was not reset properly after the first transaction.

In all cases the right questions guided wise programmers to nasty bugs in short order: “What do you do differently sitting and standing? May I watch you logging in each way?” “Precisely what did you type before the program quit?” “Did the program ever work correctly before it started failing? How many times?”

Categories
Uncategorized

Deenster’s sister Lisa on what happened in Jerusalem

In her blog entry for today, my friend Deenster reprints an email from her sister Lisa, who’s living in Israel:

Abu Mazen condemned the bombing in classical Arabic, and sent his sympathy to the bereaved families. The Islamic Jihad claimed reponsibility, and a Hamas spokesperson told an Israeli TV reporter that as far as he was concerned the ceasefire -to which the Islamic Jihad was not a partner – was still on.

Then it turned out that the bomber, a 29 year-old father of two, was a Hamas member.

And now his wife is a widow, his children orphans. And the Israeli army will once again seal off the West Bank, meaning that other fathers with children to feed will be unable to get to work, and lots of people will suffer.

Who plans these things? And why? What in the world do they want to accomplish?

It’s summer and the beaches are packed, I go to parties every weekend, the outdoor cafes are always full (am I the only person in TA who works full-time?), the streets are full of beautiful, tanned people wearing very little clothing, the city is buzzing with sexual energy and life seems pretty good. So you really, really want the ceasefire to be real, and the Road Map to be meaningful, because peace is good and war is bad.

Right?

Lisa also notes the difference between news outlets’ coverage: Israeli news didn’t even cover the bombing in Baghdad, CNN led with the Jerusalem bombing and BBC World led with the Iraq bombing:

The BBC’s coverage of the Jerusalem bombing was typically outrageous: they spent about 2 minutes reporting on the actual event, then moved on to extensive talking head analysis of how this would affect the ceasefire and Road Map – with much tongue-clucking over how much the Palestinians were sure to suffer from Israel’s predicted revenge for the bombing.

Categories
Geek

"Achewood" imitates life

In the last Achewood comic strip, Roast Beef not only looks like me, he’s doing the sort of reading I’m doing.

But really, Beef, white briefs? Not boxers with pictures of polar bears on ’em?

Categories
Uncategorized

Kickass Karaoke tonight!

At the Bovine Sex Club. Good fun, cheap booze, great music, friendly crowd.

Categories
Uncategorized

Little Dee

Chris Baldwin, the author and illustrator of the terribly poignant, often deep and extremely adult Bruno, has created a new comic strip called Little Dee, which replaces Bruno until September 1st. Here’s the start of the Little Dee run.

The only similarity between the two strips is that Dee looks like a little version of Bruno. Aside from that, it’s completely different: Little Dee is about a girl who gets lost in the woods and ends up being cared for by a friendly bear, a vulture and a dog who’s broken free from the domesticated life. Where Bruno is all angst and Weltschmerz (and hey, ain’t nuthin’ wrong with that), Little Dee is light and cute.

And hey, I’m a sucker for friendly cartoon bears.