One of the biggest causes of pain when writing a thesis is to notice late in your project that you are going way too slowly. The writing schedule is your primary tool to manage this risk.
The writing schedule is a list of dates by which you plan to finish each chapter. Create it by counting backwards from your thesis deadline. Subtract one week for buffer and another week for editing. Now add the chapters by increasing order of importance: the deadline of the least important chapter should be the farthest in the future.
Write, Check, and Adjust
The writing schedule is a risk control tool. Firstly, the deadlines allow you to compare estimated writing speed against actual writing speed. They enable you to tell early on if you are going too slowly (or, less likely, too quickly) and adjust accordingly. Early adjustments are less painful than late ones. Secondly, the chapter ordering makes sure you write your most important chapters first, followed by the second-most important, and so on. This way, should you run out of time at the end, it affects the least chapters and not the most important ones.
The writing schedule is not an end in itself; you must regularly compare your actual progress against it. I found that doing this once a week, and for each writing milestone, worked well for me.
Traps to Avoid
A trap I fell into myself is being overly optimistic in planning. Creating an unrealistic plan is a systematic exercise in self-demotivation; it drains your energy if you cannot meet your goals with reasonable effort. Set your goals modestly and make sure they are easy to meet. The primary goal of the writing schedule is recognize out-of-scope writing ambitions and cut them down early on. This gets undermined by overly optimistic speed estimates.
Another trap is to ask for feedback when it is too late to incorporate it. Don’t be reluctant to show early drafts to your supervisor; just make sure that you explain that they are early drafts. The aim of such a step is to receive feedback on the big picture, not to show off your writing skills.
The more emotional a situation gets, the more likely I am to follow my gut and not my head. In other words, the hungrier I am, the more greedily I pile food. And the more unplanned the writing gets. It’s hard to follow a plan once the going gets rough. The whole point of the above process is to make decisions before you become too emotionally involved. However, the best-laid plans are no guarantee that you will avoid running late and getting emotional. If it happens to you, regularly force some distance between you and your thesis to make conscious decisions on how to continue. Choose a sparring partner (roommate, parent, spouse) with whom you can regularly revisit and update writing goals with. The first point of this exercise is to explain to your sparring partner what you wanted to write since your last meeting, what you actually wrote, how you maybe updated your plan, and what you plan to write until your next meeting. The second point is to identify unrealistic goals; this will force you to make conscious decisions on what to leave out (otherwise, that decision is taken away from you when time runs out).