Monday, October 02, 2006

The Comp Sci approach to Government Analysis

Posted by Johnny

Here's an article from wired:

I've been puzzling over the Republican bill to deny accused terrorists fair trials, and the seemingly-irrational language champions of the legislation have been using to describe its purpose.

The goal, "is to render justice to the terrorists, even though they will not render justice to us." -- Senator Lindsey Graham.

"We don't want (terror suspects) to have everyday rights of American civilians right here. These are war criminals." -- Senate Majority Leader Bill Frist.

It occurs to me now that the whole 94-page bill really amounts to a common, one-character programming error.

if (person = terrorist)
{
punish_severely();
}
else
{
exit(-1);
}

Can you spot the error? (Solution).

This is why coders and other left-brained types seldom vote Republican.

I'm confident the Supreme Court will catch this in debugging. Just in case, I'm sending them a copy of Kernighan and Ritchie.


For my non-geek readers, the error is in the first line of code. The = sign should be a == sign. This error causes the 'person' variable to be set to 'terrorist' every time instead of checking to see if the person is a terrorist. The result is that the exit(-1) code never gets executed and punish_severely() is always executed.

If this bill is passed, I can picture the future's history books referring to the US as a Republican dictatorship.

5 comments:

Kevin said...

Johnny johnny...lay off the code!

While terrorists may be bad and all...our judicial system is a fundamental part of our 'free society'. You know, the one people are trying to protect by sticking suspected terrorists behind bars without a fair trial? That one?

Johnny said...

I'd lay off the code if I could, but I'll be doing that for the next 30 years (20 if I strike it rich).

Besides, you know how I am about code...

Tom: That's some sexy code
Johnny: I'd do it

Kevin said...

I'd parse that!

Kim said...

Seriously Johnny...

You're my hero.

Johnny said...

Somehow, I don't believe you.