Monday, January 31, 2011

Obamacare is doomed

SCOTUS will have the final say of course, but this sure sounds like the death knell to me:


"Because the individual mandate is unconstitutional and not severable the entire Act must be declared void."


Now if I could just figure out how to use my gift of prophecy (or is it a curse?) to pick stocks.

Monday, January 24, 2011

Geek corner: on blurring the distinction between code and data

A while back I wrote this as a throwaway comment in a discussion on comp.lang.lisp:


IMHO (one of) the hallmark(s) of "real" programming is a general blurring of the distinction between "compile time" and "run time". Compilation is just one kind of optimization. Running that optimization as a batch job makes it easier to apply, but the real challenge is refining the optimization on a continual basis in response to new information, including changes to the operational spec.


Someone sent me an email asking me to expand on that thought, and I promised I would. It took me a lot longer to render that expansion into words than I anticipated, so I thought I'd put it up here in case others might find it useful.

Writing programs typically goes something like this: First, a specification of what the program is supposed to do is written. Then that specification is rendered into code. The code is then (typically) compiled into some kind of an executable image. That image is then delivered to users who run the program and (again, typically) provide it with input, which we call "data".

This distinction between code and data is purely artificial. On a fundamental theoretical level there is no distinction between the two. All "code" can be viewed as "data" that is fed as input into an interpreter or a compiler, and all "data" can be viewed as a "code" for a specialized interpreter (or compiler) that comprises the application. From the computer's point of view it's all the same: bits go in, bits come out. Whether those bits are code or data is in the eye of the beholder.

We choose to make the (artificial) distinction between code and data because doing so has benefits. "Programs" can serve to bridge the often severe impedance mismatch between the mental states of typical users and the underlying reality of computational hardware. They can also restrict what a user can do in order to prevent him or her from getting the machine into undesirable states. And constraining what a program does allows optimizations that makes the resulting code run faster.

But making this distinction also has drawbacks. There is, obviously, a fundamental tradeoff between writing "programs" according to certain assumptions and constraints (and hence availing yourself of the benefits of those assumptions and constraints) and the freedom and flexibility to discharge those assumptions and constraints. This is the reason that code "maintenance" is considered an activity in its own right. Code doesn't require "maintenance" the way that mechanical systems do. Code doesn't degrade or wear out or require periodic lubrication. What happens instead is that the users of a program come to the realization that what the program does isn't quite what they wanted. There are bugs, or missing features, or parts that run too slowly or consume too much storage. So now you have to go back and change the code to conform to new assumptions and constraints. Often this is more work than the initial development.

The important point is not that these things happen, but that they happen because of an engineering decision, namely, the strong distinction between code and data, and the correspondingly strong distinction between programmer and user. There is nothing wrong with the decision to make this distinction. There are perfectly sound reasons to make this decision. But it is a decision. And because it is a decision, it can be changed. And it often is changed in small ways. For example, a spreadsheet blurs the distinction a little. Embedding a macro programming language like Visual Basic into, say, a word processor blurs the distinction more. Javascript probably blurs the distinction more than anything nowadays. Anyone with a web browser and a text editor has a Javascript development environment.

The line between code and data is blurrier now than it used to be, but it is still quite distinct nonetheless. There is still a strong division of labor between those who write web browsers and Javascript interpreters and those who write Javascript, and also between those who write Javascript and those who typically use web pages. There are still fairly clear distinctions between "scripting" languages, which tend to be easier to use but slow, and "real programming languages," which tend to be harder to use but faster, though this distinction too is beginning to blur as well. But the final merging of code and data, coder and user, compile-time and run-time, is still a ways off, and for a very good reason: it's really, really hard to do. That is what I meant by my original quip.

Whether or not the trend towards blurring the distinction will continue to the point where it disappears entirely is an open question. There are theoretical reasons to believe that a complete blurring might not be possible or even desirable. But the trend is inarguably in that direction.

One of the reasons I like to program in Lisp in general and Common Lisp in particular (and one of the reasons I think CL has had so much staying power) is that it is still the language that most effectively blurs the distinction between code and data, compile-time and run-time. (It doesn't blur the distinction between coder and user because of its abstruse syntax. Like I said, this is a really hard problem.) It's the only language in existence that allows you to change the lexical syntax while a program is running. On top of that, you can get native-code compilers for it. That is a stunning -- and massively under-appreciated -- accomplishment. Suddenly decide you want to use infix notation to write your code? You can do that, and you don't have to stop your already-running program in order to do it. That is mind-blowing. It's incredibly powerful. And, of course, it's dangerous, and if you don't know what you're doing you can get yourself into deep trouble if you're not careful. Solving that part of the puzzle is still an open problem.

Friday, January 14, 2011

The quantum conspiracy

I gave a talk at Google the other day entitled, with tongue-in-cheek, The Quantum Conspiracy: What Popularizers of Quantum Mechanics Don't Want You to Know. It's basically a recap of this paper that I wrote ten years ago. Despite my efforts to enlighten the world, you will still read in the popular press nonsense like, "When an aspect of one [entangled] photon’s quantum state is measured, the other photon changes in response, even when the two photons are separated by large distance."

No, nothing changes when you "measure" an entangled photon. Watch the talk (or read the paper) to find out why. Physicists have known this for decades now. Why does the popular press have such a hard time getting it right?

I've been doing it wrong

For nearly forty years I've been putting two spaces after a period. Turns out that's wrong. In my defense I will point out that when I started typing back in the day I was using a manual typewriter, where using two spaces is apparently not quite so wrong. Still, I have come to see the error of my ways and I will do my best to go forth and sin no more. Gonna be a hard habit to break though.

Monday, January 10, 2011

Two data points...

... to dispel the myth that there is anything at all unique about Islamic radicalism (as opposed to other forms of radicalism):

1. Terrorism in Europe has been steadily declining since 2007, and the overwhelming majority of terrorist attacks are carried out by non-Islamic groups.

2. The Westboro Baptist Church is planning a rally in honor of Jared Lee Loughner, the man who killed six people in Arizona, including a nine-year-old child.

Actually, that should be three data points, since Jared Lee Loughner is not a Muslim either.

Saturday, January 08, 2011

Is the U.S. on the brink of fascism?

This article from 2009 (and republished last month) has turned out to be disturbingly prescient:


In the first stage, a rural movement emerges to effect some kind of nationalist renewal (what Roger Griffin calls "palingenesis" -- a phoenix-like rebirth from the ashes). They come together to restore a broken social order, always drawing on themes of unity, order, and purity. Reason is rejected in favor of passionate emotion. The way the organizing story is told varies from country to country; but it's always rooted in the promise of restoring lost national pride by resurrecting the culture's traditional myths and values, and purging society of the toxic influence of the outsiders and intellectuals who are blamed for their current misery.

...

In the second stage, fascist movements take root, turn into real political parties, and seize their seat at the table of power. Interestingly, in every case Paxton cites, the political base came from the rural, less-educated parts of the country; and almost all of them came to power very specifically by offering themselves as informal goon squads organized to intimidate farmworkers on behalf of the large landowners. The KKK disenfranchised black sharecroppers and set itself up as the enforcement wing of Jim Crow. The Italian Squadristi and the German Brownshirts made their bones breaking up farmers' strikes. And these days, GOP-sanctioned anti-immigrant groups make life hell for Hispanic agricultural workers in the US. As violence against random Hispanics (citizens and otherwise) increases, the right-wing goon squads are getting basic training that, if the pattern holds, they may eventually use to intimidate the rest of us.

...

America's conservative elites have openly thrown in with the country's legions of discontented far right thugs. They have explicitly deputized them and empowered them to act as their enforcement arm on America's streets, sanctioning the physical harassment and intimidation of workers, liberals, and public officials who won't do their political or economic bidding.


People are pointing out that Sarah Palin's website literally put crosshairs on Gabrielle Giffords and 19 other congress members.

This is getting pretty scary.

Friday, January 07, 2011

Religion is not the problem

[A response to Don Geddis]:

Don,

I certainly agree with you that Salman Taseer's murder and the resulting response is dismaying on many levels. It is also true that, as you say, "separating belief from truth" is a contributing factor to the madness. But I stand by my position that it is not religion per se that merits our concern. The population of the United States is overwhelmingly religious, and has been for all of its history. By way of rather stark contrast, Nazi Germany was, at least in its doctrine, purely secular. (Sadly, it still is.) Those examples alone are enough IMO to conclusively refute the proposition that "It's only a matter of luck if some of the faithful happen to wind up in a positive place for society rather than a negative one." There are horror stories aplenty -- and inspirational tales too of course -- on both sides of the divide.

The problem is not religion, the problem is fundamentalism, and secular fundamentalism is no better than religious fundamentalism. When doctrine trumps facts civilization loses, whether that doctrine is Allah or the Dear Leader.

Now, it is true that Islam does seem to lend itself more to fundamentalism than other belief systems, but it's far from clear whether fundamentalism is an inherent feature of Islam, or just something that happens to be brought to the fore by contemporary geopolitics. The protests of Taseer's murder from the Muslim world are certainly not as loud and numerous as one would hope, but neither are they non-existent. One must wonder, too, how many muslims condemn the murder in their hearts, and would like to condemn it openly but choose not to out of understandable fear for their safety and that of their loved ones. There is also a question of whether the press coverage of this event has been, to coin a phrase, fair and balanced. The most populous Muslim country in the world is Indonesia, and I can't find a single story about what Indonesians have to say about any of this.

My basic position is unchanged by the response to Salman Taseer's tragic death. Religion is a drug. Literally. Belief exerts physical influences on the body and brain by way of the placebo effect. Like any drug, it comes in forms of varying potency and effectiveness. You can get addicted. It can be abused. Myth is the stuff from which the drug is made. If recent history teaches us anything it is that you can't deal effectively with a drug addiction problem by getting up on a soap box and proclaiming that drugs are evil and people should just say no.

It's really important that we get this right because the problem is very real and very serious, and we're not going to solve it if we start with a false premise about what the problem actually is.

The Evil in Religion

[A guest post from Don Geddis]

The Atheist trinity (Dawkins, Harris, Hitchens) criticizes religion as a whole. Ron has attempted to break "religion" in to two distinct parts: fundamentalism, and mythology. Ron says (with the help of author Karen Armstrong) that fundamentalism may cause problems in the world, but that myth is a significant and valuable part of human culture. (He has even spent time promoting his own favorite myth, Loki.)

But it seems to me, that in evaluating this distinction, we must address the recent case of Governor Salman Taseer's assassination by his own bodyguard, in Pakistan.

No, not the evil within the assassin's warped brain. There are small numbers of broken people in every culture and every organization. You can't judge a group by its worst members.

No, the problem is the town itself, which has erupted in public support for the vigilante betrayer. And, note well what the Governor's "crime" was: a devout Muslim, he dared to openly discuss whether death sentences for blasphemy (as opposed to just severe punishment!) might be overly harsh, and perhaps applied in a discriminatory manner against the weakest members of society. For merely talking about this issue, the assassin decided to be judge and jury and executioner ... and the people celebrate his choice.

Perhaps it is just one strange warped town in Pakistan. Surely the millions and millions of moderate Muslims don't at all agree with this one wacko.

Alas, no. What do we hear from the Muslim community? Either outright support, or else ... silence. Where is the outrage from the Muslim community?

We're forced to conclude that it is not just radical fundamentalism that brings evil into society (as Ron and Armstrong wish us to believe). It appears that religion itself is quite capable of encouraging and rewarding horror and suffering.

Once you separate Belief from Truth (via the tricky mechanism of Faith), the sheep can be led pretty much anywhere. It's only a matter of luck if some of the faithful happen to wind up in a positive place for society rather than a negative one.

Yes, mythology satisfies some deep human needs. Yes, our myths provide us with a lot of good. But they cause a lot of evil too. And religion doesn't really offer a reliable way to separate the two.

Tuesday, January 04, 2011

The Cosmo and Me, Part 2

Because it appears that we may get dragged kicking and screaming into filing a lawsuit against the Cosmopolitan Resort and Casino I thought I should take a look at all the documents that have been piling up in my inbox over the past two years. Having been reluctantly dragged into a lawsuit once before I would rather have my left testicle gnawed off by rabid piranhas than participate in another one. But since it appears that push may be coming to shove I decided I should take a closer look at what is going on. What I am finding is rather disturbing.

Here are the facts:

1. The original delivery date for the condos was supposed to be on or before January 1, 2009, so they are more than two years behind schedule. This fact alone should entitle any purchaser to rescind their purchase contract under Nevada law and receive a full refund of their deposit plus accrued interest.

2. The construction delay was due in part to difficulties resulting from having to pump ground water out of the subterranean garage. I'm still a little unclear about how they could not have known the water was there and taken it into account in their construction schedule, but the salient fact is that the Cosmo did not disclose that the water was there even after it (apparently) flooded the excavation. In fact, I'm looking at the property report that was given to us when we signed the purchase agreement and it specifically says, "... no drainage ... is necessary to render the [building] useful ..." That sure looks like a smoking gun to me.

3. The Cosmo settled a class-action lawsuit last December, releasing over 1600 purchasers from their contracts (for 75 cents on the dollar -- 66 once the lawyers took their cut). That left about 200 buyers, including us, who opted out of the class action for one reason or another. I spent eight months trying unsuccessfully to get the Cosmo to tell me what they were going to do with the now-unsold units. As I mentioned in my earlier post, there were only three possibilities: try to re-sell the units, let them sit vacant, or turn them into hotel rooms. If they turned them into hotel rooms that would give all the remaining owners the contractual right to rescind our purchases, which is pretty much what happened.

4. Despite the fact that at the time we had opted out of the class action and not yet rescinding our contract (because the final subdivision map was not yet available) we did not receive an invitation to the Cosmo's grand opening. (We did, however, receive an email solicitation to reserve a room at the Cosmo for the New Year's celebration for $5000.) Not that the Cosmo had any obligation to do so, but this did not exactly leave us with a warm fuzzy feeling that the Cosmo considered us valued customers.

There's actually a lot more, but I want to save some for next time. I have a notion this is going to become quite the little saga.

Here's the thing: what could possibly be the Cosmo's motive for doing these things? I honestly find myself at a loss. I can only think of three possibilities:

1. They're stupid. They're heading for a train wreck, but they don't realize it. That doesn't seem very likely.

2. This is a ploy to intimidate as many buyers as possible to settle for less than the full amount of their deposits before push comes to shove and a judge reads them the riot act. That doesn't seem likely either. The Cosmo actually extended the class action settlement right up to the point where they had to prepare the final subdivision map, at which point they withdrew it. If they wanted people to take the settlement, why withdraw it now?

3. They know something we (and our lawyers) don't.

It is this third possibility that has me a little concerned. On the merits, our position is a slam-dunk. We have at least three different grounds on which we are legally entitled to a full refund of our deposit (the delay, non-disclosure of the drainage problem, and the changes to the subdivision map). If this goes to court and we win, we will also be legally entitled to recover attorney's fees. Our attorney is confident enough in the merits of the case to take it on contingency. Win or lose, this isn't going to cost us a dime. So what does the Cosmo possibly hope to gain from this?

My worry is not that the Cosmo's lawyers are going to pull a legal rabbit out of a hat and cite some obscure legal precedent that will undermine our position. I've vetted our lawyers well enough to be very confident that that is not going to happen. But I'm not so sanguine about the possibility of getting a harsh lesson in how the world really works here. The Cosmo is owned by Deutsche Bank, a very large and very powerful multinational corporation (with, apparently, a somewhat unsavory history), and this is Las Vegas. I'm not sure I would bet my entire life savings that the rule of law is going to carry the day.

If you live in Las Vegas (do I have any readers in Vegas?) you should be worried. You have a lot more at stake here than we do. Contrary to the PR, not everything that happens in Vegas stays in Vegas. If Deutsche Bank somehow manages to manipulate the legal system and steamroll us, people will find out. And the next time they think about doing business in Vegas, they'll think twice.