Hi Chris

December 31, 2008 under metablogging

Chris Blattman has an interesting blog.

comments: 0 »

Torture – it’s bad.

December 30, 2008 under Uncategorized

Again, I swipe from Bruce Schneier, the experience of a US interrogator who avoided the use of torture in Iraq. To summarize, he believes the use of torture is responsible for more American deaths than lives saved; it elicits a significant backlash and is a powerful recruiting tool for opponents.

Gee, someone should encode this knowledge in a handy well accepted truth. Maybe something like:

“You catch more flies with honey than with vinegar.”

or

“A harsh word stirreth up anger, but a gentle answer turneth away wrath.”

It’s a little embarrassing, actually, I can just picture the response:

“Oh! You meant  turneth away. As in, away from me, so less wrath overall! Huh, why didn’t I think of that?”

I think I’ll have to generalize this to a rule of thumb. If what you’re doing involves torture, step back and reconsider. Yes, this includes finding out what to get people for Christmas.

comments: 0 » tags:

The Unhappy Moron – When Being Stupid is Stupid.

December 30, 2008 under curios

Yes, leaving your address at the scene of a bank robbery is stupid.

But to risk 20 years in jail for a payoff of $400? That’s really something special.

comments: 0 » tags: ,

Post Christmas Poetry

December 28, 2008 under curios, personalinthepubliceye, poetry

The poet stinks.
He rhymes with cheeses
Old and far too ripe
To bear the gentle fragrance
That wafts, so tantalizing
Beneath his eager nose.

The taste is there,
His soul devours
Yet puts to rank words
The scent, which charmed and bound him
Heart and soul. His putrid pen
Scribes odor, not aroma.
Curdled ink betrays him.

comments: 0 » tags: ,

Beautiful Stories On Christmas

December 24, 2008 under metablogging, technical

(Warning – this post is about programming culture. [I have annotated it with suitable clarifications for the non-technical reader])

I love the internet. I love it because I’m able to eavesdrop on the best programmers and software engineers in the world.

It gives me stories like this one. [Please don't follow this link unless you like reading programming mailing lists]

Here we have an eager and well intentioned programmer [He's a young gun, a newbie] who is lobbying for the use of a new programming language on the project. Unfortunately, he’s fallen into a den of grizzled systems programmers [dinosaurs] which includes at least one world class engineer. They’re using their language of choice for a reason and show relatively little mercy in dispatching his push for change.

The thread follows up with a language designer taking the opportunity to plug his own systems language and argue its merits. He’s advertising (polite advocacy, but still advertising) and some interesting [really boring] discussion follows.

There’s a lot of good stuff in that thread, but for me the most beautiful gem is found in this post:
Anecdotal evidence _is_ hard facts. That’s what experience is all about.

So beautiful. When someone with experience tells you, “Doing that will hurt.” it’s a hard fact of life.

On a side note there’s the interesting position taken by Linus Torvalds – he (speaking for the project) is interested in attracting programmers who think in a low-level fashion. I would say:

  1. Choice of programming language really doesn’t matter.
  2. How people think is what matters.
  3. Ergo, choice of programming language really matters.

[Wow, three really boring technical posts in a row on The Happy Moron. It must be Christmas ;-) ]

comments: 0 » tags:

Mandatory computer education – Botnets

December 22, 2008 under technical

I consider little knowledge in computing to be mandatory. Usually the price of ignorance is bourne by the one who is uniformed.

Botnets are a different kettle of fish. In this case, the price of ignorance is bourne by the public. I think knowing about Botnets (their existance, their fundamental nature, their consequences) is a matter of public duty. Paying your taxes, staying home when you’re contagious, scooping up after your dog… all are fine analogies. Sure, they’re all inconvenient, but most public duty is.

Computer geeks are notorious for their fascination with nifty yet useless things.

“Why are you mucking with that? It doesn’t do anything.”

It’s nifty.”

Computer viruses are possibly the greatest example of useless things which are incredibly nifty. The thrill of writing a computer virus is, “Look what I can do! It’s not very helpful, but it sure is neato!”

Whenever you receive a virus that flashes a red and black message, “Haxxor432 haz pwn3d j00.” you know right away you’ve been hit by a small child who has found something nifty but doesn’t know what to do with it. All in all, these viruses aren’t so dangerous, and they only inconvenience those who get hit by them.

What if there was a virus that was useful? What if it was purely pragmatic, unencumbered by the programmer’s ego? What if it was written by a cynical, sober, and smart adult and was designed to maximize criminal profit? Botnets are computer viruses, all grown up.

We’re now outside the annoying world of unwanted browser pop-ups, unrequested tool-bars, and curiously sluggish computer performance. Real criminals aren’t interested in slowing your computer down to a crawl; they want it nice and fast so they can use it for evil stuff.

So what are Botnets, exactly? Googling for “botnet” serves up a jargon jungle, littered with a few sensationalist news articles. Here’s the best breakdown of botnets I could find.

The basic premise is simple:

  1. Infect a machine (via standard virus/trojan horse/whatever method)
  2. Have that machine converse with a controlling machine that tells it what to do.
  3. Repeat until you have a network of many thousand machines under your control.
  4. If you can’t think of something really evil to do with several thousand computers at your disposal, you’re not trying.

Step four is a little misleading. You don’t have to have any evil ideas yourself. You can rent out your botnet to someone who does have evil ideas. Often it’s to a spammer, but take your pick. Do  you want to steal credit card numbers? Passwords? Personal data? How about blackmailing businesses by threatening to take down their websites with a denial of service attack?

USA Today has a decent article on botnets; Bruce Schneier has a wonderful breakdown of a particular botnet.

It used to be a virus I caught inconvenienced me. Now a virus I catch may invisible to me, but results in me spamming all my friends (or worse). If I’m connected to the internet and I don’t take care of my own computer, I’m failing in my public duty.

Beyond the basic setting up of a firewall and anti-virus, I don’t know what the answer is. I don’t think anyone does; but it pays to know something about the pond we swim in.

comments: 0 » tags: ,

Don’t do this

December 20, 2008 under technical


public Configuration loadConfiguration(String fileName){
if(configuration == null){
configuration = parseFile(fileName);
}
return configuration;
}

It’s really not a very good thing to do.

When I read this code, I had an Aha! moment. There were portions of “Aha! So this is what has made my life misery for the past several hours.” but mostly it was “Aha! There’s a general principle at play which this violated.”

For the non-programmers reading, here is the problem with this code. Other code which uses this function will look like this:

//blah, blah, blah
...
myConfig = loadConfiguration(myConfigFile);
...

To a programmer reading this, the meaning of the code seems obvious. What this code does is initialize some configuration from the specified file. Except… It doesn’t.

What the code really does, is initialize some configuration from the specified file… the first time it is called. The next time, and the next time, and the next time, it returns the same result, which it has remembered from the first run through.

Remembering results isn’t a bad thing, per se. It’s called caching and it’s a fundamental programming technique. It’s not really the evil thing that the code does. It’s not hard to rewrite this code, so that while still caching, it’s not evil.


public Configuration loadConfiguration(String fileName){
//if we're being asked for a different file than the last time, reload
if(configuration == null or fileName != oldFileName){
configuration = parseFile(fileName);
}
oldFileName = fileName;
return configuration;
}

The evil thing is that most of the time, the original code ignores the name of the file it was given. From the position of someone using this code, asking for configuration from myFile and receiving configuration from yourFile instead is not a good thing.
If the code didn’t take in a fileName, it would probably be okay. The function

public Configuration loadConfiguration();

is pretty clear; it loads the current configuration. It doesn’t allow you to say, “Load this file” but at least it doesn’t lie to you. Ignoring parameters is lying and it’s not okay.

(Ok, this probably isn’t making for glamorous reading – but I need to document this so I don’t forget it.)

comments: 2 »

Piracy, Revisited

December 19, 2008 under curios

How do you know if you’ve repelled boarders successfully (and with style)?

They beg you for shoes and petrol so that they can retreat.

If the pirate you’ve been fighting against says, “I can’t fight anymore, please give me some shoes so I can leave your glass littered deck,” he’s probably a decent fellow. Without any shoes. Yeah, he’s a pirate, but he’s not an evil man. Evil men don’t trust anyone to give them shoes and don’t think to ask. In truth, it’s an odd plea for mercy.

This story makes my throat catch a little bit. That shoes would be asked for, and given, shows this to be a different kind of conflict than most that make the news. It’s an honest fight, and there’s no malice in the attack – it’s a practical matter. The pirate doesn’t want to fight, and when he accepts that he can’t take the ship, he’s got nothing personal against the captain or crew.

There’s something a little touching about a barefoot man on a glass-strewn deck, lowering his RPG to ask for some shoes so he can leave.

I can respect that kind of a conflict.

On an unrelated note, I bet when the crew were throwing petrol bombs on their own ship, they probably weren’t thinking about the insurance.

comments: 0 »

How is it okay?

December 18, 2008 under thehumancondition, theology

I’m not sure that many Canadians appreciate this story.

Particularly,

The law has been challenged four times, but the country’s top judges have always ruled that adultery is damaging to social order, and the offence should therefore remain a crime. 

I’m going to step out on a limb and take the side of South Korea’s top judges. Adultery *is* damaging to social order.

I’ve never been able to buy into the position that the government “has no business in the bedrooms of the nation.” The government has a great deal of business in the bedrooms of the nation. If I murder someone in my bedroom or sell illegal drugs in my bedroom, then the government has a every right to bust my sorry self, in my bedroom.

Yes, but I’m taking that quote out of context – it refers to sexual activity, and the quote actually means that sex is altogether too exciting and intimate for an organization as bureaucratic and faceless as the government to be involved.

Except… That’s not exactly true. If I commit an act of prostitution or statutory rape in my bedroom, the government has every right to bust my sorry self, in my bedroom. Sexual activity is not outside the government’s sphere of influence.

Nor should it be. When I think about adultery, I try and compare it with a crime that no-one argues against, like murder, or theft. Whenever I try and calculate the difference between adultery and murder, it always comes out less than I expect. Does adultery carry more or less moral condemnation than murder or theft? No. Does adultery do less real harm than murder or theft? No.

Why do we outlaw murder? We outlaw it because it is bad. In other words, it’s morally wrong. It’s true that you can’t write a law which will make men good.  But we legislate against those things that are bad. Morality tells us what it means for something to be good or bad. In that sense, the only thing you *can* legislate is [comes from] morality.

Whenever people say that you can’t legislate morality (on a practical level), they really mean that you can’t legislate unpopular morality. Popular morality (murder is wrong; terrorism is wrong) is simple to legislate.  Only the controversial stuff (abortion, same-sex unions, smoking in bars) is, well, controversial. This doesn’t even depend on the religious or secular nature of the morality, or on its degree of extremism. Where there is popular support for killing converts to Christianity, for example, this gets reflected in the law without any real difficulty.

If you ignore the moral aspect of law and evaluate adultery on a practical basis, it is far more damaging than many things which are legislated.

Adultery does harm of an entirely different sort, perhaps. The more I reflect on people, and myself, the more I find myself believing that there’s more to a person than their physical body. The words of a young footballer’s coach haunt me, they tell the simple truth that a person is more,or sometimes less, than the sum of their abilities…

“I’ve said it before and I’ll say it again, what he’s got in terms of his ability he should be playing in the Premier League.

“But obviously there’s something within him, the person, that stops him from doing it.”

You can’t tell me that emotional wounds don’t count. You can’t tell me that verbal and emotional abuse aren’t of interest to society. I only have to tell my own story, of the times I’ve been too afraid, too angry, too disrupted, too anxious to do the daily tasks of life. It can affect my work, it can affect my duty as a citizen. It can affect my desire to abide within the law.

An emotional wound the size caused by adultery? The betrayal? The anger? The shame and the insult? That’s a serious matter.

Don’t try and tell me that the government has no right to legislate emotional matters, either. Human rights? Hate crime? Our courts deal with fuzzy, intangible stuff, such as judging intent, all the time.

There’s only one answer that I can come up with as to why my Canadian culture reacts against the thought that adultery should be criminal, which is that, “Sometimes it’s okay.” The argument is that there are times when adultery is not morally wrong, when it is not damaging (i.e. the other person did it first), when it is justified and not deserving of punishment. Or simply, that adultery is just too much fun to allow the government to break it up.

This argument says that the government will never be able to discern with precision which of these cases are damaging and which are not. It says that because adultery can sometimes be justified, you shouldn’t be judging it.

To this, I say, “Hooey.” Maybe the guy I murdered was a bad dude. Maybe he would have killed someone else later on in his life and so I’m justified. Maybe it was okay to steal, because the store wouldn’t miss it. Maybe, maybe, maybe…. Courts deal with gray areas all the time. There’s flexibility in sentencing which adjusts for circumstance. Certainly civil courts (divorces, anyone) handle this kind of fuzziness. It’s not always neat and tidy, but this is sin, people, what do you expect?

I’m not trying to ignore the logistical difficulties involved. I’m just trying to point out that there are many areas of law where things are difficult to enforce, and yet we try anyway, because it matters.

Every time I try and reason out why we in Canada fail to punish adultery on a judicial level, as opposed to S. Korea, it comes out to the very same answer:

We think it’s okay.

This troubles me.

comments: 0 » tags: ,

No kidding

December 17, 2008 under Uncategorized

The State Dept recommends not renewing Blackwater’s contract.

When was the last time someone hired mercenaries and things went well?

I think I’ll have to generalize this into a rule of life. If whatever you’re doing requires mercenaries, stop and think about it.

Yes, it applies to Christmas shopping, too.

comments: 0 » tags: