Monday, June 3, 2013

Korach's Postmodern Tallis

(This dvar Torah is in memory of Tatyana bat Azriel, my mother-in-law of blessed memory, whose yahrzeit is today.)

In the beginning of this week’s parsha, Parshat Korach, the Torah introduces Korach as the son of Yitzhar, the son of Kehat, the son of Levi.  Levi, of course, is the son of Yaakov, but the Torah neglects to mention that.

Rashi says that this is the fulfillment of Yaakov’s prophecy that he declares on his deathbed.  In reaction to the attack on Schem carried out by Shimon and Levi, Yaakov declares, “may my honor not be mentioned in their congregation.”

Is Rashi hinting at a deeper connection between the attack on Schem and the rebellion of Korach?

The rebellion of Korach against Moshe Rabbenu is the paradigmatic story of the refusal to accept authority.  The attack on Schem also represents a refusal to accept authority.  Instead of carrying out such a significant act on their own, an act with drastic implications for the family, Shimon and Levi should have consulted their father, our forefather Yaakov, who was surely the rightful authority at the time.

The midrash records a pair of strange halachic discussions between Korach and Moshe Rabbenu.

First, Korach asks Moshe, "If a cloak is made of 100% pure techelet, does it still need a techelet thread on the tzitzit?"  Moshe answers yes, and Korach ridicules him.  "With all that techelet in the cloak itself, why does it need more?"

Second, Korach asks Moshe, "If a room is filled with sifrei Torah, does it still need a mezuza?" Moshe answers yes, and Korach ridicules him.  "With all those psukim already in the room, why does it need more?"

These are strange questions.  The midrash usually assumes that Korach is learned and intelligent.  What is Korach's hava amina?  Why would he think that the composition of a garment changes the requirement for tzitzit, or that the contents of a room changes the requirement for a mezuza?

This midrash tells a story of Korach making fun of Moshe Rabbenu.  In the midrash, Korach poses as a clever satirist.  But maybe Chazal are the real satirists.  Maybe Chazal are putting these words in Korach's mouth as a way of making fun of Korach.

In the Torah, Korach says, "The entire nation is holy.  Hashem is with them.  Why do you, Moshe and Aharon, suppose to raise yourselves above them?"  Chazal reply to Korach's argument by comparing the Jewish People to a cloak made of techelet, or a room full of books.  The cloak is made of techelet, but of course it still needs a techelet thread in the tzitzit.  So too, all Jews are holy, but of course we still need Torah authorities.

A Kezayit of Bracha

The third bracha of the birkat kohanim is, "May Hashem raise His face to you and give you peace."  (Bamidbar 6:24 - 6:26)  The Gemara (Brachot 20b) says that the angels objected to this bracha.  They pointed out that elsewhere in the Torah, it says that Hashem "does not raise his face (that is, show favoritism) or accept bribes."  (Dvarim 10:17)  Hashem replied, "In the Torah, I commanded the Jewish People to say the birkat hamazon when they eat and are satisfied.  However, they say birkat hamazon after any meal in which they eat a kezayit of bread, even if they are not satisfied.  How can I not show them favoritism?"

This aggada draws a connection between the birkat kohanim and birkat hamazon.  What is the meaning of this connection?

What does it mean that we say a bracha after eating an olive size of bread, even if we are not satisfied?  It means that even if we are not satisfied with everything in our lives, or in the world, we still thank Hashem for every kezayit of bracha that He gives us.  In response, Hashem focuses on every kezayit of mitzvot that we do, even though He may be unsatisfied with many aspects of our behavior.

Monday, December 3, 2012

Google Brain Search: A Science Fiction Story by MC Complete


As I walked into the stairwell, I suddenly realized that I didn’t remember where I had parked in the morning.  So I took out my Android phone and opened the application “Google Brain Search”.

Google Brain Search is like Google Search, but instead of searching the internet, it searches your memories.  I typed in “car” as my search term and clicked on the checkbox that said “Show most recent results first”.

The first result read: “Parking my car in the morning.”  Achievement unlocked!  I clicked on the link.  My phone showed a message that said, “Please wait while we load the memory.”

After a few seconds, it happened.  I flashed back to the morning, when I drove slowly through the fourth floor with no open spots, and then saw many open spots on the slope between the fourth and fifth floor.  On the left side, there were two open spots between the white pillars.  I maneuvered awkwardly into the spot on the left, narrowly managing to park between the lines.

As I walked down the stairs to the fourth floor, I thought to myself, “Google Brain Search.  How did we ever live without it?”

Tuesday, November 13, 2012

Our Bodies, Our Souls, Part 2: Body Language

As far as I can tell, there is no word for “body” in Biblical Hebrew.  The word for body in modern (and Rabbinic) Hebrew is “guf”.  The word “guf” appears only twice in the Tanach, in Divrei Hayamim, and it means “corpse”, which is not exactly the same thing.  (Maybe the Tanach has another word for body, but if it does, I’m not aware of it.)

Souls, on the other hand, are all over the place in Tanach.  (The Tanach has three words for soul: neshama, nefesh and ruach.)

Our Bodies, Our Souls, Part 1: The Real Slim Shady

Two of the first of the Jewish morning prayers are “Asher yatzar” and “Elokai neshama”.  Some prayer books place them one after the other, and some prayer books insert the the blessings of the Torah in between.

“Elokai neshama” is about the soul, and “asher yatzar” seems to be about the body.  “Asher yatzar” is ostensibly about Man: it begins “Blessed are You, Hashem our God, King of the universe, Who created Man with wisdom.”  The blessing is not about the wisdom that is or is not obtained by human beings, but rather the Divine wisdom showcased in the design of the human body.

There’s a funny thing about “Elokai neshama”.  “The soul that you gave me is pure...in the future, you will take it from me...later, you will return it to me...” the soul is a gift that God gave to me.  So who am I?  Apparently, “I” am a body that happens to possess a soul, not a soul that happens to possess a body.  The Real Slim Shady is Slim Shady’s body, not Slim Shady’s soul.

“Asher yatzar”, the blessing of the body, reinforces this point.  God created Man.  What is “Man”?  Man is a magnificent, organic machine--a body.  I am a human being; a human being is a body; I am a body.

Tuesday, October 23, 2012

MC Complete's Guide for the Perplexed, Part 1: Prayer

Daniel: I don’t get this whole prayer business.

Isaac: Prayer is praise, requests, and thanks.  What is there not to get?

Daniel: What about the requests?  What is the sense in asking Hashem to do things for me?  Doesn’t He already know what I want?

Isaac: Yes, he knows what you want.  But most of the time, you don’t ask for the things you want.

Daniel: I don’t?  What do you mean?

Isaac: Every Jew has his own specific set of desires.  But we all say the same Shmone Esrei.

Daniel: That may be, but how does that solve anything?  Doesn’t Hashem know what I’m going to say?

Isaac: Of course not.

Daniel: What?  What do you mean?

Isaac: Hashem knows the text of the Shmone Esrei very well.  He knows it by heart.  But he doesn’t know whether you are going to say it.

Daniel: Wait a minute.  Are you saying that God doesn’t know the future?

Isaac: No, it has nothing to do with that.  All I mean to say is that if you say the Shmoneh Esrei you say it, and if you don’t say it, you don’t say it.  God’s knowledge of the future, as well as His knowledge of the text, is irrelevant.

Daniel: Are you saying that Hashem want me to pray so that I focus on the needs of the community rather than my own?

Isaac: Exactly.  Better to pray for the needs of the community and take care of yourself, than to pray for your own needs and take care of the community.

Daniel: OK fine, let’s take one of the blessings of the Shmoneh Esrei.  Let’s take Refaenu.  In Refaenu, I ask Hashem -- we all ask Hashem -- to heal the sick Jews.

Isaac: Right.

Daniel: Does my prayer make it more likely that Hashem will heal the sick Jews?

Isaac: Hashem will heal the sick Jews.  We know that for certain.

Daniel: Well, I suppose we know (almost) for certain that He will heal some, but we also know for certain that He won’t heal them all, at least until the Moshiach comes.

Isaac: And maybe not even then.

Daniel: OK, so does my prayer make it more likely that a greater percentage of the sick Jews will be healed?

Isaac: We don’t know.

Daniel: I mean, on what basis does Hashem decide what percent will be healed?  What factors enter into these kinds of decisions?  What motivates Hashem?  What is He trying to achieve?  Why did he make people sick in the first place?

Isaac: We don’t know.

Daniel: So what is the significance of my prayer?

Isaac: Hashem cares about you.  You are asking Him to heal the sick Jews.  He will decide what percentage, based on His own calculations.  That’s all we know, and all we need to know.

Daniel: OK, I don’t know if you answered my question, but you certainly confused me enough that I no longer remember what my question was.

Tuesday, October 16, 2012

Mocks: A Guest Post by Zach Lloyd

So, you wrote a test that uses mocks where you could have used real dependencies...

I have a few major issues with this style of test:

  • It tests implementation, not behavior.  Why should a test care what methods are called within a function being tested so long as the function behaves in accordance with its contract?  With these kinds of tests it’s often possible to change a function to use a completely equivalent implementation, and yet the test fails after the change.  In the extreme, test cases like this end up purely mimicking the implementation of the method under test (e.g. if the method being tested calls x(), y(), z() on its dependency, then you will see that exact same sequence of calls in the mock setup).  This ends up testing nothing at all.
  • You can't even write a test with mocks like this without looking into the implementation of the class under test, which adds a lot of complexity to test writing and maintenance.
  • It takes me a non-trivial amount of mental effort to read one of these test cases with mocks -- much more than reading regular code.
  • I've never believed the argument that it's somehow bad to test real code.  Unless the dependency is truly on something that's hard to test reliably (like a network), I think you absolutely should be testing the real dependency by default.  I know the testing people disagree with this, but I don't particularly care.  The tests should be on an environment as similar to the real application as possible IMO.

I do feel pretty strongly that tests that use mocks like this are bad, but I'll leave it up to you whether you want to change it.