I've often written about research taking priority over writing, because it's only possible to write a good thesis if you have well-executed research to report. This doesn't mean, though, that writing is unimportant; as an academic, your success depends on being able to use writing communicate clearly and build a coherent argument (in your thesis and in published papers).
There is a requirement in many PhD programmes to produce writing throughout the course of your PhD, and even if this isn't the case it's important for many to develop their skills as writers. So while I maintain that the research should be the priority, that doesn't mean writing should be totally neglected by everyone.
So how should you approach writing throughout your PhD in a way that'll be useful to you later?
Limit the scope
It doesn't make sense to start writing thesis chapters from the start of your PhD, because it's impossible to write with confidence about your research until you've done the work, and because your knowledge and view of your topic should change greatly over the course of several years.
If you start by writing chapters it's easy to get overwhelmed by the scale of the task. Many of the students I've worked with have ended up with hundreds of pages but with nothing actually finished. The resulting mess is very hard to sort out, which can be extremely stressful and demoralising.
It's better to reduce the scale of the task. Forget about writing chapters for now, and instead write short pieces with a narrow scope that you can actually finish. Some of these can form the basis of chapter sections later.
Why start small?
Just spending time writing is not enough to become better at it, especially if you just churn out words without thought and switch to writing about something else whenever you hit a block.
To write well you need to be able to assess and adapt your own work (see training the inner writing critic). If you can't do this on a small scale then you definitely won't be able to do it on a large scale; it's much easier to practice and learn with something smaller and simpler than an entire thesis.
An example
During my research I used quite a few different experimental techniques, but because the importance of each one changed as my project developed it would have been impossible to write a good methodology chapter in the early stages of my PhD.
As a way of developing my understanding of the techniques or as a way of practicing writing though, I could have written short essays on each. Taking atomic force microscopy for example, I could have written 1000 words on the historical development of the technique, or the theory behind it, or on analysis and interpretation of data.
By narrowing the focus in this way, limiting the length and the scope of the writing, the task becomes achievable. You can take care over clarity of expression, you can take the time to make sure you understand the fundamentals, you can think about the order of and relationship between a small number of key points and you can rearrange and sharpen up the writing as you go.
Most importantly you can get the writing to look finished, with a continuous flow from beginning to end, rather than developing the habit of always leaving things partially done.
When you come to write your thesis later, you will have these sections of writing to refer back to. There will be much that you don't use, but you can select the best bits and maybe even improve upon them as you decide where best to put them.
Note: while writing about a subject can help with your own understanding, you must get practical experience of the techniques you want to use too. I spent many hundreds of hours using atomic force microscopes during my PhD- knowing the theory is not enough!
Developing arguments through writing
You can use a similar approach to develop a complex argument by first focusing on small sections with a narrow scope.
This way you can use writing as a means of inquiry, exploring the subtleties or logical consequences from multiple angles. Writing this way can often lead to new insights, simply because you're thinking intensively about a specific question, problem or idea.
Again, much of what you write won't end up in your thesis, and you might not know what the most valuable content is until later, but take your time and do it carefully anyway. By repeating this process of narrow-but-deep investigation you'll start to notice links between your ideas.
Here's an example; in trying to define what a PhD is, I arrived at the conclusion that it's about developing the skills of a professional researcher. Later, when writing about the thesis defence, I realised that defending your work in front of a panel of examiners is a form of peer-review, which makes sense if they are testing your ability as a professional academic. Realising what the examiners are looking for (and how this differs from undergraduate exams) then gave insight into other aspects of the work, and ultimately that became the basis of my book.
Thinking deeply about small, manageable aspects helps to understand the whole. You can then construct an argument from well-examined component parts, rather than churning out words without thought and hoping something good emerges, or trying to edit down from a mass of unstructured thought.
See also
Doing a PhD and writing a thesis are not the same thing!
