Deflagrations, hot spots, and the transition to detonation