Wednesday, July 30, 2008

How to detect bullshit

Being fully cognizant of the futility of the exercise, I think it is nonetheless instructive to occasionally deconstruct a creationist theory, if for no other reason than to serve as an example for people who don't have an extensive scientific background about how science really works. I'll take as my example for today from a comment on my recent post about how earthquakes and the Hawaiian Islands should be a thorn in every creationist's side (or maybe a spear would be a more apt metaphor).

C. David Parsons disputes the Hawaiian islands chain as evidence for an old earth in part on the grounds that "The gravitational tug of the moon is ... responsible for earthquakes" and "the gravitational attraction of the moon is the mechanism that facilitates the expansion and forced invasion of pressure solids through a geodic crack in the earth's crust." Does this claim stand up to scrutiny? Well, no, it doesn't.

Unfortunately for Parsons, we have an exceptionally good scientific understanding of gravity. Newton's theory is now over four hundred years old. During that time it has only been revised once, and that was over 100 years ago. If these theories were wrong, space flight (and GPS) would not be possible.

It is an elementary exercise to work out the magnitude of the moon's gravitational influence on the earth using Newton's formula:

F = G x m1 x m2 / r^2

where F is the force between two bodies, m1 and m2 and the masses of the bodies, r is the distance between them, and G is the gravitational constant, one of the fundamental constants of physics.

Let us work out the relative magnitudes of the gravitational influences of the earth and the moon on an object at the earth's surface. We could simply calculate the actual forces, which is not too hard, but it turns out that it's simpler to calculate the ratio directly because G and the mass of the test object cancel each other out and can be safely ignored. (If you don't believe me you can work this out for yourself. It's an elementary exercise in algebra.) The upshot is that although the moon is very heavy (about 7.22x10^22 kg) it is also very far away (about 3.84x10^8 meters) and the gravitational influence decreases with the square of the distance. So at the surface of the earth, the moon's gravitational influence is tiny -- only about 3 millionths as strong as the gravity of the earth itself.

Compare this to the gravitational influence of the sun, which is a lot further away (1.46x10^11 meters) but also a lot heavier (about 2x10^30 kg). The sun's gravitational influence at the surface of the earth is about 190 times greater than the moon's. Standing on the deck of the world's largest supertanker with a fully loaded mass of about half a million tons, the gravitational influence of the ship is about the same as the gravitational influence of the moon.

And yet, the moon clearly does have manifest influences at the surface of the earth, most notably, the tides. If the moon can push zillions of tons of seawater around, isn't it plausible that it could also move zillions of tons of magma around too? Well, no, it isn't. To see why you have to understand how the tides actually work. It is tempting to think that the moon causes the tides by pulling water towards itself via the force of gravity. But this theory has a major problem: if this were how tides worked, there should be one high tide every day (when the moon was overhead pulling the water towards it) and one low tide each day (when the moon was on the opposite side of the earth pulling the water away). But in fact there are two cycles of high and low tides each day. How can this be?

The answer is that the moon does not cause tides by "pulling" on the water. It casues tides because of tidal forces (imagine that). Tidal forces are somewhat complicated to explain, but the easiest (though not quite correct) way to explain them is that the earth and the moon make up a two-body system that rotate around a common center of gravity. Because the moon's mass is a significant fraction of the earth's mass, this common center of gravity is not at the center of the earth, but lies about 3300 miles from the earth's center. As the earth rotates about this offset center of gravity, centrifugal forces "fling" the water away.

The important point is that the tidal force is not the force of gravity, but the difference in the force of gravity on the two sides of the earth. And as small as the raw gravitational influence of the moon on the earth is, the tidal forces that it generates are even smaller. This is why the actual tides on earth, while they may appear significant to us on a human scale, are actually miniscule relative to the scale of the planet. There is nowhere near enough energy in the moon's tidal influences to account for volcanism. And it's a good thing too, because if there were then that energy would get dissipated in the world's oceans and they would all boil away.

The title of this post is "how to detect bullshit", and the answer is: do the math. Don't take my or anybody else's word for it. Do it yourself. It isn't hard. As an exercise, consider the Biblical claim that Joshua made the sun stand still (which is to say, that he made the earth stop rotating). Calculate how much rotational energy would have to be dissipated to make that happen. Compare that to the total amount of energy in, say, the world's nuclear arsenals. Here's all the information you need:

The formula for the rotational energy of a sphere is 2/5 x m x r^2 x omega^2 where m is the mass of the sphere, r is the radius, and omega is the rotational velocity in radians per second. The mass of the earth is about 5.97x10^24 kg. It rotates 360 degrees (or 2pi radians) in 24 hours. A kiloton of TNT is about 4x10^12 joules.

Go.

Tuesday, July 29, 2008

Earthquakes rattle creationism

We had an earthquake in LA today. Five-four. No big deal, but it got my attention, and got me to thinking about what earthquakes have to tell us about the age of the earth.

The modern scientific explanation of what causes earthquakes is that what we think of as solid ground is really just a thin (relatively speaking) layer of frozen rock floating on an ocean of molten magma that makes up the earth's mantle. New crust is formed at mid-ocean ridges, floats along for a while, and is ultimately re-cycled into the mantle in subduction zones. Where the plates of land mass butt up against each other there is friction, and so as the plates move past each other they don't move smoothly, but in little fits and starts that we feel as earthquakes.

Plate tectonic theory used to be considered patently absurd, but is nowadays as well established a scientific theory as you could hope to find. It explains not only earthquakes, but a host of other phenomena including the formation of mountain ranges and why fossils of tropical plants and animals can be found in the arctic. Thanks to modern GPS we can actually measure the motion of the continental plates with mind boggling accuracy.

Which brings me to Hawaii.

The eight major islands of the Hawaiian group (Hawaii, Maui, Molokai, Lanai, Kahoolawe, Oahu, Kauai and Lanai) are actually just the beginning of an enormously long chain of islands, islets, atolls and seamounts extending over 1500 miles of the Pacific ocean in an almost perfectly straight line. How did they get there? Well, on the southeastern extreme of the Hawaiian chain is the Big Island of Hawaii, and on the southeastern coast of the Big Island is Kilauea, he world's most active volcano. Kilauea has been spewing hot lava into the sea more or less continuously for the last twenty five years (and off and on for thousands of years before that). The lava from Kilauea flows down into the sea where it hardens into rock and becomes new land. The current eruption has created almost 600 acres of new land in the last twenty five years.

Hawaii is growing.

The total area of the Big Island is about 2.6 million acres. If Kilauea keeps building new land at the current rate the size of the island will double in about 4300 years. The historic accretion of the island is being chronicled in great detail. You can actually go to Volcano Nation Park and see it happening before your very eyes. They even have signs telling you which lava flows happened when. And for those who don't have time to actually go there, there are handy dandy maps.

What about all the other islands in the Hawaiian chain? None of them have active volcanoes. The closest thing to an active volcano on the other islands is Haleakala on the southeast lobe of the island of Maui, the next island up the chain from the Big Island. Haleakala is a dormant volcano that last erupted in 1790 [UPDATE: turns out that it was probably closer to 1500]. The lava flowed into the sea, creating a new peninsula that is today the southern boundary of La Perouse Bay. But since then no new land has formed on Maui, and the island has begun to erode away.

As you travel northwest along the island chain a striking pattern emerges: all of the islands are made of the same kind of volcanic material, but the further you get from the Big Island the smaller and more eroded the islands become. On the Big Island you can see the lava coming out of the ground. On Maui you can see the lava flow of 1790 [UPDATE: new evidence indicates that the flow is a bit older, dating back to around 1500 or so] -- it looks like a barren river of rock. But on Lanai, Molokai and Oahu there is no fresh lava at all, but there are still recognizable volcanic features, like Diamond Head. By the time you get to Kauai you have to look very closely to find the clues that it was once a volcano. You can still see the crater that used to be the volcano, but it has mostly eroded away.

Out past Kauai the last "real" island is Niihau, which is privately owned and closed to the public. There is no geomorphic evidence of volcanic activity on Niihau, but we know that it was formed by the same volcanic activity that formed the other Hawaiian islands because of the chemistry of the rocks.

Out beyond Niihau the remaining islands are mostly atolls, which is to say, the remains of coral reefs that formed around the islands and remained even after the island proper has completely eroded away.

The remarkable regularity of the Hawaiian chain can be very easily understood if we postulate that the volcano itself is actually a structure in the earth's mantle that stays in one place as the continental plate moves above it. As each new island forms (as the Big Island is currently being formed) the movement of the plate eventually carries it away from the volcanic hot spot and it stops growing and starts to erode. This explains why the islands are all in a line, why the chain only extends in one direction, and why they appear to get older the further they get from the Big Island. Furthermore, if this theory is correct, we might expect to see a little "proto island" being formed under water to the east of the Big Island. And indeed that is exactly what we find. It is called Loihi and it is on track to matriculate into a fully-fledged island in about ten thousand years, give or take.

Now, here's the rub for the young-earth creationists: if the earth is only 6000 years old, how did the Hawaiian islands form? 6000 years is barely enough time to build one island, let alone the dozens and dozens that make up the Hawaiian chain. To build the whole 1500-mile chain in 6000 years by passing the continental plate over the hot spot it would have to be moving at about a quarter of a mile a year, which is faster than it really moves (as measured by GPS) by several orders of magnitude.

The young-earth creationist's answer, of course, is that God simply created the Hawaiian chain in (more or less) its current form. But that just begs the question: why did He put them in a line? Why did he arrange them just so that it would appear that they were built by the processes that we know are operating today?

The evidence for the extreme age of the Hawaiian islands is not buried in obscure fossil strata. You can go to Hawaii today and watch the island grow. You can set up a GPS yourself and measure the rate at which it moves. (It will take you a while -- the actual rate of motion is a few centimeters a year -- but you can do it.) You can go to the Big Island and see what a one-day-old lava flow looks like, and then you can go to Maui and see what a several-hundred-year-old lava flow looks like. You can even still see the cinder cone of the volcano that created it.

And then you can go to Kauai and see what a few million years of erosion can do.

Wednesday, July 23, 2008

Tuesday, July 22, 2008

Kids are startups

I just got back from being out of town and discovered that a one-line comment I posted on hacker news two weeks ago ignited a firestorm of debate. The comment was in response to another comment, which was posted in response to a story about Google's recent difficulties with day care:

As the parent of a 2 month old, it's a difficult question we're facing right now. Who? How? When? Should my wife, with a doctorate in biochemistry, abandon her career completely and stay home? Should I? I'm not enthusiastic about those options. Should we hire someone? Not wild about that either. I think the best would be to kind of try and switch off, but it's going to require a lot of flexibility, and perhaps earning less money. The second is probably ok, depending on wherever it is we settle, the second may not be forthcoming from many employers. Sigh...

To which I replied:

With all due respect, did it never occur to you to get this all figured out BEFORE you had kids?

Various people took umbrage:

I hope you must be 21 or something. Maybe when you have kids, you will understand the difficulty of raising them, while trying to have some kind of career.

and (from the person I was responding to):

Wow, I don't think I've ever been so offended by something on this site. Your implication that I haven't thought about the future of my daughter is... something I hope you never say to any other parent.

We've done our best to think about the future, but it's unknowable.


and

Do you have any kids? Do you realize how unpredictable it is to plan things for your child, for example, how sick the child is going to be, or how well-tempered?

So for the record, I am not 21. I am in my mid-forties, married, with no kids. But that does not mean that I do not know how hard it is to raise kids. In fact, it is because my wife and I know all too well how hard it is that we decided not to have any. Nowadays it's a choice.

And while you can't predict exactly, it's a good bet that sooner or later if you have kids they will get sick. They will throw temper tantrums. They will do all the things that kids do.

Kids are startups.

And I'm sorry the OP was offended. None of the questions you were asking came about as a result of unpredictable events. You knew before that no matter what someone would need to look after the kid and you'd need to put food on the table. If you are asking questions like, "Should my wife, with a doctorate in biochemistry, abandon her career completely and stay home? Should I?" then you have manifestly not thought enough about the future. These are questions that IMHO you should have answered BEFORE you took the plunge, so to speak. Maybe you'd need to change the plan in response to contingencies, but that's not what's happening here. You didn't have a plan before your started. If you did you would not be asking these questions.

Paul Graham wrote:

Here is the rational answer you seem to want. (a) This problem is so hard you can probably never solve it satisfactorily, and (b) you can't know what it's going to be like to have kids before you have them, or what your kids will be like. So however much thought you expend on the question before having kids, you're still going to be working on it afterward.

I'm surprised he didn't come up with the kids-as-startups analogy. It's really pretty good. In both cases there is a lot of unpredictability. But again, in both cases, that is no excuse for not having a plan before you start.

iSightCapture secrets revealed

For anyone who has used iSightCapture and has been frustrated by the fact that it's released in object-code only format, here is qt-capture which is not quite as capable as iSightCapture (it doesn't have any command-line arguments) but does basically the same thing. Since it's just a proof-of-concept and not really finished code I've released it into the public domain. Enjoy.

UPDATE: I've also uploaded an expanded version that lets you capture movies and still images. It also demonstrates how to roll your own cocoa app without using a NIB file. Not really recommended, but kinda cool to see how it's done for someone like me who really like to know what's going on under the hood.

Sunday, July 13, 2008

There are no roads in Israel

At least not according to Google Maps.

Outrage at Obama is Justified

Larry Lessig calls the outrage at Obama's flip-flop over the FISA bill leftist hysteria. He's wrong.

Whatever else one might think about the FISA bill, the outrage over retroactive immunity for the telcos is not a leftist issue. It is a litmus test for whether or not you believe in the rule of law. Central to the very concept of civilization is the idea that there is a set of rules that you play by, and implicit in this is that everyone has to know what those rules are. Retroactive immunity sets a very dangerous precedent. It says that as long as you have enough friends in Congress you are no longer expected to play by the rules.

Of course, if you have enough friends in Congress you can get the rules changed in your favor anyway. But there's a huge difference between getting the rules changed up front and having them changed to your benefit after the fact: if you have enough power and influence to do the latter then you can break the rules while everyone else still has to follow them. Only if you get caught do you have to go on the record as having used your influence to unfair advantage. God only knows how many laws that Bush administration and their cronies have broken secure in the knowledge that if some snoopy reporter discovers the transgression they can just strongarm Congress to give them a free pass. (And if that fails, there are always presidential pardons to fall back on.)

It is not for nothing that the Constitution prohibits ex post facto laws.

I am outraged at Obama because he specifically promised to filibuster any bill that included retroactive immunity. That was an implicit promise to stand up for the rule of law no matter the cost. He reneged on that promise. This may well have been politically justifiable, even shrewd, but the larger message is that Obama is not a man of his word, and he is not a man of principle. He is just another politician who will do or say anything to get elected.

But even that is not the worst part. The worst part is that now we have no one (except, perhaps, Ron Paul) who is willing to stand up against the overarching trend in American politics today, which is that national security trumps everything, including the Constitution and the rule of law. Down that road lies tyranny, and Obama stood by and did nothing while the Senate steered us down that path. That is well worth getting outraged over.

Thursday, July 10, 2008

I donated to Obama's campaign. I demand a refund.

Tomorrow I plan to write a letter to the Obama campaign demanding a refund of my $2300 campaign contribution because Senator Obama did not fulfill his promise to filibuster the FISA bill if it contained retroactive immunity for telcos. If you want to do likewise the address is:

Obama for America
P.O. Box 802798
Chicago, IL 60680

Senator Obama destroys my last hope

It's amazing how fast things change. Last year I was thinking how wonderful it was to be present at this historic moment when either a woman or a black man would for the first time in history be a major party's nominee for President of the United States. Then Hillary revealed herself to be a lying scumbag, and so I decided to support Barack Obama.

Today, Obama cast a YEA vote on the FISA Wiretap Bill HR 6304 after promising that he would filibuster it. So much as it pains me, I have to say that Obama too is just another lying scumbag.

In a way, Obama's lie is worse than Hillary's. Hillary's lie revealed her to be a liar, but didnt' really matter much in the grand and glorious scheme of things. Obama's lie actually mattered. He promised to defend the Constitution and our civil rights and to stand up for justice and truth. Now not only will justice not be done, but we will never even know the extent to which our civil rights have been violated by the Bush Administration.

I feel utterly betrayed. Every last bit of enthusiasm that I had for this election has been ripped to shreds. What's the point of voting when both parties conspire to shred the Constitution? A year and a half of a Democratic majority in Congress and what do we have to show for it? Nothing. Not a god damned thing. Ralph Nader was right.

Fuck.

Wednesday, July 09, 2008

No monopoly on idiocy

If you thought that Muslims had cornered the market on hysterical overreactions to minor slights, Catholics worldwide are up in arms over the theft of a soda cracker. The dastardly perpetrator has been accused of kidnapping, and has received death threats.

At least they're not rioting in the streets (yet).

Tuesday, July 08, 2008

A cautionary tale

"What happened here was the gradual habituation of the people, little by little, to being governed by surprise; to receiving decisions deliberated in secret; to believing that the situation was so complicated that the government had to act on information which the people could not understand, or so dangerous that, even if the people could not understand it, it could not be released because of national security."

The U.S.A. under the Bush administration? No. Germany from 1933-1945.

Horrific conditions at San Quentin prison

I heard only a part of this story about San Quentin prison on NPR yesterday, but that was enough to turn my stomach.


With overcrowding, it gets harder for prison officials to take care of the basics. Crumbling walls, broken lights and filth are standard.

'That's human feces,' says inmate Mike Johnson, pointing to his wall. Johnson has been here for five months on a DUI charge. He says in all that time, the feces has never been cleaned off.

'They'll clean down there on the bottom where the (officers) stay,' he says, 'but up here, we're just a number.'

Johnson's 4-foot-wide cell was built for one man. Now it holds two. With such crowded conditions, it's harder to prevent violence."


What the broadcast version included that the print version doesn't is that the two men in the cell have to take turns standing up.

And if you're tempted to say that these criminals deserve what they get, most of San Quentin's inmates are there for parole violations, mostly drug offenses.

This is really starting to get pretty scary. The recidivism rate in California is 70%. Our prisons aren't deterrents for crime, they're mass-production facilities for criminals. What happens when we run out space to warehouse them all?

The witch hunt goes on

A Texas high school student has been arrested for making a map of his school. (Caveat: I have not been able to verify this story. The purported link to the original is broken, so this could be an urban legend in the making. But having heard many first-hand horror stories about police harassing people for taking pictures I find it quite plausible that this could be true.)

I may have to vote for Ralph Nader again

This is so depressing I can barely bring myself to write about it. I thought we elected the Democrats to protect us from neocons running roughshod over our civil rights. Instead, the dems are turning out to be just as much rubber stamps for the Bush administration as the Republicans.

You know, I'm really starting to wonder if the conspiracy theorists may be on to something. With Bush's popularity ratings at historic lows you'd think politicians would be falling all over themselves to distance themselves from him, but they aren't. Congress has yet to stand up to the administration in any meaningful way. Both John McCain and Barack Obama have actually reversed positions in order to align themselves more closely with Bush. Why? What the bleep is going on here?