Friday, July 31, 2009

Time Machine and Mail: a match made in hell

I've just spent the last two days debugging a problem I was having with Time Machine backups being freakishly slow (20 minutes to back up 20 MB). There's still some weird stuff going on, but along the way I discovered a problem that nearly everyone who uses a Mac will almost certainly encounter sooner or later, but I haven't found a single write-up on it. So here goes:

Time Machine is pretty smart about only backing up things that have changed since the last backup, and storing things on the backup drive in such a way that it *appears* that you have a ton of complete (not incremental) backups without actually duplicating files that haven't changed. It does this by using an OS X feature called FSEvents, which allows Time Machine to find changed files without having to scan the entire file system, and hard links, which allows Time Machine to store multiple backups efficiently.

This combination of features has some unintended consequences, most notably, if you use a mail system like Entourage that stores its messages in one big monolithic file. The contents of this file change every time you get a new mail message. So every time you get a new mail message, Time Machine has to back up *all* your mail, since it doesn't know how to look inside an Entourage mail file to find just the parts that have changed.

To avoid this situation, Apple has been recommending to developers that they store data in lots of little files instead of one big file, and they followed this recommendation in their own Mail application, which stores every message in a separate file. Unfortunately, it turns out this doesn't help matters at all, and in fact seems to make the situation worse.

The problem is this: imagine you have a folder with a lot of mail messages in it. A new message arrives, which gets stored in a new file. Time Machine knows that only this one file has changed, and so only this one file has to be copied. Unfortunately, to store this one file in a way that makes it appear that it's a complete backup, while it doesn't have to *copy* all those other files, it does have to create hard links for them all. And for small files, like most mail messages tend to be unless they have a lot of attachments, creating a hard link is no faster than actually copying the file.

So what happens over time is that your inbox grows and grows. Every time Time Machine runs you've almost certainly gotten at least one new mail message. So every time it has to create new hard links for every one of those zillion messages. So gradually Time Machine will get slower and sslloowweerr and sssssllllllloooooowwwweeeeerrrr, until one day you suddenly realize that it's pretty frickin' slow.

Fortunately, it's pretty easy to fix this problem: just create an archive folder, and periodically dump your old mail in there. As long as the archive folder doesn't change, it doesn't get copied at all. You should also do this with your sent mail folder, and your junk mail folder if you don't have it set up to automatically delete messages. If you're using SpamSieve, this can be a little tricky. This is actually what happened to me. I had set up SpamSieve according to the default instructions, which send spam to a folder that does not get automatically purged. Over time I picked up an obscene amount of spam, all of which was in one folder, none of which was being deleted, and which was constantly being added to. Time Machine was freaking out.

This is not a hard problem to avoid once you know what's going on, but it does seem to be one of the best kept secrets of OS X.

Dog days

I'm having an incredibly bad day. Actually, yesterday -- Thursday -- was the incredibly bad day. It's 4AM on Friday now. Can't sleep.

Meet Magnum:



Magnum is our next-door-neighbor's pit bull, and I swear he's the world's loudest dog. I tried measuring exactly how loud he was once using the Decibel app on my iPhone and it went off the scale. We've been listening to Magnum bark ever since we moved in to our house four years ago. We've tried everything. We tried being nice. We tried being nasty. We tried calling the police. Animal control. The humane society. We tried everything. Finally, after our neighbor cut off all communication (letters we sent started coming back "return to sender") we filed a lawsuit.

That seemed to do the trick. For a while the barking got better. The deadline for responding to the suit came and went and we thought our neighbor was just going to roll over, so to speak. We were looking forward to putting the whole situation behind us.

Then in the last few days the whole thing came unraveled. Our neighbor hired a lawyer, filed a response, and the dog has started barking again. We've been served with stacks of discovery forms to fill out. We've been told that she intends to fight us "tooth and nail." We're looking at potentially tens of thousands of dollars in legal bills and months of drawn out litigation. Last night, Magnum started barking again and after he had been at it for an hour I just lost it and had a pretty serious meltdown. And now I'm up at 4AM because I just can't get over how the situation has spun so wildly out of control.

All over a fucking barking dog.

I'm amazed at how blase people are about barking dogs. We have loud barking dogs all over our neighborhood. All except this one are too far away to bother us, but all those dogs have neighbors too. How do they deal with it?

Letting your dog bark really ought to be against the law. There's no difference between having your neighbor's dog barking at you and having your neighbor screaming at you through the fence. I doubt many people would put up with the latter; why do they put up with the former?

This is really driving me crazy.

Monday, July 20, 2009

Sunday, July 19, 2009

This is really scary

This is the scariest thing I've seen in a long time. I've always known that the right wingnuts have an extraordinary facility for detaching themselves from reality, but this guy really takes it to a whole new level. He's been producing these rants for a long time. George Bush came and went and smashed Ronald Reagan's all-time record for time off work while in the presidency (and Reagan wasn't presiding over a war that he initiated) and not a peep from Bob. But put a Democrat in the White House and he goes non-linear over a freakin' baseball game! There are a lot of things one can legitimately criticize Barack Obama for, but not working hard enough isn't one of them.

This extraordinary capacity for self-delusion combined with the obvious anger-management issues should have us all on edge. We've seen this before. It doesn't end well.

Monday, July 13, 2009

Some questions for creationists

Since turnabout is fair play, here are some questions for creationists:

1. If God created the universe, what created God? And if the answer is "nothing", why could not the universe have been created ab initio as well?

2. Let's suppose for the sake of argument that *something* created the universe, and that we can call that something "God". Is there any reason to believe that the God that created the universe has anything to do with the sacred writings of the world's religions?

3. Which came first, man or animals? Genesis 1 says animals were created first. but Genesis 2 says the animals were created after man in order to keep him company. (I note in passing that that plan didn't work out so well, so God finally wised up and created woman). Which is it?

4. Did God create mosquitos and plasmodium? Parasitic wasps? The Tsetse fly?

5. How did kangaroos get to Australia without leaving any trace on any other continent? How did the Texas blind salamander get to Texas?

6. Why did God make the Hawaiian Islands chain in just the right way to make it appear that the earth is billions of years old?

7. Where does the cosmic background radiation come from?

8. According to Genesis, the reason humans speak many languages is that they tried to build a tower to reach heaven and God "confused their language" in order to foil their plans. Is this story true? If so, why have our space probes not attracted God's ire, or even his attention? Has heaven moved?

9. Why are there fish that live in pitch darkness but still have eyes?

10. Why has there never been a dinosaur fossil found above the K-T boundary? And where did the Iridium come from?

11. Why did God put telomeric DNA in the center of chromosome 2 in humans?

12. Did Adam and Eve have to wipe their butts? No, seriously. The reason humans have to wipe their butts and other animals don't is that we walk upright, which presses our ass cheeks together. In evolutionary terms, walking upright goes hand-in-hand (so to speak) with having a brain big enough to figure out that you need to wipe the extra shit off, and hands nimble enough to actually do it. Was this all part of the Intelligent Design?

I think maybe I'll stop there :-)

OK, I'll bite

Walt Brown poses 37 questions for evolutionists. (UPDATE: I somehow ended up with 38, but I don't feel like going back and figuring out where I lost sync.) Although he's clearly trolling, I find I can't resist taking a crack at them. Unlike many scientists, I think it is important to occasionally answer creationist propaganda because you never know who might be lurking. So here goes:

1. Where did the space for the universe come from?
2. Where did matter come from?
3. Where did the laws of the universe come from (gravity, inertia, etc.)?

I'll answer these three as a group since the answer to all three is the same: we don't know. (By "we" I mean Scientists, with a capital S, which is to say those who believe that science is the most reliable guide to metaphysical truth.) We can run the laws of physics backwards to a tiny fraction of a second after "the beginning", but no one knows why there is something rather than nothing. Various theories have been proposed, the most popular being the anthropic principle. Personally, I'm perfectly happy just having it be a mystery.

4. How did matter get so perfectly organized?

If you think matter is "perfectly organized" you obviously have not seen my desk.

5. Where did the energy come from to do all the organizing?

Nearly all of the energy required to do the organizing that we find here on Earth comes from hydrogen fusion happening in the sun. A tiny amount has recently come from uranium and plutonium fission. The uranium was produced in supernovas.

6. When, where, why, and how did life come from non-living matter?

We don't know, but there are various theories of abiogenesis. A lot of progress is being made in this area, and it is quite conceivable (perhaps even likely) that there will be an artificial genesis within our lifetimes. There is quite a lot of evidence that there was more than one genesis on Earth. Paleontological evidence indicates that basic life arises very quickly (on geological time scales, so "quickly" here means a few million years) once the necessary conditions (which pretty much means just having liquid water and a supply of energy) have been established. Complex multicellular life took much longer to evolve than life itself.

7. When, where, why, and how did life learn to reproduce itself?

Life never "learned" to reproduce. Reproduction is the *definition* of life, and it's something that just happens more or less spontaneously once the necessary conditions (liquid water, energy, a few amino acids and enough time) are established.

8. With what did the first cell capable of sexual reproduction reproduce?

Like everything else in evolution, sexual reproduction evolved gradually. Even today we can observe primitive precursors of sexual reproduction in bacteria, which exchange small rings of DNA called plasmids, which are almost certainly the precursors of sexual reproduction.

9. Why would any plant or animal want to reproduce more of its kind since this would only make more mouths to feed and decrease the chances of survival? (Does the individual have a drive to survive, or the species? How do you explain this?)

The "drive" to reproduce is not a primary phenomenon. It is a side-effect of the very fact of reproduction, and the obvious, almost circular observation that things that have a "drive" to reproduce reproduce better than things that don't have such a drive. So if such a drive can be built into an organism by its genes, it is inevitable that such a drive will arise simply because those organisms that possess it will reproduce more effectively than those that don't, and so be more likely to pass that drive on to their descendants.

10. How can mutations (recombining of the genetic code) create any new, improved varieties? (Recombining English letters will never produce Chinese books.)

This is a classic creationist straw man. Evolution consists of two parts: mutation, which is random, and natural selection, which is not random. It is natural selection, combined with a lot of time, that produces the "improvements." (I put "improvements" in scare quotes because they aren't actually improvements in any absolute sense.)

11. Is it possible that similarities in design between different animals prove a common Creator instead of a common ancestor?

No. Similarities by themselves don't prove anything. It is the similarities combined with a theory of how those similarities arise that "prove" (again in scare quotes because science never proves anything in an absolute sense) that life arose through evolution rather than by design. The theory of evolution has been worked out in exquisite detail. We know more or less exactly why different species share common traits. And it has nothing to do with a designer.

12. Natural selection only works with the genetic information available and tends only to keep a species stable. How would you explain the increasing complexity in the genetic code that must have occurred if evolution were true?

It isn't true that natural selection "only" works with the genetic information available. Mutation combined with natural selection generates new information ab initio. Nature is constantly saying, in effect, "Let's try this. Oops, that didn't work. Let's try that. Oops, that didn't work either." And after a few million tries it suddenly stumbles onto something that *does* work, and so now there is new "information", that *this* combination of genes "works" in the sense that it reproduces better than its competitors.

14. When, where, why, and how did:

Single-celled plants become multi-celled? (Where are the two and three-celled intermediates?)
Single-celled animals evolve?
Fish change to amphibians?
Amphibians change to reptiles
Reptiles change to birds? (The lungs, bones, eyes, reproductive organs, heart, method of locomotion, body covering, etc., are all very different!)

I don't know the answers to these off the top of my head, but you can easily look them up yourself. (BTW, birds evolved from dinosaurs, not reptiles.)

14a. How did the intermediate forms live?

Well enough to leave offspring. I don't understand this question at all. If you want to see how intermediate forms live, look at mixed-breed dogs, or mules. They are, essentially, intermediate forms.

15 When, where, why, how, and from what did:

Whales evolve?
Sea horses evolve?
Bats evolve?
Eyes evolve?
Ears evolve?
Hair, skin, feathers, scales, nails, claws, etc., evolve?
Which evolved first (how, and how long; did it work without the others)?
The digestive system, the food to be digested, the appetite, the ability to find and eat the food, the digestive juices, or the body’s resistance to its own digestive juice (stomach, intestines, etc.)?
The drive to reproduce or the ability to reproduce?
The lungs, the mucus lining to protect them, the throat, or the perfect mixture of gases to be breathed into the lungs?
DNA or RNA to carry the DNA message to cell parts?
The termite or the flagella in its intestines that actually digest the cellulose?
The plants or the insects that live on and pollinate the plants?
The bones, ligaments, tendons, blood supply, or muscles to move the bones?
The nervous system, repair system, or hormone system?
The immune system or the need for it?

A full answer to this question would amount to a textbook on evolution. Happily, such books have been written, and all you need to do if you really want the answers is go read one. If you don't want to do that much legwork you can start with this accessible account of the evolution of the eye.

16.There are many thousands of examples of symbiosis that defy an evolutionary explanation. Why must we teach students that evolution is the only explanation for these relationships?

Because it's the best explanation we have. If you come up with a theory that explains the data better than evolution you will become instantly famous.

17. How would evolution explain mimicry? Did the plants and animals develop mimicry by chance, by their intelligent choice, or by design?

Mimicry, like everything else, evolves because it reproduces well -- but only when it reproduces well. This is why you do not see arbitrary mimicry in nature, but only mimicry that serves some reproductive purpose, like mimicking a poisonous species to prevent predators from eating you.

18. When, where, why, and how did man evolve feelings? Love, mercy, guilt, etc. would never evolve in the theory of evolution.

Of course they wold. All of these "feelings" (scientists would call them "instincts") serve easily demonstrable evolutionary purposes. Love, for example, helps bond humans into groups which are necessary for survival, because individual humans are quite vulnerable. Mercy helps prevent humans from killing each other. Guilt helps prevent actions that serve an individual at the expense of other individuals with whom that person may share genes. As with everything else in evolution, this has all been worked out in excruciating detail, mainly by a fellow named Robert Axelrod, who is probably the greatest scientist that no one has ever heard of.

19 *How did photosynthesis evolve?

I'm afraid I'm going to have to punt on that one. I just don't know. But I'm sure someone has worked it out. Try Googling for "evolution of photosynthesis".

20 *How did thought evolve?

Slowly. That's not a glib answer, that's the truth. Though resides in brains, which evolved over an extraordinarily long period of time though an extraordinarily complex series of stages, not all of which are yet fully understood. But we're working on it, and the pace of progress is breathtaking.

21. *How did flowering plants evolve, and from that?

See my answer to #19.

22. *What kind of evolutionist are you? Why are you not one of the other eight or ten kinds?

I didn't know there was more than one kind.

23. What would you have said fifty years ago if I told you I had a living coelacanth in my aquarium?

"Can I see it?"

24. *Is there one clear prediction of macroevolution that has proved true?

Yes.

25. *What is so scientific about the idea of hydrogen as becoming human?

What is scientific about it is that this idea has been worked out in great detail and it explains all of the available data (and that's a boatload of data).

26. *Do you honestly believe that everything came from nothing?

In the sense that you mean it, yes, I really do.

After you have answered the preceding questions, please look carefully at your answers and thoughtfully consider the following questions.

27. Are you sure your answers are reasonable, right, and scientifically provable, or do you just believe that it may have happened the way you have answered?

Yes, I believe that my answers are reasonable, right, and scientifically "provable" (to the extent that anything is scientifically "provable"). I've personally looked into this in great detail, and the scientific account of our existence hangs together a hell of a lot better than any religious one.

27a. (Do these answers reflect your religion or your science?)

Science *is* my religion :-)

28. Do your answers show more or less faith than the person who says, "God must have designed it"?

Less. A lot less. I can go to Hawaii and see the evidence that the earth is very, very old with my own eyes. And so can you.

29. Is it possible that an unseen Creator designed this universe?

Of course it's possible. But all the evidence indicates that's not what happened.

29a. If God is excluded at the beginning of the discussion by your definition of science, how could it be shown that He did create the universe if He did?

Video. It's the gold standard nowadays. And no, I'm not being glib. If God is almighty, producing video of the Creation should be well within His capabilities.

30. Is it wise and fair to present the theory of evolution to students as fact?

Yep. It's as well established a fact as it gets.

31. What is the end result of a belief in evolution (lifestyle, society, attitude about others, eternal destiny, etc.)?

I live in a nice house with a pool, two cars in the garage, a wife and a cat. Since I don't believe in an afterlife, I try very hard to make this life as good and productive and meaningful as I can.

32. Do people accept evolution because of the following factors?

It is all they have been taught.
They like the freedom from God (no moral absolutes, etc.).
They are bound to support the theory for fear of losing their job or status or grade point average.
They are too proud to admit they are wrong.
Evolution is the only philosophy that can be used to justify their political agenda.

I don't know, I haven't done a poll. I'm sure some people believe in evolution simply because it's what they were taught, and that's not good. Science education in general could stand to be improved, but not by introducing bogus, discredited theories that are clearly nothing more than thinly disguised Creationism.

33. Should we continue to use outdated, disproved, questionable, or inconclusive evidences to support the theory of evolution because we don’t have a suitable substitute (Piltdown man, recapitulation, archaeopteryx, Lucy, Java man, Neanderthal man, horse evolution, vestigial organs, etc.)?

We should certainly not use questionable evidence to support any scientific theory. Happily, the evidence for evolution is as rock-solid (literally) as it gets.

34. Should parents be allowed to require that evolution not be taught as fact in their school system unless equal time is given to other theories of origins (like divine creation)?

Not unless you think parents should be allowed to require that Newton's laws of gravity not be taught as fact unless equal time is given to alternatives.

35. What are you risking if you are wrong? As one of my debate opponents said, "Either there is a God or there is not. Both possibilities are frightening."

Read up on Pascal's Wager.

36. Why are many evolutionists afraid of the idea of creationism being presented in public schools? If we are not supposed to teach religion in schools, then why not get evolution out of the textbooks? It is just a religious worldview.

No, it isn't, it is solidly established scientific fact. And the reason we're afraid of the idea of creationism in public schools is because where it has been tried the results are pretty scary.

37. Aren’t you tired of faith in a system that cannot be true? Wouldn’t it be great to know the God who made you, and to accept His love and forgiveness?

It certainly would. Unfortunately, all the available scientific evidence indicates such a God does not exist. That is why believing in such a God requires faith.

38. Would you be interested, if I showed you from the Bible, how to have your sins forgiven and how to know for sure that you are going to Heaven? If so, call me.

Don't hold your breath.

Friday, July 03, 2009

You get what you pay for

There have been a lot of stories about drywall from China used to rebuild the Gulf coast after hurricane Katrina producing a host of unpleasant problems including foul odors, corrosion in air conditioning systems, and a variety of health problems. As if that weren't enough, now it turns out the stuff might be radioactive.

Sarah Palin: Quitter

Sarah Palin has announced that she is going to resign as Governor of Alaska to pursue the presidency in 2012.

Palin was quoted as saying, "Some are going to question the timing of this."

Gee, ya think?


By leaving office early, Ms. Palin, a 45-year-old mother of five, will be able to travel around the country more freely and not be constrained by the duties and responsibilities of being a governor.


Excuse me? She doesn't want to be constrained by duties and responsibilities? And she wants to run for president? I wonder, will she resign the presidency mid-term because the duties and responsibilities of that office make her miss out on all the good shoe sales at Bloomingdales?

Good grief.

Wednesday, July 01, 2009

Say what?

From the twisted mind of Fox news comes this mind-bending pretzel of twisted logic:


Michael Scheuer : The only chance we have as a country right now is for Osama Bin Laden to deploy and detonate a major weapon in the United States because it's going to take a grass-roots bottom-up pressure because these politicians prize their office, prize the praise of the media and the Europeans ... it's an absurd situation again: only Osama can execute an attack which will force Americans will demand that their government protect them effectively, consistently, and with as much violence as necessary.

Glen Beck: If I were him that would be the last thing I would do right now.


So let me get this straight: According to them, we're in a situation where we're safe from everyone except Osama Bin Laden, and it's in Osama's strategic interests not to attack us.

And they see this as a problem? The only chance we have is for Osama to deploy a major weapon? Which he probably won't do? And this is somehow bad? Un fleepin' believable.