The best movie I never want to see again
I just saw Serenity, the movie based on Joss Whedon’s TV show Firefly. Nearly everyone who’s seen it so far has loved it. My reaction was more complex. If I had to sum it up in one sentence, I’d have to say something like “that was the best movie that I never want to see again.”
I think it was the excellent writing and the familiar characters that did it. This was the first movie where I didn’t have that subtle disconnect, the sense that I was watching a movie. Instead, I was caught up in the reality of it — it really felt like I was watching real people deal with a real situation.
And normally, that would be a really good thing in a movie. A REALLY good thing. But… that meant my sense of reality was also engaged at other moments during the movie. Like the scene that’s still haunting me, two hours after the movie’s over. No spoilers here, but if you’ve seen the movie, you’ll know which scene I’m talking about. It’s the one where they’re on a planet, and they find a holographic recording of a woman describing something that happened on that planet. I really, really needed my normal “I’m watching a movie, this isn’t real” detachment for that scene. Especially the end of it. And because the writing was so good, the scene just slipped underneath my normal emotional “armor”.
It’s three in the morning right now. Two and a half hours after I walked out of the movie theater. And I’m still desperately looking for distractions, trying to forget what I heard in that one scene. I don’t intend to go to bed anytime soon.
It’s been a very long time since a movie did that to me. On the one hand, that’s some really good writing. On the other hand, I never ever want to see this movie again, and I almost wish I hadn’t seen it in the first place. Not that it was bad — as I said, it was one of the best movies I’ve ever seen. If it hadn’t been such a good movie, it wouldn’t have left me this profoundly disturbed.
Make of that what you will.
How to stay poor
My previous post on the subject of poverty referenced John Scalzi’s article “Being Poor“. Scalzi gives a very moving account of what poverty feels like, from the inside.
Now, here’s an article that pretty much shows why some people stay poor.
One thing I noticed about Scalzi’s article, and especially the comments, is that it was written by someone who used to be poor. But because he, and many of his commenters, didn’t fall into any of the self-destructive traps Ms. Phelps mentions in her article, he didn’t stay poor.
There are those who are poor because of circumstances beyond their control (for example, one of the commenters to Scalzi’s article had to have cancer surgery while unemployed and insurance-less. That will pretty much wipe out anyone’s resources.) But there are also those who are poor because they’ve never been taught how not to be poor, and they’re trapped by the consequences of their bad decisions. The former just need a bit of extra help: a raise, a job schedule centered around the public transportation timetable, discounts on necessities like food and clothing. The latter, as Ms. Phelps’ article demonstrates, would actually be harmed rather than helped by that kind of assistance. What they need, essentially, is an authority figure who will — lovingly but firmly — tell them, “If you don’t change X, Y and Z in your life, you’ll never escape poverty.” And then — this is important — sticks with them. Otherwise it becomes the kind of condescension that the Bible condemns in James 2:16, mere words without action, utterly useless.
Anyone who reads Scalzi’s article and doesn’t feel compassion for the poor, and a desire to help them, has no heart. But it’s important to understand the individual you’re helping, and know exactly what kind of help they need. If the brain does not work alongside the heart, your well-intentioned assistance may end up actually harming the person you’re trying to help. Brain and heart working together, though, are a powerful combination.
The logistics of Katrina relief
I haven’t posted anything about Hurricane Katrina yet because I haven’t had anything to say that hasn’t been said elsewhere, and usually better. But I wanted to point out this rant on Hurricane Katrina by a guy who’s been in the military and knows logistics. Relief efforts take equipment — lots of equipment. And to move heavy equipment you need vehicles and people, and fuel for both the vehicles (gasoline) and the people (food, water).
Read his article, and the multiple links at the top of his article (particularly this one). You’ll come away with a better understanding of what the disaster-relief efforts are facing, and why it’s taking so much time (summary: the affected area is HUGE, a lot larger than just New Orleans, and trucks and helicopters don’t just magically move themselves).
Being poor sucks.
The difference between living frugally and being poor is that when you live frugally, you’re choosing to spend little money. When you’re poor, you have no choice.
I suspect that John Scalzi and I differ widely in our political opinions on certain subjects. But I believe we agree on the goals, we just disagree on the best means to get there.
On that subject, I’m rapidly getting sick and tired of people accusing their political opponents of being evil. Both Democrats and Republicans tend to do it, although it seems to be more highly concentrated in whatever party is currently out of power. I just wish people would wake up and realize that those on the “other side” are also people of good will. More on that in another post.
Four L.A. men charged with conspiracy to commit terrorism
Hurricane Katrina’s aftermath is getting all the coverage right now, and rightly so. But if it were a slower news day, this story would be all over the media. Four men in Los Angeles have been arrested on charges of plotting terrorism. They are accused of plotting to attack synagogues, and possibly other targets, in Los Angeles. They allegedly plotted to carry out the attack during Jewish holidays, when the synagogues would be packed, so that the number of victims would be as large as possible.
Once Hurricane Katrina coverage settles down and the media start covering other stories, this will be a trial to follow closely.
Green! Purple! Green! Purple!
After the 2004 elections, we’ve all seen the state-by-state results maps:

But the other day, it occurred to me that I’d seen this kind of political process before on a certain T.V. show. Everyone sniping at the other side, unwilling to listen to reasoned arguments, insults flying everywhere… That map had the wrong colors. Here’s a more accurate map of the 2004 U.S. presidential elections, state-by-state:

Fans of the T.V. show Babylon 5, who are currently busting a gut with laughter, will need no explanation. For the others, you can read an episode description here.
Lawyer “war stories” - very well-told
What’s one of the first things that comes to mind when you think of lawyers? A sense of humor? Probably not. But all that means is that you don’t know too many good lawyers. The really good ones are folks like Bill Dyer and his friend Walter Workman. Bill Dyer has a collection of stories that happened either to him or to Mr. Workman, and they’re really incredibly funny. I especially enjoyed the second story, about what Workman allegedly said after badly losing a case. I won’t repeat it here to avoid spoiling the punchline — just go read it. (Hat tip: Hugh Hewitt).
What you may not know about Hiroshima and Nagasaki
I’ve gotten into a few arguments over the atomic bombings of Hiroshima and Nagasaki and whether there was any possible justification for them, so I was fascinated to read this article in the Weekly Standard. The author discusses transcripts of radio intercepts from 1945, some of which were only released fifty years later in 1995, and most of which I had never read before. It’s fascinating reading if you’re interested in the last days of World War II: it knocks down — or at least radically modifies — just about every major theory that I’ve heard advanced regarding the end of the war:
- The bombings saved hundreds of thousands of lives, because the Japanese would have fought to the end in a land invasion? But it’s far from clear that a land invasion would have happened at all, even if the bomb had not been dropped. MacArthur still favored an invasion, but it looks like he was the only one. According to this new information, President Truman saw dropping the bomb not as a means to prevent a land invasion, but as the only way to end the war at all.
- Japan was looking for ways to surrender, and the atomic bombings were completely pointless? Intercepted radio messages from diplomats (of various neutral countries whose codes the U.S. had cracked) suggest otherwise. These diplomats, who were stationed in Japan, wrote home assessing the probability of a Japanese surrender. It’s true that some did suggest the Japanese were interested in negotiating peace, but a lot more wrote home to say that in their opinion, the Japanese would never surrender no matter what. (Their definition of “no matter what” did not, of course, include the then-unknown devastation of a nuclear bomb). And in fact, even after the second bomb, the Japanese were still looking for ways to end the war without a real surrender. On August 10, the day after the second bomb was dropped on Nagasaki, they gave an offer to surrender “with the understanding that the said declaration does not comprise any demand which prejudices the prerogatives of His Majesty as a Sovereign Ruler” — in other words, the emperor would still rule in Japan, and could still commit his country to any action he chose, such as unilaterally starting another war once his military had been rebuilt. Only once this was rejected did the Japanese accept surrender terms that stripped the emperor of real power. It’s clear that without the atomic bombs, Japan would never have given up on those terms — or, most likely, on any terms at all, short of invading Japan itself. (And see above for why the invasion was unlikely).
- Japan would have surrendered after the first bomb, and so the second bomb was simply a pointless massacre? Possible; the article mentions nothing about intercepts from Japan between August 6th and August 9th, so there’s not really any new evidence for or against this one. I guess I shouldn’t have said that the article knocks down every theory about the end of the war. For myself, I’m still inclined to think the second bomb had a larger psychological impact than the first one, and therefore that Japan would not have surrendered after just one bomb, or at least not before a land invasion and the concomitant high casualties on both sides. For proof of my theory, I offer the fact that it was on August 10th, not on August 7th, that the emperor ordered his cabinet “Find terms for surrender NOW“.
Whatever your previous theory about the end of World War II and America’s bombing of two Japanese cities, I think you’ll find it modified after you read the article. In the traditional blogger’s phrase, go read the whole thing.
I’m happy about these results…
The “Which ____ are you?” tests that are all over the Internet are usually just amusing, with the questions not really reflecting the results. But this one seems to have actually had a bit of thought put into it; the questions are good, and the answers make sense, at least for me:
Gandalf
A wandering spirit caring for a multitude of just concerns, you are an instrumental power in many of the causes around you.
And so am I, very dangerous: more dangerous than anything you will ever meet, unless you are brought alive before the seat of the Dark Lord.
It makes sense, too, in more ways than one. The test is based on personality and motivations and asks you “What would you do in this situation?” types of questions. But if you think about it, it makes sense in another way, since I’m such a computer geek.
Wizards in fiction are sometimes portrayed as good (like Gandalf), sometimes evil (like Saruman). But one thing they always have in common is their command of magic, which is (in fiction) always based on pieces of obscure, arcane knowledge. So they’re constantly reading, absorbing knowledge for its own sake, as well as for the understanding of magic that it gives them. And magic, in fiction, is usually tricky to get right: there are certain magical runes that must be drawn in exactly the right way, certain magical incantations (which seem like nonsense syllables to anyone who hasn’t studied magic) which must be pronounced exactly right if the spell is to work right, and so on.
Well, my nose is almost always in a book. There aren’t many people who would see the book “802.11 Wireless Networks: the Definitive Guide, 2nd Edition” in a bookstore and say “Ooh, I’ve been meaning to study those!” But that’s exactly what I did about six weeks ago: I pulled that book off the shelf and spent the next hour absorbed in the arcane realm of TCP/IP, 802.11 WLANs, and WPA/PSK. See? Looks like nonsense syllables to anyone who hasn’t studied magic computers, right? And let me tell you, if you get your WPA configuration wrong, your wireless network will just plain not work. It will sit there and do absolutely nothing useful. Until you contact your local “computer wizard” (see? even the terminology carries over) and get him to fix it. Then suddenly everything works, and your wireless NOTwork has been turned into a wireless NETwork.
I think there’s a reason why fantasy worlds like Tolkien’s appeal to so many computer geeks. It’s because, in a way, they’re a reflection of the work that geeks do.
You paid HOW MUCH for that?!!?
I couldn’t believe it until I saw it with my own eyes. Oracle — the 800-lb gorilla of database servers, the mighty Oracle — cannot distinguish between an empty string (”") and a NULL! From the current Oracle documentation, available on-line at their Web site (although you have to register and give them your E-mail address to get access to it):
“Note: Oracle Database currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.”
That last sentence sounds promising until you realize that it’s been there since version 7, and Oracle is now at version 10.
From now on, when someone’s extolling the virtues of Oracle to me, I’ll just ask them, “Oh, and have they fixed their empty string == NULL problem yet?”
Favorite hymns: Here is love
One of my favorite hymns:
Here is love, vast as the ocean,
Lovingkindness as the flood,
When the Prince of life, our ransom,
Interposed His precious blood.
Who His love will not remember?
Who can cease to sing His praise?
He will never be forgotten
Throughout heaven's eternal days.
On the mount of crucifixion,
Fountains opened, deep and wide.
Through the floodgates of God's mercy
Poured a vast and gracious tide.
Peace and love, like mighty rivers,
Flowed incessant from above.
Heaven's peace and perfect justice
Kissed a guilty world in love.
The basic unit of politics: groups, or individuals?
I was listening to an interview segment on NPR today, and one of the interviewees said something that caught my attention. He was making an argument for why one shouldn’t tie the concept of sacrifice to citizenship because, he said, “Different groups, including some privileged or relatively-privileged groups, are going to feel that “we’ve made so many sacrifices”, and that fuels the politics of resentment.” The only specific example of a group that he named was tobacco farmers — an interestingly-loaded choice of an example. But that wasn’t what caught my attention. What I noticed was that all three of the people on the show — this interviewee, the other interviewee, and the show’s host — were all discussing politics as it would relate to various groups. Economic, social, ethnic, whatever category, they were thinking about politics as if the basic unit of politics were the group.
But what is a group? A collection of people, of individuals. Without the individuals that comprise it, there is no group. And any concept that applies to groups can also be applied to each individual. Thus, the reason that racial segregation was wrong was not because it relegated blacks as a group to second-class status, but because it relegated each and every black individual to second-class status. The reason why prejudice is harmful is not because it harms groups, but because it harms individuals, judging them not fairly on their own merits but unfairly on the (perceived) merits of their group.
Groups are easier to talk about, certainly. It’s much easier to say, “Blacks voted overwhelmingly for Kerry, whites went for Bush by a strong majority, and the Hispanic vote leaned slightly towards Kerry”, than it would be to interview all the individual voters and find out why they voted the way they did. (Although exit polls help). And there is quite a bit of utility in talking about groups that way — blacks do, as a group, vote consistently for Democrats rather than Republicans. But do all the members of the group behave that way? Absolutely not — even among groups that are close to uniform (for instance, the black vote in the 2004 elections) there is still a significant number who buck the trend. Pick ten black people at random, and chances are you’ll find one who voted for Bush.
There’s a point there: groups are not the be-all and end-all of political thought, because there are always exceptions to any group classification. And there larger the group, the more exceptions you’ll find. If you only think about politics in terms of groups, you’ll be in danger of forgetting those exceptions, which can lead to policies that make sense for groups but make no sense for individuals.
Let’s illustrate this with a current, very controversial, example: monetary reparations for slavery. The idea is that non-black Americans, as a group, are seen as carrying some responsibility for slavery that they, as individuals, never participated in — and (reparations advocates suggest) should therefore give monetary compensation to black Americans as a group, whether or not any of those black Americans as individuals were enslaved or were the descendants of slaves. (A strong case can be made for reparations to the descendants of slavery, even on an individual basis: if their ancestors had had a chance to earn money for their work, the family inheritance would have been much larger and the descendants would have been better off financially).
As you can see from the way I wrote the above paragraph, reparations makes sense when you look at it from a group perspective — black Americans were oppressed, therefore black Americans should be compensated. But when you start to look at it from an individual perspective, suddenly it gets a lot more complicated, because of all the exceptions. Indeed, most of the arguments against reparations that I’ve read are written from an individual perspective, asking the question, “OK, so who gets paid, who has to pay, and please explain to me why they, as individuals, should be in those categories?”
Thinking in terms of groups is a useful tool, but it should never be forgotten that the basic unit of politics is not the group, it’s the individual. Anyone who forgets that is in danger of advocating policies that appear to do justice on a group level, but end up doing great injustice to individuals.
That’s it… Time for a tea party.
Remember the Fifth Amendment? It wasn’t just about the right to remain silent. It also said, “… nor shall private property be taken for public use, without just compensation.”
Are you wondering why I’m writing about it in the past tense? Because the Supreme Court just threw it out the window, that’s why.
That’s it. There’s nothing stopping the government from taking away your home on any flimsy excuse they can come up with. The Supreme Court is ignoring the plain text of the Constitution, and siding with The Government against The People. Remember “The People”? “… of the people, by the people, for the people” — that “The People”? Yeah. I bet you thought that’s what this country was supposed to be about.
I don’t know how, but we’re going to have to have some kind of public protest similar to the Boston Tea Party here. This must not stand.
Throwing pies at those you disagree with. Yeah. That’s REAL grown-up.
The pie-throwing student who hit William Kristol with a pie on March 29 said he did it to protest “superficial dialogue with no real chance for debate.”
Throwing a pie… superficial… check.
Throwing a pie… dialogue… well, no. It’s less than dialogue.
Throwing a pie… no real chance for debate… check.
If he believes that “superficial dialogue with no real chance for debate” deserves a pie in the face, the next person he should hit with a pie should be… himself.
Logix: Lisp with Python syntax
New discovery of the day: Logix. Logix is Python, with macros. Logix is Lisp, with Python syntax. Logix is a programming language that lets you create programming languages. Logix is whatever language you need it to be.
If you’re familiar with Lisp, you already grasp how powerful macros can be. If all you’ve used is Python, let’s take a look at a practical example. Let’s say you’re writing a threaded program, and throughout your code is scattered constructions like:
_lock.acquire()
try:
print "We have the lock, now doing some work"
finally:
_lock.release()
Wouldn’t it be nice to have a synchronized construct that would do the work for you? You could write it as a function, but then you’d have to pass in the code you want to run, which means turning it into another function or a lambda, and that just creates more boilerplate. With macros, you’d be able to do something like this:
defmacro synchronized(lock, codeblock):
lock.acquire()
try:
codeblock
finally:
lock.release()
Some magic would be required to pass in the codeblock, of course.
Well, in Logix, this is how that macro would be written:
defop 0 "synchronized" "(" $lock:expr ")" ":" $code:block
macro lock code
lock.acquire()
`try:
*code
`finally:
lock.release()
If you’re wondering about the backslashes and backquotes, read the Logix tutorial. It will explain what those do, and in the process introduce you to what Logix is capable of (hint: quite a lot!).
What makes Logix so powerful? The same thing that makes Lisp so powerful: the idea that code is data, and data is code. Which means you can pass around chunks of code to functions, save them in variables, and generally do whatever you want with them. I’ve been meaning to learn Lisp for a while now, but I’ve always been put off by its syntax. That’s because the basic unit of Lisp is the list, and lists inside lists inside lists meant Lots of Irritating Superfluous Parenthesis :-). And I could never get used to writing addition as (+ 1 2 3) instead of 1 + 2 + 3. But Logix is based on Python, and inherits a lot of Python’s syntax. So instead of parens inside parens, you’ve got blocks based on indentation, and colons at the end of lines signalling that a block is about to start. It’s got the same “clean”-feeling syntax that makes Python so easy to read, but it’s also got the power of Lisp: macros, and the ability to pass code objects (of any kind, not just functions) around. I’m looking forward to playing with it and learning it.
UPDATE, 2005-06-06: The code samples I gave above are for Logix 0.4. 0.5 is going to introduce some changes to the underlying structure (in particular, what “chunks of code” are made of is changing), and so the macro syntax may end up looking a little different. If the code above ends up being wrong, I’ll post an update correcting it.
WSGI demystified
One of the most exciting things to come out of PyCon 2005 was the WSGI spec. WSGI is a standard that specifies a common interface for Python Web frameworks.
For a full understanding of the interface there’s no substitute for reading the spec. But in my experience, many people are too busy to read specs. So here’s an executive summary of how WSGI works.
WSGI actually specifies two interfaces, one for the server to talk to the application, and one for the application to talk to the server. For the server to talk to the application, it calls a function (which the application supplies) which should accept two arguments, environ and start_response. The environ argument will be a dictionary containing the HTTP environment (including variables like REQUEST_METHOD and PATH_INFO), and the start_response argument will be a function.
For the application to talk to the server, it should first prepare any headers it wants to send, then call the start_response function that it was handed, with a status code and a set of headers. Then it should prepare the body of the response as a list of strings. (An iterator can be used instead of a list). To pass the response body back to the server, it should simply return it.
Once the server receives the list (or iterator) from the application, it simply sends those strings, one at a time, to the client (i.e., the user’s Web browser).
Got that? Here’s what it looks like in Python code:
def simple_app(environ, start_response):
status = '200 OK'
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
return ['Hello world!n']
There you have it — the WSGI interface in a nutshell. The server invokes the application by calling a function, then sends the function’s return value(s), one at a time, back to the client. Pretty simple, eh?
There are a lot of subtleties that I haven’t covered, of course, such as the contents of the environ dictionary, or the fact that the application doesn’t have to be a function, but can be any callable object (such as a class). To grasp those, you’ll have to read the spec. But just understanding the concepts presented here is a good jumping-off point to make the spec a lot less mysterious.
Update, 2005-08-15: There’s a simpler way to write my simple_app example: as a generator. In fact, that’s probably a simpler way to write any WSGI app. Instead of building a list of strings and returning the list, simply use yield statements, thus:
def simple_app(environ, start_response):
status = '200 OK'
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
yield 'Hello world!n'
yield 'Second line goes heren'
Simple, eh?
Long filenames in Windows
Long file names in Windows are a hacked-in kludge, and sometimes it shows. Here’s an example of how, if you’re not careful, you can lose data:
C:TEMP>mkdir robintemp
C:TEMP>cd robintemp
C:TEMProbintemp>dir
Volume in drive C has no label.
Volume Serial Number is C899-6ADC
Directory of C:TEMProbintemp
01/28/2004 02:26p <DIR> .
01/28/2004 02:26p <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 34,996,314,112 bytes free
C:TEMProbintemp>echo Hi > longfi~1
C:TEMProbintemp>dir
Volume in drive C has no label.
Volume Serial Number is C899-6ADC
Directory of C:TEMProbintemp
01/28/2004 02:26p <DIR> .
01/28/2004 02:26p <DIR> ..
01/28/2004 02:26p 5 longfi~1
1 File(s) 5 bytes
2 Dir(s) 34,996,314,112 bytes free
C:TEMProbintemp>dir /x
Volume in drive C has no label.
Volume Serial Number is C899-6ADC
Directory of C:TEMProbintemp
01/28/2004 02:26p <DIR> .
01/28/2004 02:26p <DIR> ..
01/28/2004 02:26p 5 longfi~1
1 File(s) 5 bytes
2 Dir(s) 34,996,314,112 bytes free
C:TEMProbintemp>echo Hi > longfilename01
C:TEMProbintemp>dir /x
Volume in drive C has no label.
Volume Serial Number is C899-6ADC
Directory of C:TEMProbintemp
01/28/2004 02:27p <DIR> .
01/28/2004 02:27p <DIR> ..
01/28/2004 02:27p 5 LONGFI~2 longfilename01
01/28/2004 02:26p 5 longfi~1
2 File(s) 10 bytes
2 Dir(s) 34,996,314,112 bytes free
C:TEMProbintemp>mkdir ..foo
C:TEMProbintemp>copy *.* ..foo
longfilename01
longfi~1
Overwrite ..foolongfi~1? (Yes/No/All): n
1 file(s) copied.
C:TEMProbintemp>
See what happened? The file longfilename01 was copied first, thus creating the short filename longfi~1 according to Microsoft’s filename-creation rules. But the next step was to copy the file longfi~1 from the source directory, and oops! It already exists in the destination!
What should have happened here is that the file longfilename01 should have kept its short file name longfi~2 when it got copied; then there wouldn’t have been a filename collision.
And lest you think this is a contrived example: I ran into exactly this problem about a year and a half ago when trying to do some backups. The solution I came up with was to hack together a quick script that would first copy all the 8.3 filenames, and second copy all the long file names. Then I could be sure that the shortnames chosen by Windows wouldn’t accidentally conflict with a file that was going to get copied over later.
I hope this spares someone some pain someday.
SQLite embedded in Tiger
In the middle of Apple’s Web site, in a discussion of their new Core Data framework, comes the following quote:
SQLite is an open source embedded database that is included in Tiger [...]
This makes me happy. SQLite is one of the most useful embedded-database solutions I’ve come across. It’s open-source, has Python bindings, and works with the very cool SQLObject module.
Vim Outliner
I’ve just discovered a very useful outliner for Vim. I’d never really been happy with the todo list management programs I’d tried before — well, now I can use my favorite text editor to track to-do lists and other miscellaneous items for Getting Things Done. I may have to write a longer post about it once I’ve used it for a little while.
Pardon my dust…
My new blog is up, and will be getting some content soon. I’m still getting the look worked out, so you might see some changes as I re-arrange categories, tweak the look of the title, etc. No worries!
