Ironically - its actually about the worst thing you can do to deflect an asteroid - its effects are unpredictable. Most modern proposals call for leaving a large mass near the asteroid - given a few years it will actually change the orbit enough to make it miss Earth. With present technology - nukes included - we'd need at least 5-10 years warning to stop an incoming asteroid.