Saturday, January 23, 2010

Civilization is Bootstrapped

When was the last time you booted up your computer? Ever thought about why it's called that? It comes from a shortening of "bootstrapping", which in turn comes from the phrase "to pull yourself up by your bootstraps". Originally meant as an example of an impossible task, it eventually came to mean to better yourself without outside aid.

The metaphor got picked up by computing,  where it got big, and it got more technical. Probably, because it's used so damn much in computing. Every time you turn your computer on, it has to bootstrap itself to get a complicated program like an OS going.

The process is probably most easily described using compilers. You need a compiler to translate human readable code into machine readable executable. If you start with a small, incomplete compiler for a language, you can bootstrap the compiler. Using only the features available, write a compiler that's slightly better. Use that compiler to make a slightly better one, and so on. Until eventually you have a full fledged compiler and language to go along with it.

But computing isn't the only thing this principle applies to. The concept is well described in Sid Meier's Alpha Centauri.

Technological advance is an inherently iterative process. One does not simply take sand from the beach and produce a Dataprobe. We use crude tools to fashion better tools, and then our better tools to fashion more precise tools, and so on. Each minor refinement is a step in the process, and all of the steps must be taken.
-Chairman Sheng-ji Yang, "Looking God in the Eye"
That's pretty much how all technological innovation works. Moreover, that's pretty much how all innovation works, technological or not. Technological, linguistic, philosophical, cultural. They all work by making slight improvements on earlier working models. And that's what civilization is. Our ancestors used their civilization to create a slightly better one for use, and we try to use that to create a slightly better one for our descendants.

Friday, January 15, 2010

Bayes' Theorem

In my last post, I talked about Bayesian reasoning, but didn't really explain what it actually was. I was going to make a footnote explaining it, but realized it too big for a footnote, so I'm going to write a post explaining it.

I'll start with some terminology.

P(A) is the probability that something is true. For example, let's say I roll a fair die and A is "I roll an even number". Since the die is fair, all outcomes are equally likely, so P(A) = 3/6 = 1/2, since 2, 4, and 6 are even.

~A is not A. ~A then is "I roll an odd number". Also P(~A) = 1 - P(A), for any A. In this case, P(~A) = 1 - 1/2 = 1.

P(A|B) is read probability of A given B. Let's say B is "I roll a number greater or equal to 4". So, if I roll the die, see the number is greater or equal to 4, then the P(A|B) = 2/3, because 4 and 6 are even

Bayes' Theorem states that P(A|B) = P(B|A)*P(A) / ( P(B|A)*P(A) + P(B|~A)*P(~A)). So, if we want to know how likely A is after making some observation, all we have to know is how likely the observation is if A is true, how likely the observation is if A is false, and how likely A was before we made the observation.

If we're not interested in the exact value of P(A|B), but just whether P(A|B) is higher or lower than P(A), then all we need to know is whether P(B|A) is higher or lower than P(B|~A). If P(B|A) > P(B|~A) then P(A|B) > P(A). If P(B|A) < P(B|~A) then P(A|B) < P(A). And, if P(B|A) = P(B|~A) then P(A|B) = P(A).

Relating this back to the other post, I said that not observing evidence for a phenomenon makes that phenomenon less likely. Here's an example: Tigers don't exist. Evidence: There are no tigers in my house. A - Tigers exist. B - No tigers in my house. Now, if tigers do exist, it's very unlikely that they would be in my house. Not the right environment, needs some way to get in, etc., etc. So, P(B|A) = .99999999. But, if tigers don't exist, then it is absolutely impossible for tigers to be in my house. So, P(B|~A) = 1. 1 > .99999999, so P(A|B) < P(A). Of course, there's lot of other evidence and stronger evidence that tigers do exist, so P(A|B) is still very high.

Wednesday, January 13, 2010

Absence of Evidence is Evidence of Absence.

The common saying "Absence of evidence is not evidence of absence" is not true.

If you should be seeing evidence of a phenomenon and you aren't, then that is evidence that the phenomenon doesn't exist. Consider the Michelson-Morley Experiment. It was designed to measure the speed of the Earth through the luminiferous aether. And it found... absolutely nothing. That, and other experiments which failed to detect the aether, overthrew the theory. The absence of evidence was the evidence of absence.

Even in cases where you wouldn't expect to see evidence, the absence of it is still weak evidence of absence. I say this based on Bayesian reasoning. If a phenomenon exists, but you wouldn't expect to see evidence of it given the circumstances, presumably, there's still a non-zero (though small) probability of seeing evidence of it. Whereas, if the phenomenon doesn't exist there is even less probability of seeing evidence for the phenomenon. This means that not seeing the phenomenon does shift the probability of the phenomenon actually existing down, by however small an amount. Of course, depending on the specifics, it could be a very, very weak evidence.

Usually, this sentiment comes up in reference to the existence of god. Just because we don't see evidence of god doesn't mean he doesn't exist. But it does make it less likely. The question then is, how much less likely? If god did exist, what would we expect to see different than if he didn't exist?

Monday, January 11, 2010

Geometrical Constructions

Ever hear of geometrical construction? I learned about it in high school geometry class. It involves using only a straightedge and a compass to draw geometrical figures. Ancient Greeks used it to prove geometrical theorems. I just use it make pretty pictures.

It's a pretty simple process, and makes really cool designs. Always trying to come up with new and cool things to program, I thought I might be able to make a program that could automatically generate similar geometric constructions. But it turns out that even though drawing circles and lines and finding intersections is fairly easy to program, figuring out where circle and lines would look good isn't.

So, I wrote a program to make it easier for me to make geometrical constructions. Instead of having to actually draw things, I could just point and click. The first attempt didn't work very well. It got the basics right (though with some troubling bugs), but the interface wasn't really that good, so it was still more convenient to do it by hand.

A year or so later, I was inspired, and picked it up again. I fixed the bugs, improved the design and added features. Now, it really was more convenient. So I used it. I made a whole bunch of figures to make a coloring book for my niece. Before then, I would on average make less than one a month, but using the program, I made dozens in days.

So, here are some geometrical constructions I've made that look cool.






Crop Circles



Third Wheel


The Pentagon

Star Eyed

Big Bang

Saturday, January 9, 2010

Free Speech

I disapprove of what you say, but I will defend to the death your right to say it." -Voltaire

Sometimes, I'm surprised when I realize that a lot of people don't believe in free speech. I guess I shouldn't, really, since the concept is only a few centuries old, compared to millenia of human history.

The incident that really brought it to my attention was a couple months ago. A professor here at Purdue posted an argument against gay marriage on his personal blog. The argument he made was frankly, pretty stupid. But I won't get into that, since plenty of other bloggers have taken care of that for me, and it's really not pertinent.

This was a rather large controversy then, there were many letters to the editor in the Exponent, and other blogs talking about it and such like. What struck me is that so many of those who disagreed with him wanted him to be fired from his position, or otherwise disciplined. When others pointed out the whole freedom of speech thing, the response was that the constitution's guarantee of freedom of speech didn't apply in this situation. That's true, the constitution doesn't forbid an employer from firing an employee for saying the wrong thing.

But that's not the point. When I talk about free speech, I'm not referring to the constitution. I'm talking about the principle. And the principle is that you don't want someone punished just for saying something that you disagree with. Even if it's wrong. Even if it's bigoted.

The whole point of freedom of speech is that it's the only way to determine whether something is wrong or bigoted. Just because people think something is wrong, doesn't mean it actually is. The only way for new ideas to be accepted or rejected is for the ideas to be expressed and critically examined. The appropriate response to someone saying something you disagree with, no matter how strongly, is not to call for their punishment, but to explain why you think they're wrong.

That was the biggest incident, but since then I've noticed other similar examples. Even though free speech is one of the things the modern world was founded on, it seems it hasn't really sunk in yet.