Recursive grepping

Sometimes you just need to grep recursively in a directory. If you’re using find $somedir -type f -exec grep $somestring {} \;, don’t:

Use xargs to avoid creating a bazillion grep processes:
find $somedir -type f -print | xargs grep $somestring

But spaces in the output of find (i.e., spaces in filenames) will confuse xargs, so use -print0 and xargs -0 instead:
find $somedir -type f -print0 | xargs -0 grep $somestring

Except that you can achieve the same effect with find, with \+:
find $somedir -type f -exec grep $somestring {} \+

Or you can just use recursive grep:
grep -r $somestring $somedir
except that find allows you to filter by file type, name, age, etc.

Basics: I Didn’t Decide to Be an Atheist

I occasionally hear people say things like “If you choose to be an atheist, that’s fine. It’s your decision and I respect that” (or, from less-tolerant people, “if you choose to be an atheist, don’t be surprised when you suffer the consequences”).

This bugs me because, in fact, I did not choose to be an atheist. This is a basic point, and will come as no surprise to many atheists, but I feel it needs to be underscored. This was not a choice I made.

I was born into a Russian Orthodox family, and grew up believing in God and Jesus. I learned all the usual (bowdlerized) Bible stories, went to mass, occasionally went to Sunday school when our schedule permitted. I had religious instruction class in Swiss public school. I spent my summer vacations at Russian scout camp, an explicitly religious organization.

What’s more, as the son of people who had fled the Soviet Union, I heard all sorts of horror stories about razed churches, enforced atheism, and so on. When I read the Communist Manifesto in High School, I went in with the express intention of finding the flaws in Marx’s and Engels’s reasoning and tearing it apart.

But I also grew up reading Heinlein and Clarke and Asimov (both fiction and nonfiction) and Martin Gardner’s mathematical games, and watching Carl Sagan’s Cosmos on PBS. I learned that the world was full of magnificent things, and all you needed to do was look for them. Heck, you did’t even need to get up from your chair, not with mathematical wonders like Pascal’s Triangle and fifteen-dimensional spaces. Notably, somewhere between High School and college, I read Richard Feynman’s You Must Be Joking, Mr. Feynman and learned the difference between understanding a thing, and merely knowing its name; and that a teacher who can’t explain a concept in such a way that you can understand is not a good teacher.

And through it all, I kept trying to figure out this whole God thing. Evolution didn’t pose any problem, because obviously the god of the entire immensity of space and time would work on a grand and epic scale, and would think nothing of letting things run for millions or billions of years. I worked out for myself that prayer was pointless, because God already knew what I wanted, and had a much better idea than I did of what was best. He also didn’t mind me thinking for myself. Or if he did, he never said anything.

Hell obviously couldn’t be forever: I had a pretty good idea of the difference between mind-bogglingly huge numbers and infinity, and there was no way that even someone like Stalin deserved an infinite amount of punishment (though I did play around with convergent sequences and the idea of an eternity of ever-diminishing torment, so that total suffering converged on a finite amount). Famous Bible stories like Adam and Eve, Noah’s ark, the parting of the Red Sea, and so forth had to be instructional myths or allegories, since they resembled Greek myths far more than scientific or historic accounts. I’d read Jesus’ instruction not to engage in vain repetition in the book of Matthew in some hotel Gideon Bible; this immediately brought to mind a way that Orthodox priests chant “Lord have mercy” over and over during mass (and forty times at Easter mass), and undermined my faith in that institution.

I did this not because I wanted to disbelieve the Bible, but because I wanted to get at the truth. But little by little, I had to discard bits and pieces of the religion I’d grown up with. At the time I would have said I was moving from a child’s understanding of God to a more mature, adult theology.

I went through what I now think of as a deist phase, partly because there was no good evidence of divine intervention, and partly because from a divine perspective, setting up the initial conditions of the universe and then standing back and letting it unfold seemed most elegant.

I went through a Taoist phase, which (I thought at the time) was even more elegant because the Tao wasn’t even a being, a mind bolted onto the universe, but was more like an emergent property of, well, not just the universe, not just a multitude of possible universes popping in and out of existence, but of The Way Things Must Be.

And eventually I stumbled on alt.atheism on Usenet, and read its FAQ, which defined atheism simply as the absence of belief in God.

It would take a while longer, but eventually I realized that that definition applied to me. That in trying to figure out who and what God was, what he wanted, and his relationship with the universe, I’d stopped believing in him without even noticing. And that all that faffing about with Taoism was a delaying tactic, an attempt to have some sort of religion because it never occurred to me that I didn’t have to have one.

I wasn’t happy about this. After all, the word “atheist” conjured images of Stalinist purges and priests sent to work themselves to death in Siberia. But at the same time I couldn’t lie to myself and tell myself I didn’t fit the definition, when I clearly did.

The point is that I didn’t decide to be an atheist. If I had, I would have stepped back as soon as I realized what I’d done. Rather, after spending years thinking about the problem and examining it from all sides, I’d come to the only conclusion I could. And so, I had to expand my definition of “atheist”, to cover not only communist priest-murderers, but also myself. It didn’t take too long to come to terms with the word.

If you’re still reading this, then the main point that I’d like you to take away from this is that you don’t have to have a religion. If you’re looking around, trying to figure out which religion is right for you, you do have the option of saying “none of the above” or “none”, and of staying there for as long as you like, either until you find one that fits you, or forever.

The second point is that if God is indeed good and wise and loving, then how can he punish you for honestly examining your beliefs and how they mesh with the world?

And finally: you can lie to other people. You can even lie to your parents if you have to. But don’t lie to yourself.

(Update, Feb. 18: Is this autobiography week or something? Roger Ebert has a new post similar to this one.)