Being relatively new to the software industry I have come across a question of deadline enforcement: 

Back in the idyllic age of academia, the deadline was the end of the semester and the penalty was a well defined 'F' (or local equivalent). Out here in the real world we need to make code our current and future peers can work with, I face the situation where deadline comes, deadline goes, and the project is still not finished. 

Now what? On one extreme we could fire everyone involved, on the other we could richly reward everyone involved.

1. What actions have you seen applied as 'penalty' for missed deadline, and which of these eventually resulted in more-good-code?
2. What project-management responses caused the project to fail outright,
3. What responses restored working order and resulted in code that could be maintained afterward?
4. What responses resulted in more-bad-code?