Sunday, July 31, 2011

Everybody* hates my bike

* except the organizers of L'Eroica
Some years ago, I took my old (1974) bike to the shop; I wanted them to repack the bearings on my wheels, etc. They looked at it, and me, with disdain. They saw an old junker worth no more than $25; I saw a faithful friend that had carried me around campus and over the hills for over a quarter-century.

I rode the bike to work and people acted surprised to see a padlock on it.

Some of my friends have suggested that I buy a new one; they think it's ugly and obsolete.

Just last week I was ordering a new wheel, and the guy at the store asked me if it was worth putting that much money into an old bike.

I didn't realize what that old bike meant to me, really, until I tried to explain my feelings to someone. That bicycle was the first "big" purchase (nearly $150) I made myself; I had just started attending college thousands of miles from home. I rode that bike throughout college; besides taking me to class, it also took me over the mountains and to the beach (San Gregorio, via Woodside Road). I took it home for the summer and rode it from my parents' home up to Puu Ualakaa state park, something I'd never imagined doing on a bike before.

That old bike is just a machine, but it reminds me of my youth -- back when my whole life was still ahead of me. Maybe I'm fond of it because it's one of the few things I have from that era (I still have some textbooks, too--math and physics). It represents adventure, mobility. Possibilities.

Like everything else in this life, it's just temporary, but if I have any "prize possessions" I guess that old bike would be one of them. I told my daughter Jenny that maybe I'll buy a new bike when this old one turns 40, but if I do that the lovely Carol will want me to pitch this one. So maybe not.

Saturday, July 30, 2011

Using technology to reduce sex trafficking

I don't remember a lot of dates or figures from however many years I studied history while growing up, but I remembered Eli Whitney's cotton gin, an invention that facilitated the processing of cotton... and by the way increased the traffic in human slaves, because now there was a cheap way to process all that cotton picked by forced labor.

Tonight, while listening to a CD from this year's Freedom Summit, I heard of a way that technology is being used to instead reduce human trafficking.

Here's how it works. A man comes to town on a business trip. He doesn't know anybody and doesn't have anything he urgently needs to do. So he pulls out his laptop, checks out craigslist or some similar site and flips to the "adult escort" section or whatever. There he sees a picture of a young-looking girl. "Click here to set up a date with this hottie," it says, possibly naming a price.

So he clicks; instead of a picture of a scantily clad young girl he gets something like this:

There might be an announcement that "You just tried to buy sex; be advised that the __________ Police Department will be enforcing anti-prostitution laws vigorously."

Here's something even better: a map with a red dot; the guy looks at the dot's position on the map and sees it's on the same block as his hotel!

OK, I was so excited by this use of technology that I forgot to give you the background. There's a theory about sex trafficking that says, there are a lot of men out there wanting to buy sex -- more men wanting to buy than women willing to sell. Sex traffickers see that the market is unbalanced, that money is being left on the table, so they kidnap, coerce, force women to sell themselves against their will.

According to this theory (which I actually believe), if fewer men want to buy sex, fewer women and children will be trafficked and forced into prostitution. Therefore it's a good idea to reduce or eliminate demand. If men think it extremely risky to set up a prostitution appointment online, fewer online prostitution appointments will be set up. And whereas lots of men may be willing to go onto a craigslist-like website, they may not be willing to get into their cars and go cruising around downtown looking for a street prostitute. And so demand would drop and with it the economic incentives for human sex trafficking.

If the demand were to almost completely disappear, so would the amount of human sex trafficking. So goes the theory.

A couple of issues with this concept: first, the concern about the whole Police State thing. Hey, if google knows where you are, why can't the cops know? I'm not talking about giving the police any additional powers here; I just mean that they can use whatever information is out there for commercial enterprises (including sex traffickers by the way) could use.

Another issue is that mapping by IP address is somewhat tenuous. My IP address (which isn't static by the way) appears on maps to be over 50 miles away from my house; if someone uses a mifi-like portable hotspot, geographical information probably isn't there. But a G3/G4 enabled smart phone? H'm...

I was reading recently in WHAT WENT WRONG? (by Lewis) that technology served to strengthen tyranny in the middle east, up until recent times. I already mentioned the cotton gin. And you can be sure that despite denials by the communist bandits in Peking (hey, they say hwa-sheng-dwun; I can say Peking) the bad guys use IT to extend their reach.

So it's very exciting to me to hear about ways information technology is being used for something really good and ultimately important.

But the righteous by faith shall live?

Spent a little over an hour listening to a Tim Keller talk from the 2006 Desiring God conference -- a terrific lecture regarding the supremacy of Christ and the gospel in a postmodern world. Something he said made my head explode. [Update: Click here for download options.]

Somebody he quoted said that Jonah 2:9 is the central verse of the Bible, in particular the part where Jonah says, "Salvation is of the Lord" or in the NIV "Salvation comes from the Lord." It's from the Lord! As if this were some sort of surprise!

We evangelicals say we know this, but actually we don't. Keller asked the assembled audience, rhetorically, "Why do you do your ministry? It's because you're so grateful for what God has done for you, right? Then why do you burn out? Why are you up when attendance is up and down when it's down?"

His point, of course, is that we think of "salvation" as "what will get me into heaven when this life is over for me" and maybe a little more. Something we don’t think of when we say "Salvation is from the Lord" is the set of things that make me feel good about myself.

Don't get me wrong, it does make me feel good about myself to know that God loves me regardless of anything I do or don't do. But when I think about salvation I don't tend to think about what makes me feel good, and vice versa. So what does make me feel good? Here's a short and incomplete list:

  • kissing Carol and sharing my day with her
  • talking with my children
  • enthusiastic greeting from the dog first thing in the morning
  • overcoming obstacles and solving problems (like when I finally got the cluster off my 1974 bike's rear wheel)
  • when people I love enjoy the food I prepare
  • being helpful/useful to someone -- whether it's praying for them so they feel cared for, or some problem at work I can help them with, or sharing some insight...
Keller shared an experience he had, reading Romans 1:16-17. Apparently in some translation it says "he who is righteous by faith shall live," and he said he got an impression, probably from God—an amplification of that verse: …and he who is righteous by preaching shall die every Sunday.

Well thank goodness it's not just me! We say we're saved by grace through faith, we say our righteousness comes from God apart from anything we do, but we're anxious about how well we preach (channeling Keller on that one) or we feel good about ourselves depending on how people like the food we prepare or whether we've been helpful to someone or whether the house is clean when someone drops in or whether we've achieved some other goal. It is not bad to feel good about these things, but to seek our salvation in them, to think our meaning in life comes from them -- that's silly.

What is the cure for this folly? I hope we don't have to be thrown off a boat and get swallowed by a fish! Well, it takes intervention from God to be sure. Our part is to set our minds on things above (Colossians 3:1-2), the things of the Spirit (Romans 8:5-6); to fix our eyes on the unseen things (2 Corinthians 4:18) and our hope on Jesus (1 John 3:2-3); to be transformed (Romans 12:1-2) and to work out our salvation (Philippians 2:12).

Thy kingdom come — into my life
thy will be done on earth — and in my heart too
as it is in heaven

And lead us not into temptation — the temptation to look for salvation (significance or security) elsewhere
but deliver us from the evil one — and from our own folly
Guess I'll have to repeat that as needed, and 20-30 years from now I'll be less foolish than I am today.

Skeuomorphic design??

So I happened to read some rants about Mac OS X Lion™’s user interface—a rant written as it turns out by a current Apple employee. These rants were not particularly charitable but I'm afraid I still found them entertaining, laced as they were with 4-letter Anglo-Saxon words (one verb in particular appeared numerous times) and complaints about stupid *pointless* skeumorphism.

Naturally I had to go look up the word. A few hours later, I was working on an HTML table; when you click on a certain element, the table would expand, and I wanted to show the number of rows you'd be adding by clicking there. It looked kind of like this:

title KLOCetc
[5] summary info here 474 ...
Got the picture? I asked a few colleagues if they thought the number made the table too busy, etc., and one of them said, yes it's busy but I still love it... and also said the design was skeuomorphic.

My reply: "I've seen this word before but for some reason your email didn't have any profanity in it."

He shot back: "It looks f*** nice, too"

Thursday, July 21, 2011

We're all broken; let's all stop pretending and admit it, shall we?

My brother-in-law has a saying, "Everybody's got something." By that he means that each of us has problems, and not just little ones.

Of course he's right; his words remind me of the prescription to "Be kind, for everyone you meet is fighting a great battle." Indeed they are, as discussed further in this article from

This man beside us also has a hard fight with an unfavouring world, with strong temptations, with doubts and fears, with wounds of the past which have skinned over, but which smart when they are touched. It is a fact, however surprising. And when this occurs to us we are moved to deal kindly with him, to bid him be of good cheer, to let him understand that we are also fighting a battle; we are bound not to irritate him, nor press hardly upon him nor help his lower self.
1903, The Homely Virtues by John Watson, Courtesy, Page 168, Hodder & Stoughton, London. (Google Books full view) link
If I think about it for a second, the fact that everybody has something, that everyone is fighting a great battle, means that I'm not alone in mine. We're all fighting great battles, we all struggle, we're all broken. As the Lord himself told us, "In this world you will have tribulation" (John 16:33 or so).

So if my struggle becomes apparent to others, there's no need for shame. And if my struggle remains hidden from others? Well, I'm not a proponent of dumping all my troubles on everybody, but as Paul says in 2 Corinthians 1:3-4, "Praise be to the God and Father of our Lord Jesus Christ, the Father of compassion and the God of all comfort, who comforts us in all our troubles, so that we can comfort those in any trouble with the comfort we ourselves have received from God." I take this to apply to me too: when I'm afflicted, and when God brings me comfort, I'm being prepared/equipped to comfort others.

Two corollaries come to mind. First, when I have troubles, it could well be that God has equipped someone to comfort me in that trouble. Second, the plan God has for bringing me comfort could well be that very person he has equipped, so if I want comfort from God but I don't want him to use people to bring me that comfort—well, that may not work very well.

In any case, we are not alone in having struggles—great struggles; everybody's got some, as the Lord himself said. So there's no need for shame. Rather, let us glorify Him by giving and receiving comfort -- let us clothe ourselves with compassion, kindness, humility, gentleness and patience, as Paul says. (Colossians 3:12)

"By this will all know that you are my disciples, if you have love for one another." (John 13:35)

Excursus on "normalizing brokenness"

I don't like the phrase "normalizing brokenness"; I'd rather say "let's admit that we're all broken," mainly because "normalize" has at least two definitions I don't see in the dictionary. The Apple dictionary program (1.0.2) for example has:
1 [ trans. ] bring or return to a normal condition or state: Vietnam and China agreed to normalize diplomatic relations in 1991 | [ intrans. ] the situation had normalized.
Definition #2 wasn't applicable; it has to do with math or computer science. A web search for "normalize" yields similar results.

But a web search on "normalize violence" (with or without the quotes) shows the word used to mean something more like "establish as normal"—i.e., normative. Consider what "norm of behavior" means, or "normative economics" or "normative ethics" for that matter. Here's Apple's dictionary on "normative:"

adjective formal
establishing, relating to, or deriving from a standard or norm, esp. of behavior : negative sanctions to enforce normative behavior.
This aspect of establishing a norm (or standard) also appears in online dictionaries: has "prescribing norms <normative rules of ethics> <normative grammar>" as definition #3; has "tending or attempting to establish such a norm, especially by the prescription of rules: normative grammar." as #2.

Normative grammar tells us how we ought to speak and write; normative ethics tells us how we ought to behave; if violence is normative, that's saying violence is OK—which it's not.

Rather than normalizing violence, I'd much rather that we normalize generosity, honesty, self-control, patience, kindness, and compassion. Let's promote those things as standards that we aspire to.

When people talk about normalizing brokenness, I don't think they're saying "let's promote brokenness as a standard or norm that we aspire to"; I think they're saying "let's all admit that brokenness is normal in the sense of average, as universal -- i.e., that we're all broken." We don't aspire to brokenness, any more than we aspire to flatulence when we eat beans, though normal it may be for beans to produce it.

Finally, I'm an expert in something

Reading Merton today, I saw something that I know a lot about: impure intention.
An impure intention is one that yields to the will of God while retaining a preference for my own will. It divides my will from His will. It gives me a choice between two advantages: one in doing His will and one in doing my own. An impure intention is imprudent, because it weighs truth in the balance against illusion; it chooses between a real and an apparent good as if they were equal.
Merton, No Man Is an Island 4.4 (pp. 54-55)
Oh yes, I have a lot of impure intention. Take my money (please) for example: I give some to God's purposes, but the rest I want to use for my own. Or consider time—rather, attention: I pay attention to the things of God, like prayer, meditation, or thinking about how to serve and edify others (or myself for that matter). But after that I want to pay attention to what I want to pay attention to: writing some code, reading an "escape" novel, going on a bike ride, etc.

What does Merton mean when he talks about a real vs an apparent good? Simply that “True happiness is not found in any other reward than that of being united with God. If I seek some other reward besides God himself, I may get my reward but I cannot be happy.” (Merton, op. cit., 4.3, p. 54). These illusory rewards—the "vain things that charm me most" but cannot really satisfy—these are my false gods, my idols. They're only illusions, they don't satisfy, so why can't I just stop pursuing them? Like the Israelites, I hear the Lord calling me to "lie down in green pastures" (Psalm 23:2) and rest in him, to drink from "the spring of living water" that is God himself (Jeremiah 2:13).

"Do not run until your feet are bare and your throat is dry," he says to them in Jeremiah 2:25. And like them, I sometimes reply, "It's no use! I love foreign gods, and I must go after them." What is the cure to this folly? How can they, how can I, develop a pure intention? How can my corrupt thinking be corrected so that God's will is really mine? How can I surrender more fully to him?

It's not complicated, which is not to say it's easy. And it takes a long time. Basically it's spiritual formation, transformation, discipleship. It's the disciplines: praying God to change me, remembering and thinking about the truth (in the Bible, in the lives of those around me, in my own life): that "only in God is my soul at rest; in him is my salvation." (Psalm 62:1) Indeed, who will save me from the body of this death? Thanks be to God (Romans 7:24-25). Merton adds this word:

None of these things can be done without prayer, and we must turn to prayer first of all, not only to discover God's will but above all to gain the grace to carry it out with all the strength of our desire.
Merton, op. cit. 4.9 (p. 61)
And as it says in Hebrews 4:16, Let us then approach the throne of grace with confidence, so that we may receive mercy and find grace to help us in our time of need.

Wednesday, July 20, 2011

Changing a local variable in the Python debugger

Dave stopped by my office the other day and asked me how to do that, and I told him I wasn't sure. I seemed to remember having some difficulty with it in the past, but I also knew it was supposed to work. So I played with it while he watched.

After some confusion, he suggested the answer: if you modify the variable, don't look at it again; just continue. Sure enough, it works:

$ python
Python 2.6.5 (r265:79063, Jul  5 2010, 11:47:21) 
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb
>>> import foo
> (1)()
(Pdb) s
> /mnt/home/collin/
-> def main():
(Pdb) l
  1   #!/usr/bin/python
  3  -> def main():
  4       x = "foo"
  5       if x == "foo":
  6           print "still foo"
  7       else:
  8           print "x changed to", x
 10   if __name__ == '__main__':
 11       main()
(Pdb) n
> /mnt/home/collin/
-> x = "foo"                         We're about to execute line 4
(Pdb) n
> /mnt/home/collin/
-> if x == "foo":                    x has been assigned the value "foo", and now we're about to test it
(Pdb) x='bar'                        I'm changing it to 'bar'
(Pdb) c                              and now I say "continue"
x changed to bar                     test at line 5 failed; we execute line 8
By the way, 'single' and "double" quotes mean the same thing in Python (unlike in Perl for example, or C). Anyway, now watch me ruin it. Continuing from where we left off:
> (1)()
(Pdb) s
> /mnt/home/collin/
-> def main():
(Pdb) n
> /mnt/home/collin/
-> x = "foo"
(Pdb) n
> /mnt/home/collin/
-> if x == "foo":                    We haven't executed line 5 yet
(Pdb) x='bar'                        Change it to 'bar'
(Pdb) x                              Examine it. What happens?
'foo'                                Examining it cancels out the change I just made.
(Pdb) x='bar'                        Was I hallucinating? Try again!
(Pdb) x                              ... and look again.
'foo'                                Ugh, just like last time.
(Pdb) c                              So the debugger thinks value's unchanged; what does the program think?
still foo                            The program thinks x still equals 'foo'
This is apparently a long-standing issue, dating back at least to this 2004 thread on the topic (prettier link). Are Dave and I the last two people in the world to hear about this?

Sunday, July 03, 2011

On what basis can one say "all men are created equal"?

If Aristotle wrote (in Politics I:V) that "from the hour of their birth, some are marked out for subjection, others for rule," how did we come to the text of our Declaration of Independence, which says "all men are created equal"? (I'll leave to others the question of whether that applied to women or slaves.)

The idea of equality, the notion that every person on earth has dignity, was not always popular, and isn't popular everywhere today. What's the basis for this idea? Why do you believe it?

I'll tell you why I believe it. I believe it because the Scriptures tell us, "So God created man in his own image, in the image of God he created him; male and female he created them" (Genesis 1:27 NIV). And as Martin Luther King Jr. said, "there are no gradations in the image of God."

By the way, if you don't believe that God created humanity with a sort of divine dignity, on what basis do you say that we are all created equal? If you say it's because we have the ability to appreciate beauty, do you say that a blind person is less than equal? If it's because we have the ability to appreciate beautiful music, is a deaf person less human? If it's because we can think deep thoughts, then is everybody with an IQ less than, say, 95, entitled to less consideration under the law?

I mean seriously. I won't go into the abortion issue here, but there are some real questions about how we decide who to respect, who to protect and defend, what our society really should be about.

And to bring this to personal experience (this is a blog, right?), I have a confession. The other day I was at J&J, picking up something for dinner. As I tried to make a beeline for my car, I was accosted by a stranger in a poncho, who wanted something to eat. I said OK, do you prefer noodles or fried rice, and we went through that whole thing. I was eager to get home and did not have much patience. I did not want to hear his story or pray for him; I just wanted to be done.

So no, I did not treat him as an equal. Did I treat him with the dignity I should have—the dignity he deserves as someone created in God's image? Not so much. I could have spent a minute or two more with him; I could have heard a minute or two's worth of his story, I could have encouraged him, I could have prayed for him, I could have invited him to my home to have a shower and get his clothes washed.

Because that's what it really means, isn't it, to treat every person out there as an equal—to treat each person as I'd want to be treated? And if I"m not willing to do that, then do I actually believe that stuff about all men being created equal? And so maybe that self-evident truth isn't really as self-evident as the founding fathers said it was—even to them (and some of whom owned slaves).

May the Lord help me to be better prepared, more aware, and more willing to do his will the next time I run into someone. Not that I'll necessarily invite them to my house, but at least I could take a minute to hear their story, to encourage them, to pray for them, and at least to think about them as a real human being, a brother or sister, rather than an obstacle to my getting home to resume my middle-class life.

“You…complete…me”—yeah, right

What does that mean? That I'm incomplete without you? In saying, "you complete me," I admit I'm using you for my own benefit—i.e., to feel whole; I want to exploit you for my own benefit. Here's how Merton describes this sort of "love":
A selfish love seldom respects the rights of the beloved to be an autonomous person.... this love seeks to keep him in subjection to ourselves. It insists that he conform himself to us, and it works in every possible way to make him do so.
No Man Is an Island 1.8 (p.9)
How creepy is that? Contrast that with Paul's word that love "is not self-seeking" (1 Corinthians 13:5, NIV) or Merton's description of unselfish love:
Charity makes me seek for more than the satisfaction of my own desires, even though they be aimed at another's good.... My will must be the instrument of God's will in helping them create their own destiny.
No Man Is an Island 1.6 (p.7)
Now Peck defined love as "the will to extend one's self for the purpose of nurturing one's own or another's spiritual growth." (The Road Less Traveled, p.81). I think love means more than that, but it doesn't mean less, and in particular love doesn't include the will to exploit you for my personal benefit.

The exception to all this is that we can love God without wanting to nurture His spiritual growth; we love God, we reciprocate God's love for us, in order to help ourselves grow.

But if that's OK, why is it so bad if I "love" you in order to make me feel good/whole/significant/whatever? There is so much wrong with that idea, it's hard to know where to begin:

  • It's unfair to you.
    It burdens you with heavy expectations.
  • It's selfish.
  • It's dumb
    which in this case means it's doomed to failure because you can't save me from myself. And therefore...
  • It's based on a lie.
  • It stops me from serving or giving to you
    because I'm too busy using you; I'm clinging to you to get meaning/joy/whatever from life and so I can't afford to let go
  • It denies God his proper place in my life.
    The Lord is my shepherd; you can't be. (Psalm 23; John 10)
And did I mention that it's selfish and doomed to failure?

Friday, July 01, 2011

Making rows in a table appear (or disappear) with HTML and javascript

I ran into this problem and found someone else's solution, so you don't have to.

As luck would have it, I searched on "toggle visibility javascript" and clicked on the first thing I saw:, which has this fragment:

<script type="text/javascript"><!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if( == 'block')
 = 'none';
 = 'block';
This code made my table rows disappear all right, but when I asked them to re-appear, it looked awful. If my table looked like this
row 1something1
row 2something2
row 3something3
row 4something4
and I made, say, rows 2 and 4 disappear, and reappear, with the above code, it looked like this:
row 1something1
row 2something2
row 3something3
row 4something4

Yow! That sure was icky. I discovered some other website that mentioned the concept of using display "inline", but the result still looked like this:

row 1something1
row 2something2
row 3something3
row 4something4

Was there some other "display" I could give it, that would make things look better? I went to, which didn't help me much; lists these values:

  • block (a line break before and after the element)
  • inline (no line break before and after the element)
  • list-item (same as block except a list-item marker is added)
  • none (no display)
The secret, as it turns out, was to change the above code to instead look like this:
<script type="text/javascript"><!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       //if( == 'block') ← not "block"; check vs. 'none' instead
       if( != 'none')
 = 'none';
          // = 'block'; ← no "block" needed; make it empty instead
 = '';

Which is what the second site in the search results would have told me right away: has:

function toggle(obj) {
 var el = document.getElementById(obj);
 if ( != 'none' ) { = 'none';
 else { = '';

Kosari/gosari considered harmful -- but only if eaten raw
(so eating 고사리나물 in moderation won't hurt)

(This isn't actually a recipe)
Just saw this article on bracken in the Atlantic Online. The short version is that this fern actually contains carcinogens, but in varying amounts; a piece of the stuff raw may or may not contain much in the way of carcinogens. And once you cook it, the carcinogens are rendered harmless.

The poison is called ptaquiloside; if cows eat bracken, they may get cancer or pass some ptaquiloside into their milk. Creepy, huh?

But as Hank Shaw writes in the Atlantic article above,

a very normal cooking process for fiddleheads—blanching in salty water, then shocking in ice water, then sauteeing—renders the fiddlehead close to harmless.
Indeed, that's the process Maangchi uses:
This is my method of soaking kosari.
  1. Place kosari in cold water in a pot. 1 cup of kosari will need more than 20 cups of water.
  2. Boil it for 30 minutes and don’t drain hot water and let it soak. Wait about 6-8 hours. I usually boil it at night and drain it next morning.
"Korean Cooking Ingredients:Fernbrake"
Well, I'm not going to go out and buy a bunch of the stuff, but it's good to know that in the amounts I eat of it, it's not really all that bad.