Sunday, January 15, 2012

The Joys of Parenting

It started Thursday night. I've been fighting off the same chest cold that sent Calista to the doctor's office New Year’s Day, so before I went to bed, I took a couple NyQuil to help me sleep. About 1:00 am, I woke out of a drug-fogged sleep to find our four-year-old son Caedmon crawling into our bed. That wasn't unprecedented, but it's not normal either. I was groggy enough that I decided to cut him some slack, so I put up with him squirming and kicking me for 15 minutes or so before finally deciding that no, he had to go back to his own bed. So I picked him up and carried him back to his room. I was setting him down into his bunk bed when I noticed a strong sour smell in the air, and simultaneously felt my hands plunge into a wet, sticky substance covering his blankets. My brain took a few seconds to put it all together and draw some conclusions. Then I sighed and picked him up and carried him back into our room. We made a bed for him on the floor, got a bowl from the kitchen, and put him down, hoping that would be the end of it.

About 20 minutes later, we were awoken again, to the sound of Caedmon gagging. Most of it made it in the bowl, but by no means all of it. More cleanup and consoling. Then something like sleep, more gagging, more cleanup, more consoling. This repeated itself all night long, every 20 minutes or so, until about 5:00 am, when Caedmon finally managed to get to sleep and stay asleep. About the same time, I removed myself to the couch downstairs, and got an hour or so of rest.

When we woke up, we let Caedmon continue to sleep in our bed, and Galena began cleaning his room. Our one-year-old daughter Calista wasn't making any noise, so we let her sleep, while I tried to entertain our two-year-old son, Brendan. By 8:30 or so, though, Galena decided that she really needed to check on Calista. When she opened the door, she got a full whiff: turns out Calista had been having the same troubles, but had suffered them all in complete silence. (We even had the baby monitor on!) So her crib, her blankets, and her hair was encrusted with not-quite-dried puke. Calista herself was surprisingly calm about the whole thing, and gave us a big grin as we gingerly tried to extract her from the Crib of Dried Vomit.

After that, Friday and Friday night passed more-or-less without event. On Saturday morning, we thought we'd seen the worst of it, and since the kids were begging to go outside and play in the snow, we got them dressed and spent some time outdoors. (Caedmon discovered that it's painfully tricky to ride your bike in the snow; Brendan and Calista discovered, once again, that your hands get cold and hurt when you play in the snow and refuse to wear gloves.)

But Saturday afternoon, Calista started having a variety of diarrhea episodes, including at least one "Level 3 Containment Failure" (I'll leave the exact definition of that to your imagination). And then Galena started looking green around the gills. And then she threw up. And then the other end as well. Rinse and repeat.

So Galena took herself to bed, while I did my best to entertain the kids. Caedmon and Calista were definitely feeling better, but were still a little stunned after their run-in with the Stomach Bug That's Going Around. Brendan seemed to have a stainless steel immune system, however, and wasn't going to let anything slow him down. (And you have to remember, through all this, that I've got a cold too, and periodically feel like I'm about to hack up a lung.) When evening rolled around, I finally got the kids fed and down to bed, and all seemed quiet. So I checked in with Galena, who was still in bed, and then left for Bellevue, for a movie night with some friends that had been long planned (and for which I was supposed to supply the movie).

I got a call from a groggy-sounding Galena around 8:30. "Brendan just threw up," she said, sounding on the verge of tears. "Can you come home?" By 9:00 pm or so, I was thus available to make myself the target for Brendan's third heave of the evening. After several more abortive attempts to get Brendan to sleep, I gave up, and for an hour or two, he sat on my lap with a bowl in his hands. We passed the time by watching extreme skiing videos off of YouTube (at Brendan's request). We'd pause the video - or sometimes not - whenever Brendan started heaving, then I'd wipe his mouth, and we'd start watching the video again. It was oddly bonding. By midnight, the worst had passed, and I put him to bed.

I should note that during all this, my side of the bed had gotten nailed with at least one round, so I elected to spend the rest of the night in the guest bed in the library. Galena's side was relatively clean, and more than that, she was too tired to care.

I got up around 7:30 this morning to find Brendan and Caedmon in great spirits: they weren't up to the Running and Chasing Game, precisely, but they were quarreling normally and demanding books and juice and videos. But by 9:00 am, when Calista still hadn't made any noise, I decided to check on her. Turns out that (once again) she'd been having the same trouble as everyone else, but (also once again) hadn't complained to let anyone know about it. The carpet around her crib, her bedding, her hair, and the outside of her pajamas were covered with one particularly noxious substance; the inside of her pajamas, and most of her body, was covered with a different one, surprisingly similar in texture and smell, and equally objectionable. Even after I gave Calista a shower, Galena was still combing unidentified chunks out of her hair.

That brings us up to the present. I'm the only one who hasn't gotten the bug yet, but I can feel it circling warily at a distance, like a pack of wolves preparing for the attack. We've basically decided that all the normal household rules and routines are out the window. The kids are watching videos and drinking juice and eating pretty much whenever and whatever they want. Galena informs me that Calista has just fallen asleep in the hallway. Brendan and Caedmon have scattered a box of paper clips around my office, and I can barely bring myself to care. Civilization and discipline has given way to raw survival.

Wish us luck.

Friday, November 4, 2011

My favorite C# micro-optimizations #2: 1D Arrays

This is my second post on my favorite C# micr0-optimizations. Everything I said in the first post applies to this one as well, namely, don’t optimize until you know that you need to; and spend most of your optimization budget optimizing the algorithms, rather than figuring out which way to access an array is faster.

That said, this was a surprise to me: jagged arrays (e.g., arrays of arrays) are much faster than rectangular arrays: but indexed access into a 1D array is faster yet.

In other words, this is relatively slow:

   1:  for (int x = 0; x < size1; x++)
   2:  {
   3:      for (int y = 0; y < size2; y++)
   4:      {
   5:          result = twoDArray[x, y];
   6:      }
   7:  }

This is significantly faster:

   1:  for (int x = 0; x < size1; x++)
   2:  {
   3:      for (int y = 0; y < size2; y++)
   4:      {
   5:          result = jaggedArray[x][y];
   6:      }
   7:  }

But this is the fastest:

   1:  for (int x = 0; x < size1; x++)
   2:  {
   3:      for (int y = 0; y < size2; y++)
   4:      {
   5:          result = oneDArray[x * size2 + y];
   6:      }
   7:  }

Benchmark results on my machine (1000 iterations through a 1000x1000 array):

2DArrayTest action completed: iteration = 5, completionTime = 3111, averageCompletionTime = 3101.400
JaggedArrayTest action completed: iteration = 5, completionTime = 2283, averageCompletionTime = 2256.000
1DArrayTest action completed: iteration = 5, completionTime = 1698, averageCompletionTime = 1638.800

It’s also very much worth noting that the order in which the iteration happens is important. Sequential memory access is faster than purely random memory access, most likely because data is fetched from main memory to the CPU’s cache in chunks, so that subsequent sequential reads are from cache.

In other words, if instead of this at the center of each loop:

result = jaggedArray[x][y];
result = twoDArray[x, y];
result = oneDArray[x * size2 + y];

We switch the order of the indexes, so that memory is accessed out-of-order (this is called “diagonal access”):

result = jaggedArray[y][x];
result = twoDArray[y, x];
result = oneDArray[y * size1 + x];
Then the tests take more than twice as long:

JaggedArrayTest action completed: iteration = 5, completionTime = 7499, averageCompletionTime = 7676.400
2DArrayTest action completed: iteration = 5, completionTime = 6790, averageCompletionTime = 6818.600
1DArrayTest action completed: iteration = 5, completionTime = 5862, averageCompletionTime = 5883.200

It’s interesting that in a diagonal access pattern, rectangular arrays are indeed faster than jagged arrays: but one-dimensional arrays are still the fastest.

Thursday, November 3, 2011

My favorite C# micro-optimization #1: Buffer.BlockCopy()

So a caveat first-off. Micro-optimizations are evil. You almost never need them. You can live the vast majority of your life as a programmer and never use them; and most of the time you use them, you’re going to use them incorrectly. If your program is running slow, you’ll almost never find some tiny little micro-optimization that will fix it.

But there are times when they’re handy, and with all the work I’ve been doing the last couple years on a custom Silverlight media stack, I’ve had a number of opportunities to learn about how to speed up code that gets called thousands of times each second. This series of articles is the result of that experience.

And my first suggestion is to use Buffer.BlockCopy() when you need to move data in and out of arrays. You don’t normally need to do this very heavily, but when you’re dealing with real-time multimedia, you’ll find yourself doing it all the time, so the faster you can do it, the better.

I mention this because a common way to move data from one array to another is through a for loop, like so:

   1:  for (int i = 0; i < sourceArray.Length; i++)
   2:  {
   3:      destinationArray[i] = sourceArray[i];
   4:  }

Unfortunately, that’s very nearly the slowest way to do it. (Array.Clone() is actually slower, but that’s another story.) A much better way to do it is to use Array.Copy(). Indeed, this is normally the preferred method, since you don’t have to worry about the size of the individual elements, which is an easy place to mess up. Moreover, Array.Copy() works for arrays of any type, instead of just intrinsic value types.

   1:  Array.Copy(sourceArray, 0, destinationArray, 0, sourceArray.Length);

But as it turns out, Buffer.BlockCopy() is slightly faster for many operations, since it doesn’t have to perform certain checks at the beginning of the copy:

   1:  Buffer.BlockCopy(sourceArray, 0, destinationArray, 0, sourceArray.Length * sizeof(short));

Benchmark results on my machine (10 million copies of a 64-element short[] array):

Buffer.BlockCopy action completed: iteration = 5, completionTime = 420, averageCompletionTime = 422.000
Array.Copy action completed: iteration = 5, completionTime = 478, averageCompletionTime = 482.600
forLoop action completed: iteration = 5, completionTime = 1092, averageCompletionTime = 1093.000

That said, the difference between Array.Copy() and Buffer.BlockCopy() tends to disappear the larger the amount of data to copy (while a for loop falls further and further behind). If you’re copying 64,000 elements instead of 64 elements, these are the results:

Buffer.BlockCopy action completed: iteration = 5, completionTime = 1251, averageCompletionTime = 1229.000
Array.Copy action completed: iteration = 5, completionTime = 1254, averageCompletionTime = 1218.200
forLoop action completed: iteration = 5, completionTime = 11063, averageCompletionTime = 11082.200

But there’s one significant caveat: if you only need to move a few elements, even the minimal overhead of Buffer.BlockCopy() can be too much. If you need to move less than 32 elements, you’ll probably find that a straightforward for loop (or perhaps an unrolled version of it) is the fastest. Of course, you’ll want to do your own testing to find out where the break-even point is. But here are my results with 1,000,000 copies of a 16-element array:

Buffer.BlockCopy action completed: iteration = 5, completionTime = 367, averageCompletionTime = 363.800
Array.Copy action completed: iteration = 5, completionTime = 418, averageCompletionTime = 420.000
forLoop action completed: iteration = 5, completionTime = 291, averageCompletionTime = 290.000

Tuesday, November 1, 2011

Fast (approximate) Sqrt method in C#

As part of the video codec that Alanta uses, we need to calculate the variation between blocks in one frame and the equivalent blocks in the next frame. I’ve been using an algorithm proposed by Thiadmer Riemersma that looks something like this:

public static double GetColorDistance(byte r1, byte g1, byte b1, byte r2, byte g2, byte b2)
{
    int rmean = (r1 + r2) / 2;
    int r = r1 - r2;
    int g = g1 - g2;
    int b = b1 - b2;
    int weightR = 2 + rmean / 256;
    const int weightG = 4;
    int weightB = 2 + (255 - rmean) / 256;
    return Math.Sqrt(weightR * r * r + weightG * g * g + weightB * b * b);
}

It works pretty well, but that last step depends on a square root calculation, which is relatively slow; and when this is something you need to run on every pixel in a frame, you want it to be as fast as possible. Consequently, I’ve been looking at ways to optimize it.

The important thing to note is that for my purposes, close is good enough: I don’t need IEEE precision. It turns out that there’s a pretty good approximation that’s available in languages like C or C++ which let you do unsafe casts back and forth between ints and floats:

float sqrt_approx(float z)
{
    union
    {
        int tmp;
        float f;
    } u;
    u.f = z;
    u.tmp -= 1 << 23; /* Subtract 2^m. */
    u.tmp >>= 1; /* Divide by 2. */
    u.tmp += 1 << 29; /* Add ((b + 1) / 2) * 2^m. */
    return u.f;
}
The problem with this approach is that C# doesn’t normally let you play this kind of magic.
The key word being “normally”, of course.
Turns out there’s one trick you can use to make C# treat the same memory address as either an int or a float, and that’s to create a struct with a [StructLayout(LayoutKind.Explicit)] attribute. (And surprisingly enough, the trick works in Silverlight as well.) The resulting class looks like this:
public class Approximate
{
    public static float Sqrt(float z)
    {
        if (z == 0) return 0;
        FloatIntUnion u;
        u.tmp = 0;
        u.f = z;
        u.tmp -= 1 << 23; /* Subtract 2^m. */
        u.tmp >>= 1; /* Divide by 2. */
        u.tmp += 1 << 29; /* Add ((b + 1) / 2) * 2^m. */
        return u.f;
    }

    [StructLayout(LayoutKind.Explicit)]
    private struct FloatIntUnion
    {
        [FieldOffset(0)]
        public float f;

        [FieldOffset(0)]
        public int tmp;
    }
}
The results are pretty good: it’s more than twice as fast, and the results tend to be within 2% of the “real” answer:

MathSqrtTest: averageCompletionTime = 2424.000
ApproxSqrtTest: averageCompletionTime = 1058.000
Average variation: 0.0253587081881525

If you want a bit more accuracy at the cost of an additional CPU cycle or two, you can use this one, based on the famous inverse square root method in Quake 3:

public static float Sqrt2(float z)
{
    if (z == 0) return 0;
    FloatIntUnion u;
    u.tmp = 0;
    float xhalf = 0.5f * z;
    u.f = z;
    u.tmp = 0x5f375a86 - (u.tmp >> 1);
    u.f = u.f * (1.5f - xhalf * u.f * u.f);
    return u.f * z;
}
It’s a tad slower than the first (though still nearly 2x as fast as Math.Sqrt()), but much more accurate:

MathSqrtTest: averageCompletionTime = 2428.400
ApproxSqrt2Test: averageCompletionTime = 1361.000
Average variation for method2: 0.000928551700594071

Sunday, September 25, 2011

Dead to Sin, Alive to Christ

Today was our last Sunday at Overlake Park Presbyterian Church. Three weeks ago, we made it public that we’d decided to begin attending a church closer to our house. This was a hard decision to make, and even harder to tell everyone about. Folks at OPPC have welcomed us warmly for the last seven years, and they love our kids. But it was nearly a half hour drive to church, and we decided that for our kids’ sake, we needed to belong to a church that was closer to home. So today we said goodbye. In a rather astonishing show of good will, they asked me to preach; and this is what I came up with.

Introduction

Many stories in the Bible evoke a sense of crisis, of paths diverging forever, of profound, world-changing events turning on the smallest details. God’s selection of Abraham. Moses hidden in the reeds. The sound of a horn at Jericho. The voice of an angel in Mary’s room. One of the most important examples of small details that change the course of history is found in the words that the risen Jesus spoke to Saul of Tarsus, when He met him on the road to Damascus. “Saul, Saul,” Jesus said, “why are you persecuting me?”

We’ve heard those words so many times that we often miss their significance. To put them into perspective, ask yourself the question, “Who was it that Saul had thought he was persecuting?” Because of course, Saul hadn’t been intending to persecute Jesus at all. As far as Saul knew, Jesus was dead and buried, and good riddance. Saul had been harassing Jesus’ followers precisely because Jesus wasn’t around to bother with. But that day, when Saul fell blinded onto the ground, Jesus didn’t say, “Saul, why are you persecuting my followers?” He said instead, “Saul, why are you persecuting me?”

We all know the rest of the story. As a result of his archetypal “Damascus road experience,” Saul became a Christian. He disappeared from sight for some years. And when we hear from him next, he is already an apostle and a missionary, proclaiming loudly and eloquently the story of Jesus’ life and death. But Paul is also doing something else that is quite interesting. He’s not just telling the story of Jesus: he’s telling us what the story means. Because, after all, that story is a little ambiguous, isn’t it? I mean, so there was this Jewish rabbi from Galilee who caused a bit of a stir, and stirred up a bit of trouble, and ran afoul of the establishment, and ended up tortured to death at the hands of a police state. His followers claimed that this rabbi had come back from the dead, but even if that was true, well, so what?

It’s precisely that “so what” which interested Paul. And for Paul, the key to understanding the significance of Jesus’ life, death and resurrection lay in those first words from Jesus’ mouth: “Saul, Saul, why are you persecuting me?” Because those words tell us, as they told Paul, that those who follow Jesus are not just well-meaning disciples of some Jewish rabbi. On the contrary, those followers are Jesus, and when Paul was persecuting them, he was actually persecuting Jesus Himself. And if that is true, something big and entirely unexpected is afoot.

The Cross

In his letters, Paul develops this initial insight in a variety of different ways. One of them is through his familiar image of the Church as the Body of Christ. To the Corinthians Paul wrote, “Now you are the body of Christ, and each one of you is a part of it” (1 Cor. 12:27). And to the Romans, similarly, “For just as each of us has one body with many members, and these members do not all have the same function, so in Christ we, though many, form one body, and each member belongs to all the others” (Rom. 12:4-5).

As the poet Gerard Manley Hopkins put it,

the just man...
Acts in God’s eye what in God’s eye he is—
Chríst—for Christ plays in ten thousand places,
Lovely in limbs, and lovely in eyes not his
To the Father through the features of men’s faces

The other way Paul develops this insight may be a little less familiar to us, though it is perhaps even more important. Paul says that when Jesus suffered and died on the cross, we ourselves, the Church, were right there with him. “Do you not know,” he asks in today’s passage, “that whoever has been baptized into Christ Jesus has been baptized into his death?” (Rom. 6:3). “I am crucified with Christ,” he writes to the Galatians, “and I no longer live, but Christ lives in me” (Gal. 2:20). And in the same way, we were somehow present in Christ at the moment of His resurrection. “We were therefore buried with him through baptism into death in order that, just as Christ was raised from the dead through the glory of the Father, we too may live a new life” (Rom. 6:4).

But what exactly does this mean, to be “crucified with Christ”? And why have Christians always believed that the cross was at the heart of Christianity?

To put this into perspective, if you were a Muslim, the symbol of your religion would be a crescent moon.  If you were a Buddhist, the symbol of your religion would be a lotus flower.  If you were a Jew, the symbol of your religion would be a six pointed star.  These all symbolize things like beauty, grace and life. But as Christians, our emblem suggests nothing like that.  Our emblem is the cross, a crude but effective method of execution invented by the Romans for the gruesome purpose of convincing would-be criminals that whatever they were contemplating, it just wasn't worth it.  The symbol of Christianity is a symbol of ugliness, suffering and death.  Why?  Why do all other religions have as their symbols something reminiscent of light and beauty, yet Christians insist on exactly the opposite?

I certainly don’t have a complete answer. But it’s worth noting that this theme of death and resurrection was not merely a Christian invention. On the contrary, it has been the refrain of the great myths and stories throughout history. The Babylonians told the story of how Gilgamesh sought and failed to find the secret of immortality after the death of his best friend. The Egyptians told the story of how Osiris was brought back to life after his body was cut into 14 pieces and scattered across the earth. The Greeks told of Persephone, and how she was abducted by the king of the underworld, and then returned to the earth again after her mother cut a deal with the gods. Perhaps most remarkably, Nordic legends tell of how Odin, the chief of the gods, sacrificed himself to himself, by piercing his side with a spear and then hanging himself on the holy tree at the center of the world.

Beyond those legends, science tells us much the same story. According to the theory of evolution, life arose through pain and suffering and sacrifice. Think of how many different systems in your body need to work perfectly, just to keep you alive. Then think about how many random genetic mutations were required to arrive at those perfectly functioning systems: and how many thousand times more mutations failed, and left the organisms who inherited them vulnerable to accidents, predators and sickness. You and I have life only because untold billions before us suffered and died. Our bodies work because their bodies didn’t. You might very well say, “By their stripes we are healed.”

In other words, a life that comes through death is at the beating heart of our world. So when we see the same pattern in Christianity, we shouldn’t be surprised. Life followed by death followed by new life is not just an abstract doctrine: it’s as close as we can come to reality itself. As George MacDonald put it, “When Jesus died on the cross, He did that, in the wild weather of his outlying provinces, which he had done at home in glory and gladness.”

Crucified with Christ

So then: Christians have chosen the cross as their emblem, because we believe that it gives expression to the fundamental reality underlying the universe. As Paul said, “We preach Christ crucified: a stumbling block to Jews and foolishness to Gentiles, but to those whom God has called, both Jews and Greeks, Christ the power of God and the wisdom of God” (1 Cor. 1:23-24). But again I ask: what does this mean? So we are somehow united with Christ in his death and resurrection; and Christ’s death and resurrection somehow shows who God is in a way that nothing else could. But what does that mean? What is its significance? Does believing this actually change anything?

This is a profound question, and I don’t think we can do anything more than touch on it today. But it’s worth noting three things.

#1 – This is God’s Life

The first is that Jesus tells us that it’s only by conforming to this pattern that we can partake of the life that He came to bring. In Luke 9:23, Jesus says, “Whoever wants to be my disciple must deny himself and take up his cross daily and follow me. For whoever wants to save his life will lose it, but whoever loses his life for my sake will save it.” I don’t think that Jesus is saying, “Unless you’re willing to sacrifice yourself, you’re not good enough to be a Christian.” Rather, I think he means that sacrificing ourselves is what the Christian walk looks like. We partake of the life that God offers us precisely to the extent that our lives resemble God’s Life; and that Life is a life of love, and therefore of sacrifice. The same is also true of another difficult saying of Jesus: “Whoever wants to become great among you must be your servant, and whoever wants to be first must be the slave of all. For even the Son of Man did not come to be served, but to serve, and to give his life as a random for many” (Mark 10:43-45). The requirement that we serve others is not an arbitrary standard, a line which God drew in the sand but which could have been drawn elsewhere; rather, the requirement of service expresses certain unalterable facts about God’s own nature.

#2 – This is forgiveness

The second thing to note has to do with forgiveness. For both to ask and to receive forgiveness is a kind of death. In the Lord’s Prayer, we pray, “Forgive us our debts, as we forgive our debtors.” Again, it’s not that God won’t forgive us unless we forgive others; it’s that we can’t truly repent, and ask for that forgiveness, until we ourselves have learned to extend it.

I’ve had a pretty good life, and I can only think of one instance where someone has done me a significant and genuine injustice. I was angry about that injustice for years; and if you get me talking too much about it, you’ll find that I still am. It’s very true, of course, that my anger, and my lack of forgiveness, isn’t hurting anyone except me. But it is hurting me, and it’s hurting me precisely because that part of me doesn’t want to die. I want to hold on to my rights, I want to insist on what’s coming to me. And to the extent that I’m not dying to myself, to the extent that I’m continuing to hold on to my natural life, I simply can’t participate in the new life that Jesus offers.

Because I need to be clear: extending forgiveness to someone who has genuinely done you wrong, means death. Imagine trying to forgive a serial killer who had kidnapped, tortured and murdered one of your children. Even the thought of forgiving someone who had done that would gnaw away at your insides. It would feel like you were betraying your murdered child; it would feel like you were condoning the murderer’s actions. In short, it would kill you to forgive him. But it would kill you in the right way. It would put to death just that much more of that part of yourself which refuses to participate in God’s life.

But there is maybe even a better way to look at it. For if it hurts us to forgive someone who has done us an injustice – just imagine how it must feel to God. Can it be any less of a death for God to forgive? God loves the child who has been murdered, the wife whose husband was unfaithful, the partner who was cheated out of his business, far more than we could ever hope to. If it kills us to forgive someone, how much more must it kill God? And if Christianity is right, that is precisely what it did: it killed God. People talk nonchalantly about God forgiving sins as if it was the easiest thing in the world. But our own experience gives the lie to that facile assumption. Forgiving sins isn’t easy: there is no more difficult thing in all of creation. It’s so hard that the undying God Himself had to die in order to do it. And we must die as well, if we want to participate in that forgiveness.

#3 – This is Resurrection

Third, we must remember that Jesus’ death on the cross was not the end of the story. Yes, Jesus died; and it was a true death. His heart ceased to beat. The neurons in his brain ceased to register the agony of his body. His muscles, on fire for the last six hours, finally slumped, and his corpse began its slow, inevitable decomposition in that merciless April sun. But God had something else in store, for He would not abandon Jesus to the realm of the dead, nor allow His Holy One to see corruption. On the morning of the third day, God raised Jesus from the dead; and the life he now lives, he lives to God. One small part of the meaning of the Resurrection is the lesson that God is faithful to those who engage in self-sacrificial love. Indeed, how could He not be? For He cannot deny Himself; and those who sacrifice their own desires for the good of others, are already living in God’s love, whether they know it or not. If we die to our sinful nature, we will be alive to God. As Paul says elsewhere in Romans, “And if the Spirit of him who raised Jesus from the dead is living in you, he who raised Christ from the dead will also give life to your mortal bodies because of his Spirit who lives in you.”

Two Stories

I should point out as well that self-sacrificing love is not merely rewarded in heaven. To the extent that we live in that love in this life, to the extent that we die to ourselves, we experience God’s new life right now.

I have two examples of how this can work: one from my own very recent experience, another from the experience of one of the great saints of the Church.

Olivet University

To give you some background, twenty years ago, I graduated from a small Christian school in the Santa Cruz Redwoods named Bethany University. Bethany was a lovely school in many ways, but it’s been teetering on the edge of financial ruin for years, and finally, this summer, it ran out of money and was forced to close its doors. Many people had loved that school, and were genuinely grieved at its closure. But within a month after Bethany announced that it was closing, another tiny Christian school by the name of Olivet University announced that it was going to purchase the Bethany campus, and continue Bethany’s mission of ministerial training. On the face of it, this was welcome news.

But after that, things kind of got weird. This isn’t the place to go into all the details, but suffice to say that this new school, Olivet, was surprisingly sloppy with the truth as they began the process of moving onto the Bethany campus. To a wide range of alumni who were still grieving their school’s demise, it felt like our school’s heritage was being used fraudulently – and for purposes that we could only guess at.

My involvement in all this started when I wrote a blog entry in which I complained about some of Olivet’s behavior, and pointed out some of the misinformation that they had been spreading. I uploaded the post to my blog, turned off my monitor, and headed downstairs with a book. I presumed that was going to be the end of it: among other things, really, nobody reads my blog. So I was pretty well surprised when I got a phone call that very evening from an Olivet administrator, in which he threatened legal action if I didn’t take my blog post down.

I didn’t take it down, of course, but as you can imagine, that was the wrong approach for him to take, and it got me even more suspicious about what Olivet was up to. So I started doing quite a bit of research on Olivet University, its history, its background, its faculty, everything I could find. And I followed up that initial blog post with several more, detailing some of the relevant information that I’d found. And some of the information I found was indeed quite interesting.

But here’s the point that I’m finally getting to. As I was researching Olivet, and writing up my findings, I found myself, almost without thinking about it, wanting to stretch the truth. Olivet had made me angry; and I absolutely wanted the bad things I found to be worse than they were; and I absolutely wanted the good things I found to not be as good as they were. I wanted to include any incriminating information I turned up, even if I thought it wasn’t likely to be true; and I wanted to leave out anything that tended to exonerate them. I found myself having to go back and rewrite whole paragraphs of my blog posts, because I had been doing exactly what I was accusing Olivet of doing, of being insufficiently careful with the truth. In brief, I wanted to be right, and I was willing to go to rather inappropriate lengths to convince others that Olivet was in the wrong. Worse than anything else, though, was the realization that I tended to do this with more frequency than I was happy to admit. My conflict with Olivet was not the first time that I had been ready to present “facts” with an unwarranted confidence.

I’ll confess, I wasn’t entirely comfortable when God pointed this out to me. But after some squirming, I did what I should really do more frequently: I repented. I didn’t get down on my knees or anything, but as I sat there, my hands on my keyboard, I prayed, “God, help me to love the truth more than being right.”

As I stand here now, I’ll confess, that sounds kind of lame. But I can’t express how freeing that simple prayer was. I have no illusions about being cured of my tendencies to exaggerate, or my desire to prove the other side wrong. But at least in that one particular debate, that one particular prayer entirely changed my perspective. The debate was no longer about me, but about the truth, and that made all the difference. I ended up having to admit that I was wrong about a couple things, but it felt OK to say so. And when my worst suspicions about Olivet eventually proved to be unfounded, I was very grateful that those suspicions hadn’t made it onto my blog. Giving up my insistence on being right was only the tiniest sip from the cup of death: but the freedom which followed in its wake was no minor taste of life.

St. Francis of Assisi

The second story I have to tell comes from the life of St. Francis of Assisi. Apart from Jesus himself, more than any other human being, St. Francis’ life is an example of the extent to which dying to yourself is merely the start of an entirely new life. You may know the story. St. Francis was born to a wealthy family, but in his early twenties he renounced all of his worldly possessions, and began to serve and care for the lepers around his village. St. Francis has a well-deserved reputation for loving nature, and for caring for all of God’s creatures; but it’s worth noting that this love of nature was combined with a very strong asceticism. He renounced any possessions, he walked barefoot through the snow, and regularly engaged in extended fasts. During one such forty-day fast in preparation for Easter, St. Francis prayed that he would know the full pain that Christ suffered, and in answer to this prayer received the stigmata, the five wounds of Christ in his own body. When he died two years later, he requested that they lay him naked on the ground, so that he could return to God the same way he came. Several years ago, a modern medical analysis of St. Francis’ skeleton showed that he was suffering not only from starvation, but also quite likely from leprosy.

And yet, despite these sufferings, those who knew him universally said that the overriding characteristic of St. Francis was not pain, not sadness, not depression; but rather joy.

In his biography of St. Francis, G. K. Chesterton sums up this paradox well:

[St. Francis’ self-denial] was as positive as a passion; it had all the air of being as positive as a pleasure. He devoured fasting as a man devours food. He plunged after poverty as men have dug madly for gold. … He held on this heroic course from the moment when he went forth in his hair-shirt into the winter woods to the moment when he desired even in his death agony to lie bare upon the bare ground, to prove that he had and that he was nothing. And we can say, with almost as deep a certainty, that the stars which passed above that gaunt and wasted corpse stark upon the rocky floor had for once, in all their shining cycles round the world of labouring humanity, looked down upon a happy man.

Conclusion

OPPC has been through a great deal over the last year. We said good-bye to Charlie last August, and then unexpectedly had to say goodbye to him again just last month. We said goodbye to Pastor Vonna just last week. And as you presumably know, Galena and I are saying our own goodbyes: this is our last Sunday here. With all of these changes, I wouldn’t be surprised if some of us sometimes felt a little like St. Francis, lying shivering on the rocky floor.

But if you feel that way, think back again on Jesus’ words to Paul. Any pain that Jesus’ church feels, is experienced by Jesus Himself. All authority in heaven and on earth has been given to our Lord; and we go forth today, not merely in His name, but with His power and authority coursing through our own bodies. We die daily, but our life, our true Life, is hidden with Christ in eternity. OPPC may yet have further deaths to die, whether literal or sacramental, and that is as it should be. In a far less dramatic manner than St. Francis, we are called to partake of our Lord’s sufferings; but we are equally called to partake of our Lord’s glory. For we are His Church, His Body, and we live in the power of His resurrection.

Sunday, September 18, 2011

Excess Excitement at the Smith Household

You know your morning just got interesting when you're downstairs and hear a huge thud from upstairs, followed by your wife screaming. When you get upstairs and she's laying on her back, still screaming, you know it just got very interesting.

The long and the short of it is that when Galena was getting dressed this morning, she went to step up onto our bathtub, so that she could get a full-length look at herself in the counter mirror. As she was stepping up, however, her kneecap dislocated again (#3!), and she crashed backwards down onto the floor (which was the thud that I'd heard). By the time I got up there, she was lying on her back, holding her knee in her hands, alternately screaming, then whimpering and then screaming again. The kids piled into the bathroom behind me, with rather wide eyes. I very briefly tried to relocate her patella, but not having the foggiest idea what I was doing, quickly gave that up, and ran to get  some ice, which was maybe a nice gesture, but almost equally pointless. After contemplating what would be required to get her to the hospital on my own, with three kids in tow, I gave up on that idea too, and just called 911.

In the meantime, Caedmon had run to get a couple pillows for Galena, so that she could rest (slightly) more comfortably. Brendan had progressed from wide-eyed to his signature line, "It's too scary! It's too scary!" Calista, thankfully, was almost entirely oblivious, and occupied herself with rolling toys down the stairs, to make sure the paramedics were appropriately welcomed.

The ambulance arrived a couple minutes later, and they made their way upstairs. The lead paramedic examined her and said, "I've never relocated a patella before, but a doctor showed me how once. You want me to give it a shot?" These weren’t perhaps the most reassuring words, but Galena nodded grimly, and after one false start (which resulted in a great deal more screaming), it slid back into place. And with that, the pain went away almost entirely. The paramedics decided to take her to the hospital anyway, just in case something worse had happened, and bundled her out the door.

That was my signal to call Karn Hanhart, who very graciously dropped everything she was doing, and rushed over. Caedmon was initially very keen on coming to the hospital with me, but then he heard me instructing Karn to let them watch as much TV as they wanted. He figured another opportunity like this wasn't going to come his way anytime soon, and decided to stay home.

At the hospital, they x-rayed her leg, concluded that nothing else was wrong, and sent her home. The whole thing finished up by 11:45 am or thereabouts. At this point, Galena's hurting a little bit, but not badly. She's lying on the couch, resting and basically letting Caedmon wait on her, which he seems pretty happy to do.

She's supposed to go visit an orthopedist later this week. Since this is the third time this has happened, they may recommend surgery, or physical therapy, or maybe nothing: but we'll wait until she's had the consult before making any decisions.

Tuesday, September 13, 2011

A Welcome Update from Olivet

On the Bethany Alumni forums today, someone challenged my constant harping on how Olivet had been framing their connection with Bethany University by saying, in effect, “Well, what do you want them to say?”

That was a very fine question, and after some thought, this is what I came up with:

In 2011, Bethany University had to announce its closure and submitted its teach-out plan. However, Bethany made an appeal for Olivet University to continue the mission of training ministry-bound men and women in Santa Cruz. Olivet University fully affirms the mission and the heritage of Bethany, and feels privileged to continue in the tradition of ministerial-based education that Bethany pioneered. The Bethany that was founded in 1919 has closed its doors, but with the full blessing of the Assemblies of God, the mantle has been passed to a new generation and to a new university. We chose retain the name "Bethany University" precisely to honor that heritage.

After I posted it, and various folks had the opportunity to read and comment on it, I forwarded it to Nate Tran, Olivet’s Dean of Administration, and asked if he’d be willing to post something like that up on the website. I was quite pleased when he responded quickly, and said that they’d be willing to make the appropriate changes. A few minutes later, the website had been updated. This is very good news from my perspective, and I’d like to thank Olivet for working with the alumni on this.  We all wish Olivet the very best as they endeavor to serve our common Lord; and it’s my hope and prayer that their students experience the same divine blessings at 800 Bethany Drive that so many thousands of Bethany students before them did.