Perimeter 
Read a really interesting article in Wired today about a soviet doomsday machine called Perimeter. Apparently it was pre-programmed to destroy the US in the event of a nuclear attack and it had built in safeguards to accommodate scenarios where the soviet leadership might be wiped out, etc etc. Man, I wouldn't want to be the programmer who worked on parts of this system :)
http://www.wired.com/politics/security/magazine/17-10/mf_deadhand?currentPage=all