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 quoteinvestigator.com:

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:
verb
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: merriam-webster.com has "prescribing norms <normative rules of ethics> <normative grammar>" as definition #3; dictionary.com 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
>>> pdb.run('foo.main()')
> (1)()
(Pdb) s
--Call--
> /mnt/home/collin/foo.py(3)main()
-> def main():
(Pdb) l
  1   #!/usr/bin/python
  2   
  3  -> def main():
  4       x = "foo"
  5       if x == "foo":
  6           print "still foo"
  7       else:
  8           print "x changed to", x
  9   
 10   if __name__ == '__main__':
 11       main()
(Pdb) n
> /mnt/home/collin/foo.py(4)main()
-> x = "foo"                         We're about to execute line 4
(Pdb) n
> /mnt/home/collin/foo.py(5)main()
-> 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:
>>> pdb.run('foo.main()')
> (1)()
(Pdb) s
--Call--
> /mnt/home/collin/foo.py(3)main()
-> def main():
(Pdb) n
> /mnt/home/collin/foo.py(4)main()
-> x = "foo"
(Pdb) n
> /mnt/home/collin/foo.py(5)main()
-> 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?