In my experience, deadlines are useful. I have a hard time with the last 10% and the deadline helps me get there. Deadlines help to motivate me to write instead of doing other things, such as spending all day meandering online. If I meet the goal, I'm succeeding (at least at something). If I don't have a goal ("meet the deadline"), it's harder to tell when I'm failing.
As a novelist, I think that deadlines force me to write more and more often, keeping me in touch with the flow of the story -- therefore better quality. (Of course, at the same time, I take breaks to step back from a piece and get a fresh perspective.)
All that being said, "having a deadline" and "knowing how long the story will be" are two different things. If I have a deadline and yet my story keeps getting longer, then obviously I will need to spend more time writing! It's a vote for working harder, sooner, rather than waiting until the last minute.