One day in grad school my advisor unexpectedly said something along the lines of "so, are you nearly done with your dissertation?" I was nowhere near done. But, keeping calm, I replied that yes, while I had a few things to finish up, I thought I should be done in time to graduate that June. Then I went back to my office and started writing as fast as I could. I finished about a day before the deadline. The result was not particularly good, but it got me out of grad school, which was all I wanted at the time.