The Wireless Future

Friday, December 23rd, 2005

Nothing’s so dated as yesterday’s futurism. In 1993 naming a high-tech magazine “Wired” must have seemed really hip. Today “wired” devices are yesterday’s tech. No one wants a mess like this one, but everyone’s got one:

cable disaster

Slowly that’s starting to change. Network, speaker, microphone, mouse, and keyboard cables are already going wireless. Disks, cameras, and monitors are going to follow. By the end of this decade, most systems should have a power cord and nothing more. By 2020 even the power cord might vanish. It’s obvious the future belongs to wireless. After all, every cable you can remove from your system is one less leash tethering you to your desk. 802.11 is de rigueur for notebooks and increasingly common in desktops. Cell phones let us communicate from anywhere. Infrared remote controls freed us from commercials and gave rise to the clicker. And Bluetooth is rapidly becoming the preferred way to connect computers to low bandwidth peripherals like keyboards and mice.

Dilbert Blog Jumps the Shark

Friday, December 23rd, 2005

The Dilbert Blog recently moved from its normal humorous focus of pointing out human stupidity to consideration of one of the most basic issues in human rights, the right not to be tortured. Frankly that right’s so basic we usually don’t even state it as such, but Scott Adams think it’s open for debate. However rather than seriously considering it he raises it as a ridiculous, hypothetical question, “would you accept the nuclear destruction of NYC (for example) to avoid torturing one known terrorist?” and just in case anyone calls him on how silly the question is, or tries to fight back with their own hypothetical he adds, “No fair extending my question to more ambiguous hypotheticals.” Then he claims he wins the debate by knockout because people tried to address reality instead of his false hypothetical. I’m not sure if my comment will get through moderation so I thought I’d post a slightly edited version of it here.

Scott, you knocked yourself out with a ridiculous question before the match started. Creating a hypothetical to get the answer you want may help win a debate, but never gets you the truth. If you seriously want to think about torture, you need to consider what actually happens, not hypotheticals. The real question isn’t torturing a terrorist to prevent the nuclear destruction of New York. Asking whether someone would do that is as relevant as the old joke asking whether the Pope should sleep with a woman to save the Church.

Here’s the reality: Al Qaeda higher-up Ibn al-Sheikh al-Libi is send by the C.I.A to Egypt to be tortured. To get it to stop he makes up a story about Iraq training Al Qaeda in the use of biological and chemical weapons. We go to war and more than 100,000 people die. That’s not a hypothetical. That happened. It’s still happening.

As to your question of why interrogation works if torture doesn’t, you should probably talk to some real interrogators to find out. For example, according to ex-F.B.I. agent Dan Coleman in in the New Yorker:

Coleman was angry that lawyers in Washington were redefining the parameters of counter-terrorism interrogations. “Have any of these guys ever tried to talk to someone who’s been deprived of his clothes?” he asked. “He’s going to be ashamed, and humiliated, and cold. He’ll tell you anything you want to hear to get his clothes back. There’s no value in it.” Coleman said that he had learned to treat even the most despicable suspects as if there were “a personal relationship, even if you can’t stand them.” He said that many of the suspects he had interrogated expected to be tortured, and were stunned to learn that they had rights under the American system. Due process made detainees more compliant, not less, Coleman said. He had also found that a defendant’s right to legal counsel was beneficial not only to suspects but also to law-enforcement officers. Defense lawyers frequently persuaded detainees to cooperate with prosecutors, in exchange for plea agreements. “The lawyers show these guys there’s a way out,” Coleman said. “It’s human nature. People don’t cooperate with you unless they have some reason to.” He added, “Brutalization doesn’t work. We know that. Besides, you lose your soul.”

Transit Slaves

Thursday, December 22nd, 2005

Billionaire Mayor Michael Bloomberg is orchestrating a campaign here in New York to demonize the transit union for striking, but it doesn’t pass the smell test. The union and the MTA were very close to a deal when at the last minute the MTA pulled a really steaming turd of a proposal out of their ass and dropped it on the table. They proposed a two-tier contract in which current workers would get an acceptable package, but future hires would get a worse deal. This is a very common and disgusting tactic in contract negotiations. Financially it was trivial: about $20 million over the three years of the contract, less than the city is losing every hour the strike continues, less than half of what the MTA gave away this year by cutting the fare in half on holiday weekends. (I think that saved me a total of $4. I certainly would be willing to give that $4 back if it meant the trains would be running now.)

Of course the MTA’s proposal wasn’t about the money. It’s a common and disgusting tactic to weaken worker solidarity over the long term by pitting the current workers who get to vote on a proposal against the future ones who don’t. I know if I joined a union where people who joined before me got a better deal than I did, I’d be very angry at the union and unlikely to support them. The NYPD now has such a contract. Fortunately the transit workers have more moral fiber than the PBA, and refused this offer. That was the proximate cause of the walkout.

The mayor is accusing the transit workers of being thugs. Nothing could be further from the truth. These are hard-working people with not particularly great jobs who deserve a fair shake from the city. Bloomberg seems particularly incensed that the union is violating New York’s Taylor Law. This is a typical example of government inteference in the free market. It requires people to work without a contract, and is vastly one-sided in favor of management. Now a judge is threatening to jail the union’s leaders and fine individual workers if they refuse to return to work without a contract. This borders on forced labor.

Another example: the stop-loss orders by Bush prohibiting soldiers from leaving the Army after they’ve served their contracted terms. Not only must they continue to work without a contract. They aren’t even allowed to quit. Of course, the government could simply agree to pay soldiers/transit workers/teachers/etc. a high enough wage to make the job attractive in a free marketplace, but why bother when you can just pass a law forcing people to work instead? It’s interesting how Republicans claim to be in favor of the free market until the workers start demanding a fair shake. Then they tumble all over themselves passing laws prohibiting people from exercising their rights to negotiate as a free actors in a free marketplace. What right-wingers really favor is socialism for the rich and capitalism for the poor. No, that’s too generous. What’s really being pushed here is fascism, not even capitalism. When I advocate capitalism for everyone, I get accused of being some left-wing pinko commie faggot. (Just watch the comments.)

What the mayor should be doing is organizing alternate means of transportation to get people around during the strike. Instead he’s holding press conferences blaming the union for wanting a fair deal, and refusing to work without a contract. Of course, the mayor really has nothing to do with the negotiations. The way New York is organized that’s the responsibility of Governor George Pataki, and he’s nowhere to be seen. He’s a lame duck who’s hoping to run for president in 2008. He probably can’t win the Republican nomination, but he certainly can’t win another term here in New York, especially after his see-nothing/hear-nothing/do-nothing approach to the strike.

Airline Miles Credit Cards

Wednesday, December 21st, 2005

Many people prefer airline miles credit cards such as the AAdvantage Mastercard or the Delta American Express card. However, these can be some of the most expensive cards out there. Annual fees range from $85-$135 a year, the terms are outrageous, the interest fees usurious, and the miles virtually unredeemable.

Airlines calculate the cost of each frequent flier mile as approximately 1.5 cents. You can buy miles (up to about 15000 miles per year for airline) for less than 3 cents per mile. Given the difficulty of redeeming miles as well as the likelihood the miles will expire or the airline go bankrupt before I use them, I generally round the value of a mile down to one penny per mile. When applying for such a card, keep these numbers in mind.

For instance, 15,000 miles is just barely worth it if the annual fee is $135 per year. Most cards offer no annual fee for the first year, so you can do better if you simply refuse to renew each card, and instead apply for a new card a month later. This also provides some additional protection from having your card number stolen, and from unscrupulous vendors and sites that automatically renew subscriptions for goods and services with or without permission. (I normally subscribe to a lot of onetime use sites in the last month of each card.)

All this applies only if you pay your balance in full each month. Interest rates on these cards are so high that if you keep any balance at all, you’d be better off using a low interest card from your credit union and just buying your airline tickets with the money you save.

POST vs. PUT

Thursday, December 8th, 2005

Musicians will understand this analogy. Have you ever tried to learn a piece that goes the wrong way? That is, you’re playing along and it’s so obvious where the next notes are going to go and instead the piece goes off in a completely different direction. Half the time you find yourself playing the notes you think the piece should use rather than the notes it does use.

For me, understanding the difference between HTTP POST and PUT is very much like that. I’ve had a great deal of trouble understanding explicitly RESTful protocols like APP because they follow the actual definition of POST and PUT instead of what is to me clearly the right definition. However, I think I’m finally starting to get it.

My mistake is in thinking that anything that creates a new page is a PUT and anything that changes an existing page is a POST. In SQL terms, POST is an UPDATE and PUT is an INSERT. However, that’s not the case. In fact, the mistake is in trying to model PUT and POST in terms of INSERT and UPDATE. They really aren’t even close.

What actually happens is this. PUT puts a page at a specific URL. If there’s already a page there, it’s replaced in toto. If there’s no page there, a new one is created. This means it’s like a DELETE followed by an insert of a new record with the same primary key.

POST, however, really has no equivalent in SQL. POST sends some data to a specified URL. The server on the other end of this URL can do whatever it wants with this data. It can store it somewhere private. (HTTP 204 NO CONTENT). It can store it in the page at the URL that was POSTed to (HTTP 205 RESET CONTENT). It can store it in a new page, in which case it returns the URL of that page in the Location field of the HTTP response header (HTTP 201 CREATED). It can use it as input for several different existing and new pages. It can throw the information away. It can insert, update, or delete records in a database (or all of the above). It can start brewing coffee (HTTP 202 ACCEPTED). It can start global thermonuclear war. POST is decidely non-side-effect free and non-idempotent.

PUT is a much more limited operation that never does anything more than PUT one page at a specified URL. It is idempotent, which is a fancy way of saying that doing it twice is the same as doing it once. Both PUT and POST can be used to create new pages. However PUT should be used when the client specifies the location for the page. PUT is normally the right protocol for a web editor like DreamWeaver or BBEdit. POST is used when the client gives sends the page to the the server, and the server then tells the client where it put it. POST is normally the right protocol for a blog editor like TypePad or anything that inputs into a content management system. In SQL analogy, POST is an INSERT with an automatically generated primary key, and PUT is an INSERT that specifies the primary key in the INSERT statement.

Red-breasted Sparrow

Wednesday, December 7th, 2005

There’s no such thing as a Red-breasted Sparrow. There is, however, a female Eastern Towhee, which when you see it for the first time looks like nothing so much as a Red-Breasted Sparrow. However, if you look in your field guide for “Red-Breasted Sparrow” you won’t find it. If you keep looking a few pages past the sparrows, you’ll normally find the towhees though. But even that may not be enough.

To make matters even more confusing for the novice, the female Eastern Towhee does not in fact have a red breast. It has red flanks. However when you see it in the field, it’s often foraging on the ground so the breast is hidden. Consequently it ends up looking like a cross between an American Robin and a sparrow. Furthermore, the male Eastern Towhee doesn’t really look like a red-breasted sparrow at all, and some of the more basic field guides only show the male. So if you didn’t find Eastern Towhee in your field guide, or didn’t make the connection between the one in the book and the one in the field, you can now Google for “red-breasted sparrow” and find this page. How cool is that?