rc3.org

Strong opinions, weakly held

Month: April 2005 (page 1 of 6)

President Bush evades question about extraordinary rendition

I was shocked that one of the questions in President Bush’s press conference last night, the CBS White House correspondent asked a question about extraordinary rendition:

Mr. President, under the law, how would you justify the practice of renditioning, where U.S. agents who brought terror suspects abroad, taking them to a third country for interrogation? And would you stand for it if foreign agents did that to an American here?

Let’s look at President Bush’s answer and count the lies.

That’s a hypothetical, Mark. We operate within the law and we send people to countries where they say they’re not going to torture the people.

President Bush fell back on his usual stance of not answering hypotheticals in responding to the question of whether he would stand for another country kidnapping Americans and sending them off to be tortured. The second sentence is just a lie. We send people to places like Afghanistan where they are tortured by Americans. (See the case of Khaled el-Masri for more.) Furthermore, is a country saying that they won’t torture people really all that’s needed? Iraq said it didn’t have weapons of mass destruction — we didn’t take their word for it. It’s a bit disingenuous to rely on the word of Syria or Egypt when they say that they won’t torture the people we send there for interrogation (especially when we keep doing it after people who we have sent there inform us that they were, in fact, tortured). Not that this requires such detailed inspection, everybody knows that it’s a pathetic attempt to evade responsibility.

But let me say something: the United States government has an obligation to protect the American people. It’s in our country’s interests to find those who would do harm to us and get them out of harm’s way. And we will do so within the law, and we will do so in honoring our commitment not to torture people. And we expect the countries where we send somebody to, not to torture, as well. But you bet, when we find somebody who might do harm to the American people, we will detain them and ask others from their country of origin to detain them. It makes sense. The American people expect us to do that. We — we still at war.

Ignore all of the propaganda about his responsibility to protect the American people. Anybody “might” do harm to the American people, and indeed, at least a few of the people subjected to extraordinary rendition were no more likely to harm Americans than you or I. Again he says he expects countries to which people are rendered not to torture people — an odd statement given that there is no other reason to practice extraordinary rendition in the first place. Finally, he tells a big lie in saying that they are being detained in their countries of origin. Maher Arar, a Canadian citizen, was sent to Syria (where he was born but had not lived since 1987). Khaled el-Masri was a German citizen of Lebanese origin who was sent to a prison in Afghanistan. I’d love to provide more examples, but the list of people who we have kidnapped and shipped around the world is secret.

One of my — I’ve said this before to you, I’m going to say it again, one of my concerns after September the 11th is the farther away we got from September the 11th, the more relaxed we would all become and assume that there wasn’t an enemy out there ready to hit us. And I just can’t let the American people — I’m not going to let them down by assuming that the enemy is not going to hit us again. We’re going to do everything we can to protect us. And we’ve got guidelines. We’ve got law. But you bet, Mark, we’re going to find people before they harm us.

This is a dirty slur against people who care about human rights. It’s not that I don’t think there are terrorists who want to kill Americans, it’s that I don’t think it’s right to kidnap people and send them to foreign prisons where they’ll be tortured under the supervision of CIA interrogators. This sort of Manichean thinking infuriates me. I realize that there could be costs to upholding human rights, I wish that the people who are in favor of torture could acknowledge that there are costs to that stance as well.

What amazes me is the tightrope that President Bush tries to walk. He spends half his time saying that these people aren’t being tortured (or if they are, it’s not because we wanted that way), and the rest of the time making it clear that he thinks that we have to protect ourselves by any means necessary. Both sides of the argument are completely dishonest, but that doesn’t stop him from making them.

iPod Shuffle risks

First, I heard that a guy I know had mistakenly thrown out his iPod Shuffle in the Google cafeteria the day after he got it, and now I read about Cameron Purdy flushing his iPod Shuffle down an airplane toilet. Maybe that’s the secret to Apple’s financial success — releasing expensive but easy to mistakenly discard products. You know the Shuffle is a great product because in both cases, the victims have expressed their intent to immediately give it another go.

Hitting the big time

You know you’ve hit the big time when domain squatters register incorrect spellings of your name.

Microsoft and Ralph Reed

Microsoft is paying right-wing lobbyist Ralph Reed $20,000 a month to “advise” them on trade issues. Reed is most famous for running Pat Robertson’s Christian Coalition. You’ll probably see this reported everywhere as breaking news, but it’s not. Salon’s Scott Rosenberg criticized Microsoft for hiring him five years ago.

This is just in the news again because Microsoft has pulled back on its support for a bill in Washington barring discrimination based on sexual orientation.

New internet or new bubble?

It has certainly seemed to me that lately lots of money is being poured into interesting Web projects. Furthermore, the big Web companies seem to be innovating. Once again, people I’ve known for years seem to be reaping the benefits, getting hired to do fun stuff or working at startups. Janice Fraser says it’s a whole new Internet. Jason Kottke says maybe it’s a whole new Internet bubble.

Update: Mena Trott responds to Jason.

GROUP_CONCAT

A reader points out that there’s a function in MySQL 4.1 called group_concat that deals with the pagination problem that I mentioned.

Fun with databases, or solving a problem by talking out loud

This week I’ve been working on a report. Originally, everything on the report was pulled from one table, but it needs to include data from the original table, plus some information from a second table that is associated with each record in the original table. The relationship is many to one, and in some cases, there may be no data in the second table, so I have to use an outer join, which returns a result set like this:

IDnameattribute
1Rafeprogrammer
1Rafewriter
2Boblawyer
3James
4Michaelengineer
4Michaelcook
4Michaelphotographer


That has to be converted to a data structure that includes single attributes for ID and name, and an array of attributes (which may be empty). When you add pagination, things get a little bit confusing. Let’s say I want to display the records three at a time. If the one to many relationship were not involved, I could just stick a LIMIT 3 clause in MySQL code. That’s how the report works right now. Unfortunately, now that the outer join has entered the picture, LIMIT 3 would limit the results to 3 rows, which includes only 2 records. LIMIT 5 would be even worse, you’d get all of records 1, 2, and 3, and part of record 4. Ouch.

One option is to leave out the limit, pull back the entire result set, and handle the pagination in my application code. That would be fine except that we’re dealing with hundreds of thousands of records. In most cases they’re filtered, but I still don’t want to risk queries that could return thousands of results when I only want to deal with a small fraction of them.

Faced with a somewhat ugly problem (which would be abstracted away in the Java world by an ORM solution like Hibernate), I’ve been reluctant to start coding. Instead I’ve spent the whole week just thinking about the problem, talking to people about it, and doing research. Normally I have a bent toward procrastination, but in some cases it’s my friend. Rather than writing something that I’ll just throw away, it’s better to wait and really think about the problem before attacking.

I’ve thought of all sorts of bizarre approaches, many of which would take weeks to write and may not solve the problem anyway. I then thought that I just needed to use the LIMIT clause a bit differently. The plan was to fetch the results with a LIMIT clause just as I am now, iterate over the results and move the data to the new data structure that I need, and then, if the query doesn’t return enough results to make up the page, go back and run the query again with a new limit and offset, and continue iterating to build the data structure.

This seemed like it would make sense, and it does solve the potential performance problem that occurs when you retrieve thousands of records even though you only need a few of them. This works well for the first page of results, but things get messy from there. Let’s say that to display 5 records on the first page, you use 12 rows in the result set. You store the offset between requests, and when the user hits the “next page” link, you run the first query with an offset of 13. That’s fine, unless another record has been added to the database. Let’s say it takes up 2 rows. Then your current result set is thrown off. This happens if the outer join isn’t involved, but the only cost is that you’re seeing the set of 5 records from that moment in time, not the 5 records subsequent to those on the first page of results. When a “record” consists of an undetermined number of rows in a result set, then everything is thrown off. You’re back in partial record territory with no easy way to figure out that’s what’s going on.

So this solution is insufficient. Two ways around this one are to keep the primary keys around rather than the offset, or even to work off of the time stamps on the records. Let’s look at each. When you produce a page of results, you can keep the ID of the first and last items on the page. If you’re lucky, you use an auto-incrementing ID field of some kind, so you can assume that earlier items have IDs less than the lowest ID on the page, and later items have an ID higher than the highest ID on the page. You can do the same thing with timestamps. Save the time stamps of the first and last records on the page to serve as markers for the next and previous pages.

The glaring problem with this approach is that it only works if your report can only be ordered based on time. If you want to produce a report that displays records 10 per page and has 50 records total, sorted by name, then IDs and timestamps are useless for paginating the results. Theoretically names would be useful, but names may not be unique, and if they’re not, then that approach won’t work either.

Yet another approach is to attack the problem with the IN clause. MySQL 4.1 supports subqueries, so you can theoretically write a query like this:

select people.id, people.name, people.attribute
from people left join attributes on people.id = attributes.person_id
where people.id in (select id from people limit 10)

Unfortunately, that won’t work, because you can’t use LIMIT inside a subquery. However, you can run two queries. The first gets a list of IDs to use in the IN expression in the query above, in place of the subquery. That’s looking like the best solution so far. Anyone have any better ideas?

Body and soul, indeed

Jeanne at Body and Soul has an incredible post today about the challenge of confronting your own weakness.

Why Kerry lost

Thomas Frank has written an article for the New York Review of Books that explains convincingly why Democrats are getting their heads handed to them by Republicans. It’s entitled, appropriately enough, What’s the Matter With Liberals? In it, he describes the phenomenon (also documented elsewhere) where many Americans see educated liberals as the “elite” that exercises undue influence over their lives, and ignore the economic elite. He rightly criticizes Democrats for allowing this to happen, because they have surrendered any moral authority they might have on economic issues to feed at the money trough with the Republicans. Anyway, read the whole article.

Gay rights in corporate America

There’s a story emerging that’s worth following. Last year, Microsoft publicly supported a bill in the Washington state legislature barring discrimination based on sexual preference. This year, they did not publicly support that bill, and some representatives of the American Taliban took credit for it. Steve Ballmer sent out an email to all Microsoft employees stating that Microsoft, he, and Bill Gates were all opposed to such discrimination, but that Microsoft has to respect the bigots it has on the payroll, and besides, it’s a public company and can’t afford to piss people off by weighing in on these issues. This is where Robert Scoble came in. He got permission to make the memo pubilc and blasted it on his weblog. Agree with him or disagree, you have to admire his guts.

Anyway, the story is unfolding as more Microsoft employees comment. The best place to follow the story as it unfolds is probably Scoble’s weblog.

Update: A reader writes to inform me that “sexual orientation” is preferable to “sexual preference,” which makes sense to me.

Older posts

© 2024 rc3.org

Theme by Anders NorenUp ↑