views:

361

answers:

5

In the context of functional programming, a typical example of a side effect is "launch the missiles". I was just wondering where that expression comes from historically.

+6  A: 

There are software apps out there which do indeed manage the launching of ICBMs, so there must be projects whose Risk Assessment must cover the accidental triggering of nuclear annihilation. However, it doesn't seem as though the phrase refers to a real incident. Of course, if such a thing did ever happen, you can bet the Black Helicopters were out smartish to suppress all traces of it.

Anyway, I think it's just a hyperbolic answer to the question "What's the worst that could happen?" The origins probably come from something like the film 'Wargames', where an AI almost starts a nuclear war because it thinks it is playing a game.

I suppose the other thing is, it isn't really a side-effect. Missile launch control programs are supposed to launch the missiles; it's just, they should only launch 'em after all the necessary checks have been made. So it's about ensuring that we don't get to step 10: Launch the missiles until after we've been through Step 1: Wake the president, Step 2: Check the target coordinates, etc

APC
I'm guessing that @FredOverflow already knows what it *means.*
Craig Stuntz
+12  A: 
Norman Ramsey
+1  A: 

I've heard it in the context of rollbacking database transactions, as an example of an action that can't be undone: "it's hard to un-launch a missile."

Thomas Padron-McCarthy
+4  A: 

"Launch the Missiles," in transactional memory, is used to emphasize that I/O is irrevocable. Once the missiles are launched (i.e. the network packet is sent), it's on its way and can't be called back. For a transaction, that means that you can't abort anymore. Instead, since you've already published your results (BOOM), you must find a way to finish.

Transactional memory was first proposed in 1993, well after Wargames was released and stopped being cool. This 2006 TM paper from Simon Peyton-Jones (page 2) is the first place where I've found the "launch the missiles" analogy. Could this be the origin?

Andres Jaan Tack
+3  A: 

I have no proof of this but I always assumed it comes from a similar piece of buggy C code:

if (hasSecurityClearance = true)
{
  launchMissiles();
}
fishlips