Bjarne Stroustrup Interview

MIT Technology Review publishes an interview with Bjarne Stroustrup, the original designer of C++. He reflects generally on the quality of software and the design philosophy he used with C++.


Put an end to bottom-trawling

Get this: Not only do ocean-floor-scraping fishermen ruin whole marine ecosystems; governments pay them subsidies to do it, because it otherwise would not be economically viable!

This is criminal conduct on behalf of the fishermen, the fishing companies and the governments involved. There is no excuse for it. People who make their living based on such disregard for what they are destroying, do not deserve to make that living.


General solutions (when programming)

Here are two of denis's rules of programming (learned the hard way).

Rule #1: It is good to avoid working on complex solutions for problems that might not exist.

Rule #2: It is good to postpone implementing solutions until you really understand the problems.

It follows from these rules that:
  1. One should avoid creating reusable code (solution) which will not necessarily find much use (problem).
  2. One should generally avoid writing reusable code (solution) until such time as one understands the problem inside out (has solved the problem the tedious way many times).
If you do not adhere to these rules, you will create more solutions than there are problems to solve, and the solutions you create will not be entirely appropriate to the problems that actually exist. Thus, the solutions themselves become part of the problem.

General-purpose solutions are hard to do right, and one shouldn't generally start implementing such solutions just because there might be a problem. You only start implementing them once you know the problem is there, and you've already had to solve it in a specific case several times, so that you have a good idea of what writing the general-purpose solution will entail.


Shit, it's raining!

My favorite, poignant quote for the week:
"They call this war 'a cloud over the land'. But they make the weather, and then they stand in the rain and say - 'Shit, it's raining!'"
As memorably interpreted by Renee Zellweger as Ruby Thewes, Cold Mountain.


The Final Solution (to Spam)

I used to receive 400-500 spam emails per day. At first, I just deleted the spam manually. When this overwhelmed me, I looked at various solutions.

I tried an anti-spam challenge-response program. This is software you put between your email client and your mail server. It constantly checks your mail server and sends challenges to senders that are not in its white-list. Major disadvantages: legitimate senders often won't bother to prove they are human; many legitimate senders are in fact automated; and finally, sending the challenge emails themselves gets you listed as a spammer, so outgoing email that you send gets lost.

So I quit the anti-spam challenge-response system, and tried an email program with a Bayesian filter. This didn't work quite so well either. Most of the spam got sorted correctly, but an unacceptable amount of legitimate email got classified as spam. I had to download all of the spam emails, and then I still had to browse through all of them sporadically to fish out any false positives. This didn't really reduce the burden.

So eventually I shelled out for an email server of my own, which I configured like this:
  • Instead of having a user@domain.com address format, my address format is keyword@userdomain.com.
  • Whenever I need to give someone an email address, I first create a new keyword alias on the mail server, giving out a customized email address.
  • As soon as spam starts arriving on any of the aliases, I remove them. Subsequent messages to the removed aliases are denied by the mail server on delivery.
  • All messages to active aliases are routed to a single and private account that never gets disclosed.
  • If someone wants to know the address where they can email me, they can go to my private web page where a working alias is always made public. I take measures to prevent spammers from harvesting that address from my website, but when they do, I can always replace it with another one on demand.
Using this approach, I have been able to keep the amount of spam in my mailbox at virtually zero, reduced from hundreds per day that I had before. Best of all, my loss of legitimate emails is also at virtually zero.

I think everyone with a spam problem could solve it with a system like this. All anti-spam approaches that are based on filtering create an arms race and can have a very significant hidden cost when important emails get lost. The keyword-based system gets rid of spam with less maintenance, more durably and much more reliably.


What your taxes are spent on

This is why I think the income tax is a morally reprehensible act. It's all wasted on ridiculous projects like that. It's not the government collecting a modest tax to pay for commonly needed infrastructure. It's the government taking your money and stuffing it into the pockets of people who excel at collecting it. It's all wasted like that.

I have no idea why almost no one else is rebelling against that.


Elton John: Ban organized religion

Here's a guy I respect saying something I've been saying for ages: personal religion is fine, and everyone needs some kind of answers to unanswerable questions of existence. But why do these beliefs need to be coordinates by mullahs, L. Ron Hubbards, and popes? Why does there need to be a global para-state based in Vatican that owns something like a quarter of the world - just to coordinate what fictions people choose to believe in?

All of this is unnecessary, is manipulative and causes hurt. The world would be served well if organized religion was banned, and everyone just had to find their answers to unanswerable questions for themselves. Whether that means picking them up from the bible or the koran is up to you - but no one should be telling anyone that they are the 'only true source' of knowledge on these issues, because it's really just a method of deceit, manipulation and exploitation.

False gods? Just say no.


The fabled distinction between animals and humans

New Scientist reports that scientists want to create part-cow, part-human embryos for research aimed at treating diseases such as Parkinson's and Alzheimer's. However, there's a problem. These days, they have to ask permission from people who have no clue about anything. Here's what Calum MacKellar of the Scottish Council on Human Bioethics has to say about it:
"In this kind of procedure, you are mixing at a very intimate level animal eggs and human chromosomes and you may begin to undermine the whole distinction between animals and humans."
The idiots! There is no distinction between animals and humans. When will everyone finally come to terms with that eating meat means killing living beings, and that murder is something we all participate in on a daily basis? That doesn't necessarily mean that it's bad, but please, let us stop pretending.

There is no such thing as a single human race either. Everyone is genetically different. Some people are genetically closer to our ancestors than others. That's not bad. That doesn't mean that those people necessarily need to be treated as inferior. But let's stop pretending it isn't so.


The appeal of C

I've been learning Scheme lately, on and off, an evening here and there, when I take a bit of time off of my immediate development requirements. Scheme is a very elegant language, which I admire for its beautiful syntax. Here's an RSA decryption program in Scheme:
(write (number->string
((msg (string->number "0FB78CC9...283E9F69...9AA34BC1" 16))
(mod 4847438932...5371616465...9691290563))
(remainder (expt msg 17) mod))
Simple, eh? The variable 'msg' receives a big fat RSA ciphertext in hexadecimal, the variable 'mod' receives the modulus of the RSA public key, and the public exponent (17) is just keyed in. The code computes (msg**17 % mod) and prints the result as a hexadecimal string. It executes in a blink using the Petite Chez Scheme interpreter, which Cadence Research Systems kindly make available for free. (They make money on the compiler, which I hope one day I'll have a good reason to purchase. I'd like to contribute to continued development of neat stuff like this.)

So, a few minutes ago I was looking at the straightforward implementation of a simple round-robin system in Scheme, trying to understand how it might actually be executed efficiently, and then it dawns on me - the reason why I first started programming in C.

Programming in C is great because the language makes it easy for you to understand what the machine will execute.

Programming in C is rewarding because it's like this neat, little, clunky macro language on top of assembler, and you can easily visualize how each of your statements and expressions will be translated into machine code. You know exactly what each line of your code will do. It's never fuzzy. There's never anything behind the scenes, the compiler doesn't add any magical dust or go through any mystical motions to make things easier for you. The code executes exactly as you write it.

This is important, because understanding what the machine does is crucial in a performance-sensitive application, which all professionally written programs are. When you encounter a performance problem, the straightforward relationship between C and machine code makes it easier to analyze a program and find bottlenecks. It makes it easier to not write bottlenecks in the first place.

On the other hand, in a language that does things behind the scenes to make things easier for you, you not only have to understand your code, you also have to understand the things that are supposed to be hidden from you. Because those things get executed, too. If you don't have an understanding of how the language transforms the program into machine code, you cannot understand why it executes 1000 times slower than you need it to.

And that's the appeal of C, as well as C++. These are languages that aren't there. C++ is, effectively, a big but conceptually simple macro language on top of the machine code. It is a design goal of these languages to keep the background infrastructure minimal. Unless you count the run-time library, there's very little that happens behind the scenes that you don't know.

The non-threat of terrorism and its causes

We've seen misled idealistic young men do several horrible acts since the beginning of this century.

20 of them hijacked 4 airplanes and tore down the World Trade Center in New York, killing some 3,000 people overall. Several more blew up trains in Madrid a year later, and four British-bred young fanatics blew up some trains and a bus in London, a year after that. Terrorist explosions also killed hundreds of people in Bali and other places as well.

Meanwhile, in the United States alone, there have been some 17,000 murders every year, and some 95,000 rapes. Each year, there were some 45,000 deaths in motor vehicle accidents. In the UK, there are every year some 8,000 alcohol related deaths.

Given these figures, one might ask, why not start a war on cars? A war on roads? A war on booze? Oh, wait - our great-grandparents tried that.

We all know why. Because we think we can control these risks. We think we won't die on the highway, when in fact the issue is to a large extent out of our hands. And we think our democratic liberties are more important than the 95,000 people a year who are being raped - in the US alone. Surely, if we sacrificed enough of our liberties, we could prevent rapes from happening in the first place?

Compared to all the other threats we face every day, terrorists are a mosquito. Terrorists can be defeated with good intelligence and good strategy. There is no terrorism if there is no emotional cause that stirs it up, in the first place.

Most terrorism in the past few decades has been due to some perceived injustice. The only way to cure terrorism is to cure the perception of injustice. The IRA arose because the UK was oppressing Northern Ireland. The ETA arose because the Spanish wouldn't let the Basque country separate. And Muslim terrorism arose because the state of Israel was forced upon them in the midst of their most sacred country. And for the past few decades, Israel has been a driving force of Muslim terrorism everywhere.

Israel is as religiously fanatical as Muslims, and it is backed by religiously fanatical men. It is a conflict-driven state backed by religious fundamentalist in the US. Europe is also seen as backing Israel, although less so than the US. Both the US and Europe therefore attract Muslim fanatic hatred by association with Israel.

Why does everyone need this conflict?

Why does everyone need to support Jewish religious fanatics in Israel who oppose peace and manage to disrupt (murder or dislodge) every one of their leaders who threatens to make some real peace progress?

Why does everyone need a country of religious fanatics so inappropriately placed in the Middle East, in the first place?

Hey, forget that - what sane Jew moves to Israel at all?

If you are a Jew and you want to be in a friendly and peaceful country where you won't be discriminated and will be given opportunity, you move to the United States!

The people who move to Israel are those who are willing to raise their children on a battle front, for what? So that they may live in a country that was created specifically for the Jewish religion? So that they may live without having to put up with neighbors who aren't Jews?

Don't tell me people move to Israel because they want to be safe from persecution. You don't move into the middle of Arab country that hates Jews in order to be safe from persecution. If you're a Jew and you want to be safe from persecution, you move to the United States.

The fact is that Israel is fundamentally a state of Jewish religious fanatics that is ill-placed where it is. And there is no need for supposedly civilized nations like the US and Europe to support one group of religious fanatics, the hardline Israelis, against another group of religious fanatics, the hardline Muslims. There is no need to get involved in that.

What we should do is, our countries should be hospitable to everyone who integrates into our secular societies, regardless of their origin. We should be inhospitable to everyone who champions religious truths above peaceful coexistence. That's all. We only need to do that, and then we won't be attracting the ire of angry Muslims any more.

And then, perhaps, someone could focus on the problem of 17,000 annual murders and 95,000 rapes, just in the US.

Perhaps the next US president can blame it on Castro's links to porn and invade Cuba...

Saddam Hussein sentenced to death

I don't think Saddam Hussein led a very enlightened regime, but a few observations are in order:
  • There was no civil war under Saddam Hussein.
  • Saddam Hussein did not support terrorism and indeed prevented it within his country.
  • Saddam Hussein indeed killed many people and oppressed more with the aim of stabilizing his regime. But stabilizing his regime prevented a civil war with a potentially much larger death toll.
  • Saddam himself didn't kill nearly as many people as the embargo imposed against Iraq by the United States, which caused the deaths of millions of children.
  • Now that Saddam has been removed, Iraq is in a civil war that has so far cost 400.000 or more lives - many more than in Saddam's regime.
  • Now that Saddam has been removed, Iraq is a genuine terrorist haven.
  • It is realistic to expect that things are only about to get even worse.
Who, then, is the real criminal? Who is responsible for most of the deaths that have happened in Iraq in the past 20 years?

Is it Saddam Hussein?


The United States and Europe are responsible for a factor of magnitude more deaths in Iraq than Saddam Hussein's regime was. The embargo killed millions of people due to lack of food and medicine, and the civil war has killed upwards of 400.000 already, and is going to kill more.

Granted: Saddam Hussein behaved stupidly enough to attract all this to happen. But he is not, eventually, the cause for all this suffering and death.

So why sentence him to death?

When Saddam Hussein's death sentence is carried out in a few weeks, and George W. Bush appears on TV croaking about justice, it will be a sad travesty. The real perpetrators of much bigger crimes against Iraq will remain free.