Wednesday, July 11, 2018

Roe is a distraction. The real problem is much, much worse.

The United States of America has always had a somewhat tenuous relationship with its own ideals.  The disconnect between "We hold these truths to be self-evident, that all men are created equal" on the one hand, and chattel slavery on the other, cannot result in anything other than some pretty severe cognitive dissonance.  But despite being deeply rooted in contradictions, the history of this country has nonetheless been one of steady (albeit all too often agonizingly slow) progress towards greater personal freedom and empowerment for all of its people, indeed for all of the people of the world.

All of this social progress has been built on a foundation of material prosperity driven by industriousness and technological advancement, which, in turn, was built on a bedrock of respect for objective truth.  We were able to invent the airplane and the transistor and put men on the moon not because "We're America, bitch", but because we had people who understood physics (and political science!), an understanding which once commanded respect.

No more.

Liberals should not delude themselves: Brett Kavanaugh will be confirmed to the Supreme Court, whereupon 242 years of social progress will begin to be methodically and deliberately unmade.  It has already begun, with the recent evisceration of the power of labor unions.  Roe v. Wade will probably be next to go; even if the court doesn't reverse it outright, they will twist the meaning of "undue burden" beyond the recognition of native English speakers.  And conservatives will celebrate, blissfully unaware that they have been the victims of an elaborate con.

You see, the fact of the matter is that opposition to Roe has nothing to do with a principled stance of defending a "right to life."  It is perfectly evident to anyone who looks at conservative policies today that they don't really care about life, they only care about birth.  If they really cared about life, they would care about health care and early childhood development and public education, and not ripping children from their parents.  But they don't.  After a woman has given birth, both she and her baby can go to hell for all that modern conservatives seem to care.

What is less evident is that even the semi-plausible concern for the "rights of the unborn" is a recent invention.  Modern conservatives would have you believe that Roe was a fringe decision that was immediately controversial.  It wasn't.  It was a 7-2 decision, and it was years before anyone thought to try to get it overturned.  And even then it was not a principled stance fighting for the "rights of the unborn" (what's next, fighting for the rights of the unconceived?), it was a cynical ploy to try to unite Protestants and Catholics to get them to vote for political candidates who would support segregation and be friendly to business.

All this is academic, though, because the abortion debate has been successfully and irredeemably (and, let is be ever-mindful, falsely) framed by conservatives to advance a wholly different agenda.  But the loss of personal reproductive freedom is just the tip of the iceberg.  In order to achieve this victory, conservatives have made a deal with the devil.  In exchange for lower taxes and less regulation and less government constraints on racial gerrymandering, they abandoned the truth.  They have allowed all manner of crackpottery -- birtherism, misogyny, and a dizzying variety of denialisms, from climate change to the Holocaust -- to don the mantle of respectability.  And that will ultimately cost us much, much more than our freedom.

To cite but one example which is not, as far as I can tell, on anyone's radar screen, having been totally eclipsed by all the hysteria over abortion (which is exactly what conservative strategists intended, by the way): Brett Kavanaugh has expressed the view that internet service providers have a first-amendment right to exercise editorial control over the content they deliver, and so it is not only wrong as a matter of policy for the government to impose net-neutrality rules, it is unconstitutional.

The utter absurdity (to say nothing of the extreme danger) of this position should be immediately obvious, and it would be immediately obvious if we still lived in a society that valued truth and education, but we don't.  Kavanaugh's argument is that the Internet is like cable TV: because a cable operator can decide what channels to offer, and ISP should be equally free to decide what web sites its users should be allowed to access.

That might be a valid argument if the internet had been privately developed, but it wasn't.  The internet was developed by the government with taxpayer dollars, which is to say, by the People.  There are other fundamental structural differences between cable TV and the Internet too: cable TV providers typically have to pay for content.  ISPs don't.  Furthermore, cable TV providers are subject to government regulations on what content they carry, and have been since their inception.

Brett Kavanaugh would throw all that precedent out the window and put both cable TV and the internet forever out of the reach of public regulation by declaring both to be morally equivalent to printing presses.  Except that they aren't.  The internet in particular is not a printing press.  Web servers are (the modern equivalent of) printing presses.  The internet is not the means of producing content, it's the means of delivering it.  It is the modern equivalent of the postal service, access to which is enshrined in the Constitution as a public right.  (Originalists insist that the Constitution keeps pace with technology when it comes to weapons, but not when it comes to communications.  Originalists are hypocrites.  What else is new?)

I am able to write this blog and you are able to read it only because of net neutrality.  Yes, this blog is hosted by Google, but if Google tried to shut it down I could move it somewhere else.  That is the beauty of the internet.  It enables free speech like nothing else before it in human history, not even the printing press.  But if your ISP decides to block access to then there is nothing you or I could do about it.  That would be the very antithesis of free speech.  Editorial control is something that should be practiced by content producers, not distributors.  Editorial control practiced by content producers is free speech.  Editorial control practiced by distributors is censorship.

Brett Kavanaugh either does not understand this, or he does and is willing to intentionally disregard this truth to promote the business interests of large telecommunications companies.  Either way, it should disqualify him from a seat on the U.S. Supreme Court.  But I haven't heard any politician or advocacy group advance this argument.  Everyone is acting like deer in the headlights of Roe v. Wade.

The abortion debate was never anything more than a cynical ploy by conservatives to get people who care about freedom, social progress, and truth to take their eye off the ball.  And you know what?  It worked.

Thursday, July 05, 2018

Trump is a personality cult

If you want proof that Donald Trump has become a cult of personality look no further than this story in the LA Times:

Workers in this town may become victims of Trump's trade war, but they're behind him 'no matter what'

Jimmie Coffer, a machine programmer at the nation’s largest nail-making plant, voted for Donald Trump partly because he was confident he would bring manufacturing jobs back to America. 
So the 39-year-old factory worker was shocked last month when 60 of his co-workers were laid off after the Trump administration imposed a 25% tariff on the steel his company imports from Mexico. Now, as his bosses cut back hours and warn they may have to let 200 more workers go in the coming weeks, he worries he may lose his job as a result of the president’s policies. 
But Coffer is still gung-ho about Trump. 
“I support him 100%,” he said last week. “In fact, I’d like to shake his hand. He’s doing a great job.”
So... Donald Trump is enacting policies that have the exact opposite effect of what they were supposed to have; instead of promoting manufacturing in the U.S., Trump's tariffs are actually pounding the last nail into its coffin.  And yet, the victims of this economic destruction still support Trump "no matter what".  Simply because he's Trump and not Obama.  That is the very definition of a personality cult.

I try to be respectful of other people's point of view, but I am having a really hard time marshaling any sympathy for people like Coffer.  Anyone who follows a person "no matter what", even to their own manifest financial ruin, deserves what they get.

I wonder... when Coffer and all of his friends and neighbors are out of work and have depleted their life savings and are living on the street (because, you know, the social safety net is an evil liberal conspiracy), will they still be following Trump "no matter what"?  Is there really no price too high to pay to have a white guy in the oval office?

[UPDATE]: Just now stumbled across this:
Conservative radio show host Joe Walsh said Thursday that he’s “pretty damn sad” some of his callers dismiss President Trump’s “lying” because he’s “their guy.” 
“On my radio show earlier this [week], I asked Trump supporters if they were ok with Trump lying so much,” Walsh said in a tweet. “I told them that I wasn't.”  
“The consensus? The vast majority of callers said they're ok with all Trump's lying because he's ‘their guy,’ ” Walsh continued. “Their response left me pretty damn sad.”
To which I say:  I'm pretty damn sad about it too, Joe.  Now, how about taking some personal responsibility for the world you and your fellow conservative talk show hosts have helped to create?

Monday, June 18, 2018

Damn straight there's a moral equivalence here

Germany, 1945:

The United States of America, 2018:

It's true, the kid in the second picture is not being sent to the gas chambers (yet).  But here's the thing: she doesn't know that!  This kid is two years old.  All she knows is that her mother is being taken away, and she may or may not ever see her again.

The government of the United States of America has run completely off the rails, and it has done so at the behest of its president, Donald J. Trump.  There is no law requiring children to be separated from their parents.  Donald Trump says there is, and he says that this non-existent law has something to do with Democrats, but as with nearly everything that comes out of his mouth, these are lies.  Children are being treated inhumanely because Donald Trump wants it that way.  He's using them as a kind of sick bargaining chip.

Donald Trump is able to do this because Republican members of Congress fear losing their jobs if they stand up to him, and not without cause.  Ultimately, Trump's power is rooted in tens of millions of American citizens who support him, whether tacitly or overtly.  If you are one of them, remember: this kid is two years old.  She may be here illegally (or maybe not -- a lot of these immigrants are legally seeking asylum) but she doesn't know that.  What is being done to her is monstrous, and it is ultimately possible only because of you.  If you vote Republican this November, the damage to these innocent kids' psyches, and the blood that is shed when they are shipped back to the gang-infested countries they fled from, will be on your hands.

Saturday, June 16, 2018

Suffer the little children

Nothing illustrates the complete moral and intellectual bankruptcy of Donald Trump's supporters, apologists, and enablers better than Jeff Sessions's Biblical justification for separating children from their families:
“I would cite you to the Apostle Paul and his clear and wise command in Romans 13, to obey the laws of the government because God has ordained the government for his purposes,” Sessions said during a speech to law enforcement officers in Fort Wayne, Ind. “Orderly and lawful processes are good in themselves. Consistent and fair application of the law is in itself a good and moral thing, and that protects the weak and protects the lawful.”
Perhaps Sessions has forgotten that the Holocaust was conducted entirely in accordance with German law?  Or that American slavery was likewise according to law (and Biblically justified by the very same passage that Sessions invoked)?  Or that Otto Warmbier was tortured to death in strict accordance with North Korean law?  Or is he seriously suggesting that it is the Will of God that we meekly accept these atrocities?

I'm frankly surprised that Sessions decided to invoke Romans rather than Mark.  After all, Jesus himself says that the little children should suffer.  If you're going to pervert the message of the Bible why not go all-in?

Wednesday, June 13, 2018

Trump makes it look easy

One has to wonder, after Donald Trump's tidy wrapping-up of the North Korea situation (he did everything short of come right out and say "peace for our time!"), what all the fuss was ever about.  It took only a few months (or forty minutes, depending on how you count) to go from the the brink of nuclear war to BFFs.  Today the U.S. seems to be getting along better with North Korea than with Canada (or, frankly, any western nation).  If dealing with North Korea was that easy, why hadn't anyone done it before?  Maybe Donald Trump really is the master negotiator he portrays himself to be?

Um, no.  The outcome of the Singapore summit is just another Trump flim-flam, and not just because the only tangible result it produced was a major unforced error by the U.S.  Imagine if Barack Obama had done what Trump just did.  The exact same words spoken, the exact same outcomes.  What would be the Republican's response?

Happily, we don't have to imagine it.  We know exactly what their response would be, because we know what their response was when Obama produced an actual verifiable deal for Iran to give up its nuclear weapons.  They were absolutely apoplectic about that.  It was a terrible deal!  So bad that it had to be unilaterally torn up and re-started from scratch.

But the North Korea non-deal?  The unilateral cessation of war games with no corresponding concessions from the North Koreans?  The Orwellian re-writing of North Korea's atrocious human rights record?  That is masterful statecraft.  Because that was done by Trump and not Obama!

There was a time when politicians put country before party.  In the 1970s, Congress overrode Richard Nixon's veto to pass the Clean Water Act.  (Imagine that happening today!)  Then a few years later, the Senate voted 77-0 to establish a select committee to investigate the Watergate scandal.  (Ditto!)  Donald Sanders, the man who discovered the existence of the Watergate tapes and arranged for that knowledge to become public, without whom we would never have known that Richard Nixon was, in fact, a crook, was a Republican.

Those days are long-gone.  Today's Republicans stand for party loyalty over country, over the truthueber alles.  Everything Obama did is bad.  Everything Trump does is good.  Never mind the actual merits, what matters is that Trump "succeeded" where all of his predecessors failed.  Especially Obama.  Oh yes, especially that illegitimate un-American Muslim-loving Barack Husssssssein Obama!  Thank God that nightmare is finally over!

Sunday, June 10, 2018

If the shoe fits

Fox-and-Friends host Abby Huntsman, in a rare moment of lucidity, today referred to the upcoming summit between Donald Trump and Kim Jong Un as "a meeting between two dictators".

The best part is that nobody on the show seemed to notice, perhaps because there is such a thick pile of lies and self-deceptions that Trump apologists have to keep track of that sometimes the truth can slip through the cracks.

Wednesday, June 06, 2018

PSA: Blogger comment notifications appear to be kerfliggered

I normally get an email notification whenever anyone posts comment here, but I just noticed that this feature doesn't seem to be working any more.  I hope this is temporary, but I wouldn't bet my life savings on it.  I don't think the Blogger platform is a top priority for Google.  So until I can figure out what to do about it just be aware that I might not be as responsive to comments as I usually am.  It's not because I don't love you any more.

Tuesday, June 05, 2018

SCOTUS got the Masterpiece Cake Shop decision badly wrong

The Supreme Court issued its much-anticipated decision in the gay wedding cake case yesterday.  It hasn't made as much of a splash as expected because the justices tried to split the baby and sidestep making what might otherwise have been a contentious decision.  But I think they failed and got it wrong anyway.

The gist of the ruling was that Jack Phillips, the cake shop owner, wins the case because the Colorado Civil Rights Commission exhibited "hostility" towards Jack Phillips religion when its members failed to contest the following statement made by one of its members:
I would also like to reiterate what we said in the hearing or the last meeting. Freedom of religion and religion has been used to justify all kinds of discrimination throughout history, whether it be slavery, whether it be the holocaust, whether it be—I mean, we—we can list hundreds of situations where freedom of religion has been used to justify discrimination. And to me it is one of the most despicable pieces of rhetoric that people can use to—to use their religion to hurt others.
About which the Court's opinion says:
To describe a man’s faith as “one of the most despicable pieces of rhetoric that people can use” is to disparage his religion...
But the statement does not describe Jack Phillips faith as  "one of the most despicable pieces of rhetoric that people can use."  What is despicable is not Phillips's faith, it is the use of that faith to hurt others which is being said to be despicable.  (And it is.)

The opinion goes on:
The commissioner even went so far as to compare Phillips’ [sic] invocation of his sincerely held religious beliefs to defenses of slavery and the Holocaust. This sentiment is inappropriate for a Commission charged with the solemn responsibility of fair and neutral enforcement of Colorado’s anti- discrimination law—a law that protects discrimination on the basis of religion as well as sexual orientation.
Again, it is very important to distinguish between two very different things.  It would indeed be inappropriate to compare Phillips's specific claim to slavery or the holocaust.  There is absolutely no moral equivalence there.  But again, that is emphatically not what the CCRC commissioner's statement says.  That statement is making the general observation that, historically, atrocities have been justified on religious grounds.  And that is simply a fact.

Ultimately this opinion is a reflection of Christian Persecution Complex, the unfounded belief held by many Christians in the U.S. that the mere existence of public critiques of Christianity is an attack and potentially an existential threat.  To say that Christianity was overtly used as a justification for slavery in the U.S. is disparagement and conclusively indicative of covert and nefarious bias, never mind that this is in fact demonstrably true.  The First Amendment apparently protects people from hearing anything unpleasant said about their religion by a government agent, even if those things are factually correct.

I do respect the Court's attempt to thread the needle here and come up with an inclusive ruling that would leave neither gays nor Christians out in the cold.  Unfortunately, it's simply not possible in this case.  The sad fact of the matter is that Jack Phillips and his ilk are simply on the wrong side of both history and morality, just as the defenders of slavery and segregation were in their day.  There is nothing wrong with being gay, just as there is nothing wrong with being black.  Discriminating against gay people is every bit as wrong as discriminating against dark-skinned people, notwithstanding anything you may believe, however sincerely, about what God has to say about it.

Thursday, May 24, 2018

Blame where it's due

I can't say I'm even a little bit surprised that the summit with North Korea has fallen through.  I wouldn't even bother blogging about this except that back in April I expressed some cautious optimism that maybe, just maybe, Trump's bull-in-the-china-shop tactics could be working.  Nothing makes me happier than having my pessimistic prophecies be proven wrong, but alas, Donald Trump seems to be every bit as catastrophically incompetent and destructive as I feared.

Let's take stock: a year and half into his presidency the number of foreign policy deals closed by this supposed master negotiator is... zero.  But he has, however, apparently succeeded in strong-arming the NFL into joining him in his perversion of patriotism and evisceration of the first amendment.

I would say that Trump is all hat and no cattle, except that in this case it would be an insult to hats.

[UPDATE] Have I changed my mind now that the on-again off-again summit is (apparently) on again?  No, I have not.  Why?  Because by keeping his cool, not throwing a temper tantrum, and not offering any major concessions, Kim called Trump's bluff.  And Trump, by reinstating the summit without extracting any major concessions from Kim, folded like a cheap suit.  Now Kim knows that Trump desperately wants a deal.  (If Obama got a Peace Prize, Trump has to have one too!)  That gives Kim the upper hand in the negotiations (to put it mildly).

Trump has apparently completely lost sight of the fact that simply being in the same room with the President of the United States is a huge win for Kim.  Trump, the master negotiator, is handing Kim that win with nothing at all to show for it.  So no, I am not impressed.

Thursday, May 10, 2018

A quantum mechanics puzzle, part drei

[This post is the third part of a series.  You should read parts one and two before reading this or it won't make any sense.]

So we have two more cases to consider:

Case 3: we pulse the laser with very short pulses, emitting only one photon at a time.  This is actually not possible with a laser, but it is possible with something like this single-photon-emitting light source (which was actually case 5 when I first made up the list).

Before analyzing this case I have to hedge: I'm pretty sure I know the right answer, but not 100%.  I have actually asked one of the authors of that paper to confirm my suspicions but he's busy and so it will be a while before I expect to get an answer.  If his answer turns out to be substantially different from what I say here I will definitely let you all know.

So with that disclaimer in mind, I'm quite confident that this case will turn out to have the same behavior as the case where we have a laser dimmed by a filter, and the photon emissions post-filter detected using a parametric down-converter, i.e. there will be no (first-order) interference (with one exception, which will arrive at in case 4).  The reason I'm confident is that this case is structurally the same as that one: we have made a modification to the experiment that allows us to know when the photon was emitted, which allows us to determine which path the photon took by comparing departure and arrival times, and so there can be no interference.  Please note that I have taken pains not to say that our (potential) knowledge of the emission time causes the interference to go away.  It doesn't.  What causes the loss of interference is the entanglement of the photon with something else.  Entanglement is a pre-requisite for measurement, which is a pre-requisite for knowledge, so it is true that if there is (potential) knowledge that there can be no interference, but the knowledge bit is a red herring.  The only reason I'm using that phraseology is that it is, sadly, ubiquitous in QM pedagogy.

So, with that out of the way, let us proceed to the interesting case:  We turn the laser on and off with a duty cycle of 50% and a period that is long enough that the pulses actually do produce interference.  The lengths of the arms of the interferometer are adjusted so that the Nth pulse coming from the long arm exactly coincides at the detector with the N+Kth pulse coming from the short arm for some integer K>=1.

Before I go into detail on this I want to say a word about how practical such an experiment might be. To make this work, the period of the pulses has to be long enough that the individual pulses are coherent, but short enough that we can "store" at least one them "in flight" while waiting for the next one without losing coherence.  Can this actually be done?  Yes, it can, at least if you believe Wikipedia.  There is says that fiber lasers can be built with coherence lengths exceeding 100km.  That's about 300 microseconds, which is essentially forever by the standards of quantum optics.  You could actually do this experiment with a regular semiconductor laser with a coherence length of "merely" 100m.  It's pretty straightforward to power-cycle a laser, produce time delays, and measure the results with events happening at nanosecond/meter scales.  So this would not even push the boundaries of the state of the art.

There is no doubt what would happen in this case: you would see interference, but (and this is really important) only after the Kth cycle.  Before that we know that all of the light at the detector arrived via the short arm, so there is no interference.  After the Kth cycle, light is arriving from both arms, so we do get interference.  There would be some transient effects at the beginning and end of each pulse, but at steady-state the interference would be easily detectable.  This is predicted both by quantum theory and classical E-M theory.  There is absolutely nothing interesting going on here, until, that is, you make one more little modification: in addition to a 50% duty cycle, you also dim the laser with a filter.

The outcome predicted by QM is clear: dimming the laser with a filter makes no difference.  Whatever we saw when the laser was bright we should also see when the laser is dim, namely, for the first K cycles of the laser we get no interference.

How is this possible?  The dramatic narrative of interference usually goes something like this: interference happens when a photon (or some other particle, it doesn't really matter) is placed in a quantum superposition, usually a quantum superposition of physical locations.  The usual slogan is "the photon goes both ways".  The two paths are then brought together in such a way that no which-way information is available in the final state.  The result is interference.

But can this possibly be happening in this case?  The two paths that the photon can take are separated by an enormous amount of time, big enough that we are able to turn the laser off and back on while we are waiting for it to travel the long way 'round through our interferometer.  It's already enough of a mind bender to say that we cannot know when a particular photon was emitted when the laser is on continuously, but now we seem to be going a step further: in order to have interference, we cannot even know which power cycle a detected photon was produced by!  Is it really possible for a laser to produce a photon that is in a quantum superposition across power cycles?  That seems extremely improbable.  Surely once you turn the laser off, the universe is committed: there's a batch of photons flying through space at the speed of light in some particular quantum mechanical configuration.  Surely that configuration can't be changed by something that happens (or not -- we could choose at any time not to turn the laser back on!) in the future?

There is another possibility.  Maybe the interference we see is not created by one photon interfering with itself, but rather interfering with another photon produced in a different cycle.  This seems a lot more plausible, but is it actually possible?  Paul Dirac, one of the founders of quantum theory, once famously wrote “...each photon then interferes only with itself.  Interference between different photons never occurs.”  Interestingly, while I can find this quote all over the internet, and it is invariably attributed to Dirac, I cannot locate its original source.  So it's possible that this quote is apocryphal.  But it doesn't matter.  What matters is that this sentiment was taken seriously for decades until an experiment by Magyar and Mandel debunked it in 1963.  There have been books written about, and even entitled, multi-photon interference.  So it's definitely a thing.

The experiment as we have described it to this point is an interesting variant on the Magyar and Mandel experiment.  There they used two different lasers (actually they were masers, but it doesn't matter) to generate their photons, whereas we are using one laser and separating the production of the two photons by time using power cycles and bringing them back together using delay lines.  But it amounts to the same thing.  The key is that we're bring the photons back together at the same time.  That's the reason that the delay time in the interferometer is an integer multiple of the cycle time on the laser, otherwise it doesn't work.

So this might be a mildly interesting but not earth-shattering result.  Maybe someone has even done it, I don't know.

But there is one thing that should make us a little queasy about this line of thought, and that is that we cannot actually control how many photons enter the interferometer on any given cycle.  We can attenuate the beam so that on average we get one photon per cycle, but that will only be an average.  Some cycles we will get more than one, some cycles we will get none.  If we're depending on photons to interfere with each other then we need the same number of photons each cycle, otherwise some photons won't have partners to interfere with.

In fact, we can actually completely eliminate the possibility that what we see is multi-photon interference simply by making the laser even dimmer.  Let's attenuate the laser to the point where, rather than of one photon every cycle, we instead get one photon every 2K cycles (or more).  In other words, most of the time the interferometer is totally dark.  Every now and then we will get a photon.  The temporal separation between photons is now much more than the coherence time of the laser, much more than the cycle time of the laser, much more than the travel time through the long arm of the interferometer.  We can make it an hour or more between photons.  Theory predicts that we will still see interference!  Not only that, but it will be the exact same interference pattern that we saw when the interferometer was fully illuminated.

How are we to account for that? In particular: remember how above we noted that we only saw interference after the Kth cycle? How would any given photon know whether the index of the cycle that produced it was more or less than K?

Note well that this is in no way intended to highlight a problem with QM.  The outcome predicted by QM is very clear, and I would give you very long odds that this prediction is correct.  The problem is only in trying to tell a story about what the fleep is going on here that involves photons being emitted by the laser.  I don't see any way to do it.

In fact, I'll go one step further: AFAICT, this is a strong argument for the following remarkable conclusion (and if this holds up I think it really could be earth-shattering): the quantum wave function must be physically real because that is the only thing that could account for the K-cycle delay in the onset of interference.  If anyone can see a flaw in my reasoning I would really appreciate it if you would point it out.

Tuesday, May 08, 2018

A quantum mechanics puzzle, part deux

This post is (part of) the answer to a puzzle I posed here.  Read that first if you haven't already.

To make this discussion concrete, let's call the time it takes for light to traverse the short (or Small) arm of the interferometer Ts, the long (or Big) arm Tb (because Tl looks too much like T1).

So there are five interesting cases here.  Let's start with the easy one: we illuminate the interferometer with a laser which we turn on and leave on.  In that case it's a no-brainer: the photons arrive at the business end of the interferometer first from the short path Ts seconds after turning the laser on.  At this point we know (because timing) which way the photons went so there is no interference.  Then at time Tb the photons arrive from the long path.  All the photons are identical, so we no longer know which path they took.  So interference.

Case 2 (the one the original puzzle was about): the laser is turned on and stays on, but the power is modulated (or filters are put in place) so that the light level is very low, so low that the average time of arrival between individual photons at the detector is much larger than Tb.

There are two plausible-sounding answers in this case.  Plausible-sounding answer #1 is that the result is exactly the same as before: after Tb we still get interference.  The equations of quantum mechanics are independent of brightness, so wherever we get interference when the light is bright, we still get interference when the light is dim.

Plausible-sounding answer #2 is that when the light is dim we can tell which way the photon went by looking at the timing.  Whenever we get a detection there are two possibilities: either the photon was emitted Ts seconds earlier and took the short path, or the photon was emitted Tb seconds earlier and took the long path.  So if we can tell when the photon was emitted, then there will be no interference.

But can we tell?  Well (and this is the answer I was originally looking for when I composed the puzzle) it depends on exactly how we make the laser dim!  There are at least two ways, and they produce different results.

The first is to put some sort of shutter in front of the laser that only lets through one photon through at a time. This is equivalent to turning the laser on only for very short periods of time.  If we do it this way we will get no interference.

The other way is to do nothing to the laser itself, but rather to put a filter between the laser and the interferometer that blocks (or reflects) most of the photons.  The photons are blocked by the filter at random, so there is no way to tell when a particular photon got through the filter.  Hence: interference.

But suppose we tweak our setup slightly so that we can tell when a photon was transmitted by the filter.  How can we do this?  It is this exploration that leads to (IMHO) a profound insight.

Think about it: how do you detect a photon without destroying it?  You can't!  The only way to detect a photon is to have some atom absorb it, and that process destroys the photon.  But there is a sneaky trick we can do: we can run the photons through a parametric down-converter (PDC).  A PDC is a crystal made of some material (typically some stuff called beta-barium borate or BBO) whose atoms absorb photons at one wavelength and then re-emit them as two photons at different wavelengths.  The key is that these two emissions happen at more or less the same time.  So we can send one of these photons into the interferometer and use the other one to tell us when this event happened.  Experimental physicists actually do experiments like this routinely.  To distinguish between the two photons, the one that goes into the apparatus is called the signal photon, while the other that is measured to figure out the timing is called the idler.  By measuring (and hence destroying) the idler photon we can tell when the signal photon entered the interferometer, and so we can tell which way the signal photon went (by comparing the timing of entry and exit).  So we cannot have interference.

Here is the profound insight: this setup will not produce interference even if we don't actually measure the idler photon!  Why?  (You might want to think about that for a moment before proceeding.)  Because if it did, then we could use that fact to transmit information faster than light!

Here is how we would do it: instead of measuring the idlers, we send them off (via mirrors) to some distant location (let's call it L1)  At the same time, we take our interferometer and move it away from the PDC by the same distance but in the opposite direction to a location we will call L2.  The distance between L1 and L2 is much greater than the length of the long arm of the interferometer.

If we could produce interference by choosing not to perform any measurements on the idlers then we could use this setup to communicate faster than light by selectively measuring the idlers or not.  When we measured the idlers at L1, the interference would be destroyed at L2.  And this effect would have to happen instantaneously because if it didn't then we could measure idlers at L1 and still have interference at L2, and that is impossible.

The profound conclusion is that photons emitted by a parametric down-converter do not produce interference!  [1]

Those of you who have read my paper on the EPRG paradox will find this all to be familiar territory.  In fact, this is the exact same conclusion that was reached in that paper, and for the exact same reason: the photons emitted by a PDC are entangled, and entangled photons do not self-interfere.  The reason they don't self-interfere is that entanglement is the first step of the measurement process, and it, not measurement per se, is what destroys (first-order) interference.

This is all old news (at least 17 years old).  So why is this (IMHO) cool?  Because we could reach this conclusion without knowing anything about entanglement!  We didn't need to invoke EPR or Bell's theorem or polarization or anything like that.  All we needed was the principle that which-way information destroys interference to reach the conclusion that if there is any physical process that reliably produces multiple photons at the same time, then those photons cannot self-interfere.  We have shown, without doing any math, only from elementary first principles, that entangled particles are different in some deep and profound way from non-entangled ones.

I think that's cool.

That's probably enough for one post.  I'll finish up the other three cases later.


[1]  This is not quite true.  The strictly correct statement is that entangled photons do not produce first-order interference.  They can and do produce second-order interference, which can only be detected by transmitting classical information from L1 to L2.

Friday, May 04, 2018

In your face, liberal haters!

The New York Times reports that California is now world's 5th largest economy.  Only the U.S. as a whole, China, Japan and Germany are bigger.  On top of that the vast majority of that growth came from the coastal areas, where the liberals live.

Meanwhile, in Kansas, the Republican experiment in stimulating economic growth by cutting taxes has gone down in screaming flames:
The experiment with tax policy [in Kansas] was such a failure that a Republican controlled legislature not only voted to raise taxes, but did so over the veto of the governor.
So: in your face all you who say that high taxes and regulation kill economic growth!  In fact it is, and has always been, the exact opposite.  Taxes fund government and infrastructure, both of which are essential components of a robust economy.

Thursday, May 03, 2018

I don't know where I'm a gonna go when the volcano blows

Hawaii's Kilauea volcano is erupting.  So is one in Vanuatu.  And there is increased activity in Yellowstone.  Hang on to your hats, folks, Jesus's return must be imminent.

(In case you didn't know, the title is a line from a Jimmy Buffet song.)

A quantum mechanics puzzle

Time to take a break from politics and sociology and geek out about quantum mechanics for a while.

Consider a riff on a Michelson-style interferometer that looks like this:

A source of laser light shines on a half-silvered mirror angled at 45 degrees (the grey rectangle).  This splits the beam in two.  The two beams are in actuality the same color as the original, but I've drawn them in two different colors to make the two paths easier to follow.  The red beam is reflected up, the green beam passes through the mirror and continues to the right.  Both beams are reflected back from whence they came by a pair of regular mirrors (the white rectangles) also mounted at 45 degree angles relative to the beams.  They return to the half-silvered mirror where they are recombined and sent to a detector, which registers the presence of absence of interference.  (In reality it's a tad more complicated than that, but that's a sufficiently accurate description for this thought experiment.)

What distinguishes this "riff" on a traditional Michelson interferometer is that the mirrors that reflect one of the beams (the one drawn in green) are mounted on a trolley that allows them to be moved as a unit to an arbitrary distance.  We use this capability to make the distance traversed by the photons on the green path be much larger than those on the red path, large enough that there is an easily measured difference in the travel time between the two paths.

Let's call the time it takes to traverse the red path T1 and the time it takes to traverse the green path T2, with T1 much smaller than T2.

So we turn on the laser.  What can we expect to see?  Well, the laser beam is emitted at the speed of light (obviously).  After time T1 the red-path photons arrive, but the green-path photons are still en-route, so we should see no interference.  Then at time T2 the green-path photons arrive.  What happens then?

From a purely electromagnetic point of view we would now expect to see interference.  But do we?  Here is an argument that this cannot be the case: whether we see interference or not should be independent of the brightness of the beam.  So turn the brightness down to the point where the time between the emission of individual photons from the laser (and hence the arrival of photons at the detector) is much greater than T2.  (Of course, the actual arrival times will be random, but we can make the average time between photons be large enough that the probability of having two photons in the interferometer at the same time is indistinguishable from zero.)

If we do this with a standard interferometer (or two-slit experiment) where the path-lengths are very nearly the same, we still see interference even when the photons go through one at a time.  This is the famous and mysterious phenomenon of quantum superposition, where each individual photon "goes both ways" and interferes with itself.  But with this setup, "interfering with itself" would seem to be impossible.  Yes, the photon goes both ways, but how can it possibly interfere with itself when the differences in travel times between the two paths are so large?  By the time the red-path-part of the photon arrives at the detector, the green-path part is still en-route to the distant mirror.  Likewise, by the time the green-path-part of the photon arrives at the detector, the red-path part is long gone.  So individual photons can't possibly interfere with themselves in this setup, and so large numbers of photons should not be able to produce interference either.

So there are three possibilities:

1.  There is no interference after T2 (in violation of standard electromagnetic theory)

2.  There is interference after T2, but it goes away if the laser is dim enough (in violation of standard QM theory), or

3.  There is interference after T2 even when the laser is dim.  In which case the question becomes: how?

The answer next time.  It turns out that this thought experiment has some pretty profound implications with respect to the interpretation of quantum mechanics.  As far as I can tell from a cursory search, I'm the first to propose it, though I would be surprised if that actually holds up to scrutiny.  If anyone knows where this has been analyzed in the literature I'd appreciate a pointer.

Wednesday, May 02, 2018

This is inspiring

The Washington Post reports that:
Two African American men arrested at a Philadelphia Starbucks last month have reached a settlement with the city and secured its commitment to a pilot program for young entrepreneurs. 
Rashon Nelson and Donte Robinson chose not to pursue a lawsuit against the city, Mike Dunn, a spokesman from the Mayor’s Office, told The Washington Post. Instead, they agreed to a symbolic payment of $1 each and asked the city to fund $200,000 for a grant program for high school students aspiring to become entrepreneurs.
Wow.  I doff my hat, raise a glass, and salute you, Rashon Nelson and Donte Robinson.  You took a thoroughly sucky situation and turned it into something positive.  You've restored my faith in humanity.

Friday, April 27, 2018

Credit where it's due

Richard Nixon is rightfully remembered as one of the great villains of American democracy.  But he wasn't all bad.  He opened relations with China, appointed four mostly sane Supreme Court justices, and oversaw the establishment of the EPA among many other accomplishments.  Likewise, I believe that Donald Trump will eventually go down in history as one of the worst (if not the worst) president the U.S. has ever had, but I think he deserves some kudos for some of the recent developments in Korea:
The leaders of North and South Korea have pledged to jointly eliminate the risk of war and work together to achieve complete denuclearization of the Korean Peninsula. 
The joint statement Friday, from the border truce village of Panmunjom, concluded a historic one-day bilateral summit aimed at achieving peace between the longtime adversaries for the first time in more than sixty years. The meeting of the Korean leaders was the first in more than a decade.
Whether this actually leads anywhere remains to be seen, but the mere fact that this announcement happened at all is astonishing to me.   I thought a hot war in Korea was much more likely than peace overtures.  Just the change in rhetorical tone from Kim Jong Un is borderline miraculous.  A week ago I'd have given long odds against any of this happening in my lifetime.

I have no idea whether all this is happening because of or despite (or is completely indifferent to) anything Donald Trump has done.  But it happened on his watch.  If war had broken out I surely would have given him the blame, so he deserves some of the credit regardless of what his actual influence might have been.  I have a very hard time believing that the "little rocket man" rhetoric was helpful, but Mike Pompeo's visit certainly seems not to have set things back.

I still want to see Donald Trump go down in screaming flames because he is such an asshole, and I don't like to see assholes win.  But I grudgingly concede that he seems to have made more progress in North Korea than any of his predecessors.

Paul Ryan forces out House chaplain

Just in case there was the slightest ember of hope in your mind that Republicans actually care about religious freedom and are not just odious hypocritical power-grubbing opportunists, this should extinguish it once and for all:
House Chaplain Patrick Conroy’s sudden resignation has sparked a furor on Capitol Hill, with sources in both parties saying he was pushed out by Speaker Paul Ryan (R-Wis.). 
Conroy’s own resignation announcement stated that it was done at Ryan’s request.
And why would Paul Ryan want to force out a chaplain who has been in the post for 11 years?  Because he spoke heresy and suggested that the new tax bill should be "fair to all Americans".  (The idea!)  Oh, and because he invited a "Muslim person" (yes, that is an exact quote -- can you imagine someone on Fox News referring to Pat Robertson as a "Christian person"?) to deliver an opening prayer.

No wonder he had to go.  It's bad enough the Jews are crawling around on the House floor, do we really have to let the Muslims in?

An open letter to Jack Phillips

[Jack Phillips is the owner of the Masterpiece Cake Shop in Lakewood, Colorado.  Mr. Phillips is being sued by the Colorado Civil Rights Commission for refusing to make a wedding cake for a gay couple.  His case is currently before the U.S. Supreme Court.  Yesterday Mr. Phillips published an op-ed in The Washington Post to which this letter is a response.]

Dear Mr. Phillips:

Imagine your child was in a terrible car accident and rushed to the hospital.  There the doctor tells you, "I'm terribly sorry, but she has lost a lot of blood.  She needs a transfusion.  Unfortunately, I can't give her one because I am a Jehovah's Witness and we believe that blood transfusions are against the will of God."  (Don't like that example?  OK, here's another: suppose the doctor was a Muslim and told you that he couldn't operate on your daughter because she is female, and unfortunately there are no female doctors available at the moment.  I can do this all day long.  There is an endless variety of sincerely held religious beliefs out there in the world.)

How would you feel?  Would you fight as hard for the right of doctors to refuse their professional services on religious grounds as you are fighting for your own?  Would you accept delayed medical care for your daughter as the price of religious freedom?

I suspect the answer to that question is "no", but either way you and I have a problem that goes far beyond cakes.  If indeed you want the Supreme Court to uphold your religious freedom but not those of others then you are a hypocrite, and we're done.  I have no respect for hypocrites.  Hypocrisy is the ultimate evil because it justifies anything.  If, on the other hand, your answer is "yes", that you would be able to accept these costs, then we still have a problem, but it's a very different problem, because not only are you willing to accept these costs on your own behalf, but you are insisting that I accept these costs as well.  Because if my daughter ends up in the hospital and needs a transfusion, I want her to fucking get one.  Got it?

I apologize for the crude language, but I really want to emphasize how strongly I feel about this.  You see, my most deeply held belief, my religion if you will, is that decisions ought to be made according to evidence, experiment and reason, and not on faith.  You have the right to believe what you want, but you most emphatically do not have the right to impose your beliefs on me in any way, shape, or form.  That includes passing laws to allow doctors to deprive me and mine of medical care because of their own personal beliefs.

You see, in a professional setting, sometimes you have to check your personal beliefs at the door.  As unintuitive as it might seem, that is part and parcel of living in a free country.  Doctors don't get to pick and choose who they treat and how they treat them based on their religion.  Judges don't get to pick and choose what laws they will enforce based on their religious beliefs.  Restaurant proprietors don't get to pick and choose who can sit at the lunch counter based on their religious beliefs.

I know you think your case is different because making wedding cakes is an artistic endeavor, and I don't dispute that.  I'm happy to concede that your cakes are works of art.  But you are not actually arguing for your freedom of expression.  You are not refusing to make cakes with particular content, you are refusing to make cakes for a particular kind of customer.  If you refused to make a cake with, say, an obscene image on it, no one would dispute your right to turn that down.  But what you are asking for is very different.  You want to be able to refuse to make cakes for gay couples regardless of what the cake looks like.  Your criterion for what you are and are not willing to do has nothing to do with the cake and everything to do with the customer.  That is unacceptable.

You wonder "if there will be a place in the community for [you] when the dust settles."  I'm sure there will.  This country is, sadly, chock-full of people who want to discriminate against others because of their sexual orientation.  Should you lose, I have no doubt that you will find friends among them.  And although you will find it hard to believe, you will still be free.  You will be free to believe what you want to believe.  You will be free to shout your odious beliefs from the rooftops.  You will even be free to make cakes for whomever you choose!  The only thing you won't be able to do is to make cakes professionally, because, in this country, we hold professionals to a higher standard.

At least, for the sake of all the people who need blood transfusions, I hope we do.

Sincerely yours,
Ron Garret
Emerald Hills, California

Wednesday, April 25, 2018

Support Josh Harder for Congress

I've been quiet lately in part because I'm sinking back into the pit of despair when I think about politics.  The spinelessness and hypocrisy of the Republican party, the insidious and corrosive effects of corporate "free speech" embodied in soulless monsters like Sinclair and Fox News, and the fact that ultimately all this insanity has its foundation in the will of the people (or at least a significant fraction of them) has me struggling at times to see much light at the end of this tunnel.  The outpouring of grass-roots energy in the Democratic party is encouraging, of course, but we really shouldn't have to work this hard do defend the principle that, if the President is a crook, he should be called out for it.

The Washington Post yesterday ran a story headlined "Could Trump bury Mueller’s findings? Yes — if Republicans help him do it."  You should read it.  It's sobering.  I am as staunch a defender of civil liberties and the presumption of innocence as you are likely to find.  But if Donald Trump is, say, beholden to the Russian government, don't you think the American people ought to know?

It is becoming clear that we cannot count on the Republicans to answer this question affirmatively.  They have repeatedly shown that they will put party over principle.  They will gerrymander, lie, cheat, and even abandon their own principles to stay in power (to what end one has to wonder).  Not that the Democrats are necessarily a whole lot better, but there is one thing that is becoming clear: if we want to know the truth about Donald Trump, the only way we can insure that we will find out is to vote the Democrats into power in the House of Representatives this November.  If we fail to do that, it will be game-over.  Robert Mueller will be fired, his report will be buried, and We the People will never know the truth.

Happily, taking the House seems to be a real possibility, and I want to take this opportunity to do something that I very rarely do here on the Ramblings and endorse a Congressional candidate and ask you, my readers, to support him.  His name is Josh Harder, and he is running in California's 10th Congressional district, which includes the central valley town of Modesto.  That district is currently represented by Republican Jeff Denham, who won the 2016 election by only 3 points.  If there was ever a flippable district in the U.S., this is it.

I met Josh the other day and I was very impressed.  He's working incredibly hard, he knows what he's doing, he has great stage presence, and he has terrific command of facts and issues.  But most importantly, he will bring us one step closer to a Democratic majority in the House, which we will need in order to stop the Republicans from burying Donald Trumps sins in a bureaucratic sarcophagus.  Whatever your stand on policy may be, I ask again: if the President of the United States is beholden to a foreign power (or has otherwise broken the law) don't you think we ought to know?

Saturday, April 07, 2018

The taxi ride from hell: A data point for the rideshare debate

One of the arguments made by established taxi companies against ride-sharing companies like Lyft and Uber is that the latter's passengers are taking a greater risk because of the questionable vetting of the drivers.  Real taxi drivers are professionals, the argument goes, with proper training and screening to insure that they safely and efficiently whisk you from A to B.

To which I say: Bollocks.  I just had the worst ride of my entire life, and it was in an officially licensed New York City yellow cab.  It was so extraordinarily bad that I didn't tip the driver.  I have never before in my life not tipped a driver.  I was this close to not paying him at all.

It was not an obscure route: Times Square to Newark airport.  Any NYC taxi driver worth the title should know that route like the back of their hand.  Google Traffic indicated that except for the usual backup at the entrance to the Lincoln Tunnel, traffic was light and we should get there in about 30 minutes.

I sat down in the back of the cab and it was immediately evident that this was not going to be the most comfortable ride of my life.  The seat had a loose spring (or something) that was poking me in my butt, and did the entire trip.

To fully appreciate how utterly incompetent this cabbie was it will be helpful to know that the usual route from Times Square to Newark airport goes something like this: you go west through mid-town Manhattan and take the Lincoln Tunnel under the Hudson river.  From there, you continue on route 495 to Interstate 95, hang a left, cruise for 20 minutes or so, and exit to the airport.  Easy peasy.  If there is heavy traffic on the interstate one might choose to take a different route to bypass the interstate, but as I mentioned, it was early and traffic was light.

The transition through the Lincoln Tunnel went smoothly enough, but when we got to the other side the driver suddenly took an unexpected turn and we ended up on New Jersey surface streets.  With traffic lights.

Now, New York cabs have plexiglass safety dividers between the driver and the back seat.  Some of them have holes or little windows in them so you can talk to the driver, but not this one.  So I had to shout to be heard: "Why didn't you take the interstate?"

It quickly became clear that the driver's command of English, in both transmit and receive modes, left a little room for improvement and communication was going to be a challenge.  At one point, the driver passed his cell phone to me through a little cell-phone-sized man trap in the safety divider.  I saw that he was running some sort of navigation app, but I am not sufficiently wise in the ways of Waze to ascertain exactly what was going on or how to do anything about it.  So I just resigned myself to the fact that this trip was going to take a little longer than I expected, and passed the phone back to the driver.

I pulled up Google Maps on my own phone so I could follow our progress, and it appeared that our plan was to take state route 9.  This was slightly alarming as there were construction warnings along a substantial stretch of that road, but happily it appeared that this was because the road was closed in the opposite direction.  Going North we would be able to get through with minimal fuss.

Or at least we would have done if the driver had actually turned onto route 9.  He didn't.  He sailed right past the on ramp and into the next little enclave of surface streets, from which there was no evident route to the airport at all.

I piped up again and asked if the driver realized that he had just missed a turn.  He allowed that he had, apologized sheepishly, and said he would make a U turn, which, in New Jersey, is no mean feat.  In fact we did not make a U-turn, but rather went around several blocks until we finally found ourselves back at the on-ramp for state route 9.  (During this time I could hear the driver on the phone with someone who was apparently trying to talk him through the situation to get us back on track.)

Now, to be fair, the road design and signage in this particular area were atrocious, almost as if someone had deliberately designed the place to be misleading so that they could hide in a nearby bird blind and snicker at the hapless drivers trying to find their way.  But this is not at all unusual in New Jersey, and if you're going to drive there for a living you really have to be able to take this sort of thing in stride.  Fortunately, by proceeding very, very slowly and deliberately, our driver was finally able to get us onto the correct road.

Alas, our troubles were not over.  By now I was watching carefully what the driver was doing to make sure he wasn't about to miss the exit for the airport, which is exactly what he proceeded to do.  As he started sailing by the off ramp I shouted at him, "You're about to miss the exit!"  But instead of veering to make the off ramp, he slammed on the brakes and stopped!  Right in the middle of the freeway.  A brief negotiation ensued, upon the completion of which we finally turned right and into the airport.

I micromanaged the drive to the terminal, and as I noted earlier, I did not give him a tip.

Because this driver was so off-the-charts atrocious I decided to report him to the NYC taxi authority, the organization that is supposed to be in charge of insuring that yellow cab drivers are more competent than the disreputable scoundrels that drive Lyfts and Ubers.  They have a convenient web page for filing complaints, but upon availing myself of this I discovered to my dismay that in order for any complaint to be acted upon you have to be willing to make yourself available for an in-person hearing.  In Queens.  Well, I live in California, so going to a hearing in Queens is not exactly convenient.  I went ahead and filed my complaint anyway (and condensed this story down to about three sentences so it would fit in the tiny text box provided for you to give the details of your complaint.  A few minutes later I received this helpful response:

Service Request #: C1-1-1546782941
Date Submitted: 04/06/18 3:46:51 PM
Request Type: Taxi Report
Details: Driver Report 
Your Service Request was closed.
Your report has been sent to the Taxi and Limousine Commission (TLC). You are not available to participate in a hearing so TLC cannot take any action against the driver or car service company. No further information will be available for your report.

So... no more taxis to the aiport for me.  I'd rather roll the dice with Uber.  At least with them if the ride sucks I don't have to show up for a hearing in order to give the driver a bad review if he deserves one.

Which, now that I come to think of it, not a single Uber driver ever has.

I would like to note for the record that I have taken dozens and dozens of NYC taxis over the years, and they were by and large competent and efficient.  This experience was definitely an outlier.  But it does undermine the taxi company's argument that Uber and Lyft should not be used because their drivers haven't been as well vetted.

Wednesday, March 14, 2018

Well, that didn't take long

I was contemplating whether or not to write about how incredibly stupid it is to try to solve the school shooting problem by arming teachers.  I was waffling because I don't really like to belabor the obvious.  And then this happened:
A teacher accidentally fired a pistol inside a California classroom while lecturing about public safety and injured three students, according to police. 
Dennis Alexander was pointing the gun at the ceiling when he inadvertently fired it Tuesday at Seaside High School, said Abdul Pridgen, the city's police chief. 
Bullet fragments ricocheted off the ceiling and hit a 17-year-old student in the neck, Pridgen said. Shortly after the incident, class resumed as usual
The teen’s father, Fermin Gonzales, said he rushed his son to the hospital after the 17-year-old returned from school with blood on his shirt and a neck injury.
Let that soak in for a moment: a teacher fired a gun in a classroom, injured three students, one of whom was bleeding from the neck to the point where he ultimately had to go to the hospital, and then resumed teaching as if nothing had happened!  No, "Hey, is everyone OK?"  Just, "Oopsie, my bad.  Now open your textbooks to page 23."

The idea that the only way to stop a bad guy with a gun is a good guy with a gun is an adolescent fantasy born of watching too many Westerns.  The best way to stop a bad guy with a gun is to make sure that the bad guy never has a gun in the first place.  (It also helps to realize that "bad" and "mentally disturbed" are not synonyms.)

I hope that a minor injury is all it's going to take to get people to come to their senses, and not an all-out bloodbath.  But I'll give long odds against.

Monday, March 05, 2018

Is it time to take the Hyperloop seriously? No.

Over four years since it was first introduced, Ars Technica asks if it is time to take the Hyperloop seriously.  And four years since I first gave it, the answer is still a resounding no.  Not only has the thermal expansion problem not been solved, there has been (AFAICT) absolutely no attention paid to simple operational concerns that could be show-stoppers.  Like terrorism.  If you think airplanes are a soft target for terrorism, there should be no doubt in your mind that the bad guys are absolutely salivating at the prospect of the hyperloop.  The extent to which it would be vulnerable to terrorism, or even simple mechanical failure, is just mind boggling.

Let's set terrorism aside for a moment and just consider how the system would recover (or not) from a simple mechanical failure.  A pod breaks down.  That could happen, right?  What would you do?

With every other mode of transportation heretofore invented by mankind, the answer is: you get the people out of the failed vehicle so they can get to their destination some other way, and move the failed vehicle to a repair facility.  But this won't work for the hyperloop.  The pods are inside a sealed metal tube hundreds of miles long.  If you do the math based on some very conservative assumptions about how often pods would have to run in order to be a viable transportation system you will find that there will be (at a minimum) dozens of pods carrying hundreds of people inside the tube at any given time.  If one pod breaks down, all the pods behind it have to stop too.  So now you have a convoy of pods full of people stuck in a sealed steel tube.  How do you get them out?  I've never seen any hyperloop advocate even raise this issue, let alone actually take constructive steps towards solving it.

The fundamental problem is that the hyperloop track is a cascading single point of failure.  If a pod breaks down and blocks the track, the whole system goes down, and it (almost certainly) stays down for a very long time.  It's as if every time an airplane had a mechanical problem the net effect on the system was equivalent to a plane crashing at the intersection of all the runways at SFO and shutting them all down at once.

There are other transportation systems that have this problem, notably rail.  But when a train breaks down, you can always just get out and walk to safety as a strategy of last resort.  The hyperloop design makes that inherently impossible.  You can get a little taste for what things might be like by looking at what happens when people are trapped in subways.  It is not pretty.
During that 45-minute wait, riders tried to claw open the doors for air, said Chris Ebelhar, a passenger. A person chanted, “‘Find your happy place, find your happy place,’” he said. Panic increased when passengers realized that the doors at each end were locked, he said. “If there was a fire, we would have all died or just burned up,” he said. “We couldn’t open windows. It was insane.”
And that was a 45-minute wait.  That's how long you're in the pod when things are working normally!   In a failure scenario you will (unless someone comes up with something really clever) be stuck for hours, possibly even days.  It will be more like being trapped in a mine than in a subway car.  You think claustrophobia is a problem on airplanes?  You ain't seen nuthin' yet.  Hyperloop pods are designed to be occupied for less than an hour.  They are not tall enough to stand up in.  There are no bathrooms.  There are no windows.  And there are no emergency exits.

It seems to me that having at least some sort of minimally plausible story to tell about what one would do in a situation like this should be a pre-requisite to doing any further work on the hyperloop, otherwise you could easily end up in a situation where you have invested an enormous amount of money in it only to find that this problem simply does not have an economically viable solution.  Not all problems do (c.f. the flying car).

Saturday, February 24, 2018

Devin Nunes doesn't realize that he's part of the government

I was reading about the long anticipated release of the Democratic rebuttal to the famous Republican dossier memo.  I've been avoiding writing about this, or any aspect of the Russia investigation, because there is just so much insanity going on there and I didn't want to get sucked into that tar pit.  But I could not let this slide:
[O]n Saturday, committee chairman Devin Nunes (R-Calif.) accused Democrats of colluding with the government in a “cover up” of information as he announced the memo had been posted online. 
“We actually wanted this out,” Nunes told an audience at the Conservative Political Action Conference. “It’s clear evidence that the Democrats are not only covering this up, but they’re also colluding with parts of the government to cover this up.”
Congressional Democrats are "colluding with the government"?  Say what?!?  Who (or what) exactly does Devin Nunes think "the government" is?

I have news for you, Mr. Nunes: you and your fellow Congressmen are "the government", or a pretty significant part of it anyway.  You're supposed to be "colluding" (I would choose the word "working", but whatever) with yourselves to run the country.  That's your job.

But I guess Devin Nunes didn't get the memo.  So sad.

Friday, February 16, 2018

Yes, code is data, but that's not what makes Lisp cool

There has been some debate on Hacker News lately about what makes Lisp cool, in particular about whether the secret sauce is homo-iconicity, or the idea that "code is data", or something else.  I've read through a fair amount of the discussion, and there is a lot of misinformation and bad pedagogy floating around.  Because this is a topic that is near and dear to my heart, I thought I'd take a whack at it myself.

First, the idea that "code is data" is a popular aphorism, but even the most casual reflection on what this slogan actually means will reveal that it can't possibly be the right answer.  Yes, it is true that, in Lisp, code is data.  But this is true of all programming languages!  If programs weren't data, how could a compiler possibly work?

What makes Lisp cool is not that programs are data (because all programs are data), but that they are a particular kind of data.  In most programming languages, programs are strings.  Strings are in fact data.  In Lisp, programs are not strings, they are linked lists (that happen to have a string representation).  And this turns out to make all the difference.

I want to be very clear about what I mean when I say that Lisp programs are linked lists, because this is really a very subtle point.  It's hard to explain, which is one of the reasons that it is very rarely explained well.  Ironically, part of the problem is that once you understand it, it seems trivial and obvious.  (Everything is easy once you know how.)  But if you don't already understand it, it can be hard to get over the hump.  So depending on which side of this divide you fall on, what I am about to say might sound like I'm belaboring the obvious, in which case I would ask you try to remember back to the time before you understood all this (I know there was such a time because no one is born understanding linked lists).

The fundamental problem with trying to explain this is that the only tool I have at my disposal to communicate with you is text.  Your eyes scan this page, parse the black markings on the white background, and interpret those markings as letters and punctuation marks.  Your mind then further groups those letters into words, words into sentences, and sentences into concepts.  You do all this effortlessly now, but back in the day, before you knew how to read, it was hard work.  It takes a similar kind of "hard work" to read Lisp.  But like learning to read natural language, it pays dividends.

So here's a little snippet of Lisp code:

(defun rsq (x y) (sqrt (plus (times x x) (times y y))))

This code defines a function called RSQ which computes the square root of the sum of the squares of two numbers, but that is beside the point. What matters is that there are two very different ways to interpret the combination of letters and punctuation marks on the line above:

1.  As a string of characters.  44 of them to be precise (if you count spaces).

2.  As a thing with structure that is defined by the parentheses.

This is a little easier to see if we write something that has the same structure but without the evocative words:

(a b (c d) (e (f (g c c) (g d d))))

This makes the structure a little easier to see.  What you are looking at can be interpreted as either a string of characters (35 of them in this case), or as a list of more abstract elements.  This particular list has four elements.  The first element is the letter "a".  The second element is the letter "b".  But the third element is not a letter, it is another list.  This list has two elements, each of which is a letter ("c" and "d").  The fourth element is also a list.  This one has three elements, two of which are themselves lists.

There is an extra wrinkle in the original example, which is that sequences of adjacent letters like "defun" and "sqrt" are also considered "one thing", or a single element of the list.  So the original example, like the second, is also a list of four elements, but the first element is not a single letter, but a "group" of letters.  In Lisp these groups are called "symbols", and like lists, they are first-class data types.

The reason this is hard to explain is that strings and lists are fundamentally different things even though they look the same when you write them out this way.  What I've written above are really strings, but your brain interprets those strings as lists once you've been trained to interpret the parentheses and the letter groupings and spaces in the right way.  But what a linked list really is is something completely different.  It's a pattern of bits in memory.  You can talk about that by dumping the contents of memory and talking about how some bit patterns can be interpreted as pointers that refer to other parts of memory, or by drawing boxes and arrows.

But all of those details are a distraction too.  What really matters is that by thinking of code as a linked list instead of as a string of characters you can manipulate that code easily in terms of components that are semantically meaningful.

Here's an example of what I mean by this.  Consider the following snippet of C code:

int main(int argc, char* argv[]) { ...

Now suppose you want to analyze this code.  We want to extract, say, the name of the function being defined ("main") and its arguments ("argc" and "argv").  In C this is an advanced exercise; you have to actually parse the code.  But in Lisp it is utterly trivial.  If I consider this code:

(defun rsq (x y) (sqrt (plus (times x x) (times y y))))
as a list then to get its name all I have to do is extract the second element of the list.  And all I have to do to get the arguments is take the third element.  And the functions to do that are built-in to Lisp, so I literally don't have to write any code!

Not only that, but the parsing process that converts the string representation of the list (called an S-expression) to the internal representation of the actual linked list data structure is also trivial.  Parsing S-expressions is super easy.  You don't need a grammar or a parser generator, all you need is -- and this is no exaggeration -- a few dozen lines of code in just about any programming language [1].  And going the other way -- printing them back out -- is even easier.

This, then, is the magic of Lisp.  It's a local minimum in the amount of effort that it takes to parse and manipulate code in semantically meaningful chunks at the "cost" of having to write code that looks a little bit weird when you first encounter it.  But this feeling quickly goes away when you realize that this weirdness is not arbitrary.  Those parens are where they are for a reason, namely, to make the syntax easy, even trivial, to parse.  Lisp was originally proposed with a more traditional syntax in addition to S-expressions, and nearly every Lisp programmer has proposed and implemented their own (it's almost a rite of passage).  None of them have ever caught on because S-expressions are a huge win once you get even just a little bit used to them.  They let you do things easily that are really really hard in other languages.  In particular, they make writing compilers so easy that doing so becomes a regular part of doing business in Lisp rather than an abstruse specialty that only a select few engage in.

And now I have to go fix some code so that it automatically generates a backtrace whenever it encounters an error, logs it, and then continues its computation as if the error had not occurred (because it's running inside an event loop where actually throwing an error would be catastrophic).  I expect this will take me about fifteen minutes because I have this in my toolbox.

[1] Yes, that's more than a dozen lines of code, but that's because what you see there is a complete Lisp interpreter, not just an S-expression parser.  The parser is at the bottom.  It's 30 LOC.