Monday, April 8, 2013

Charts that end in tears

Felix Salmon has a great piece about bitcoins. In it, he presents the following chart:


It inspires him to write,
There are a couple of reasons why the [bitcoin] bubble is sure to burst. The first is just that it’s a bubble, and any chart which looks like the one at the top of this post is bound to end in tears at some point.
Now where was it that I last saw a chart which looked similar to the one Salmon thinks is the sign of the Apocalypse? Oh wait...

Saturday, April 6, 2013

What coding teaches you about life

Anyone who's ever been writing computer programs, no matter whether professionally or as a hobby, has surely had the following experience numerous times. You just wrote a script. It's not trivially simple but not very complicated either. While the task it's supposed to do or a problem it's supposed to solve is in a literal sense new, you actually have dealt with somewhat similar problems many times before so the task feels quite routine. You have a clear idea what you need to do. You write your code, careful not to make any stupid mistakes, and when it's obvious to you that it will do what it's supposed to do, you run it.

And it doesn't work.

Of course, since the task is conceptually straightforward to you, this must mean there's a very trivial error somewhere, an unmatched bracket or whatever. So you check the thing very carefully, line by line, for any sign of any stupid mistakes. And you find that there aren't any. Frustrated, you run it again. Of course this time, it doesn't work either.

You concede there must be a conceptual error somewhere, so you look up all the scripts you wrote in the past that dealt with similar things, to see where you've gone wrong this time around. And you just can't see it. It looks to you like this time you've done everything just the way you have all those times in the past; the only difference seems to be that in the past it was working and now it's not.

In situations like this, every programmer works from the assumption that the reason the code doesn't work is because they did something wrong, even though they have no idea exactly what they'd screwed up. They realize that you can be wrong even though you cannot possibly think of a reason why you'd be wrong. That the fact you have no specific idea about where you could be making a mistake isn't evidence that you aren't making one.

In short, this kind of experience teaches you that you don't know what you don't know.

This may all seem trivial, but I don't think it is. In life, real life, I see people who are unaware of this, all the time. People who think something to the effect of "I can't see any plausible way in which I could be wrong about this; therefore, I must be right". You can't do that when you code though. You can't just will your code to work because you see no reason why it shouldn't.

Thursday, April 4, 2013

From the 'I wish I wrote that' file

Robert P. Murphy writes:
There’s nothing in the gospel accounts that literally violates the laws of physics as we currently understand them. (...) Mark never writes, “And behold, the Lord violated the conservation of energy.” John never claims, “Then He taught them, saying, ‘The kingdom of God is like a man who measured the position and momentum of an electron perfectly.’”
I'm not talking about substance, though I happen to agree with it, just about form. Funniest thing I've read in a while.