I happened to see a post on this subject over at John Scalzi's blog, and I was really surprised at what people considered to be the general good advice. Someone on Scalzi's blog had said that they "commonly read advice that writers should sit down and write for four hours and then call it a day." Wow, that's specific. Instructions that specific sound kind of magic, don't they? Like a formula? I mean, I've often heard the general "write every day" rule, but this four-hour thing was a new one.
Here again, I think the old axiom "whatever works for you" is best. Personally, I tend to be pretty erratic in my writing. I don't try to keep myself to short-term schedules, and I don't set word count goals for the day, week, or month. I try not to treat this like a job--not yet, anyway. Maybe that will change once an agent and publisher get involved, but that's not something I'm going to worry over just yet.
For now, my goal is two write a solid rough draft of a ms about every year to year and a half. That's outside of work, family, and everything else. If I'm ever at a point where writing becomes my only job, then suddenly I'll have a lot more time to sink into writing. Then, my goal will be to always have two different books (not in the same series) going at once. Orson Scott Card does that, and has commented before (both on his website and in his writing books) about how helpful that is to him--the two stories feed off each other, and each is improved by the act of working on the other, etc. And when he gets bored or stuck with one, he can just change to working on the other until he breaks through that block. Sounds good to me, but I don't have that kind of time or attention while I'm also working at my daily job as a programmer; my attention is already split enough as it is, these days.
For the moment, I take a totally different approach to my writing from what is generally recommended: I write when I feel like it. You might think that would work pretty poorly, but fact is that in most hours of most days, I feel a pretty strong desire to write. It's almost always there in the back of my mind: I wish I was working on my book. Or I could be writing my book instead of this. I'm thinking it now, quiet in the back, while I'm working on this blog post. So any time I have the energy (both physical and emotional) and a large-enough block of time (2-3 hours), I generally try to sit down and do some writing.
The exceptions are when I've hit some sort of blockage with a scene, but I've discovered something: when this happens, it's generally because I'm just not ready to write that scene yet. Either I just haven't thought it out well enough yet, in which case I need to do some more prewriting (using my handy Outlining program), or the scene just doesn't resonate with me yet. Maybe that means there's some problem with my current conception of the scene, and that means I need to go back to the drawing board on the general idea, or maybe that means I'm just not in the right mood. When this sort of thing happens, I try to do what I can at the time without actually doing any writing (so, thinking, prewriting, or editing), or else I just leave it and do something else, knowing that writing session was a lost cause.
The result of all this: when I'm really in the flow, I can write for 3-7 hours per day (in the evenings), 5-7 days per week. One way or another, those sessions usually end up letting me edit 2,000 to 5,000 words, as well as writing 1,000 to 4,000 words. I always start by editing the content that comes right before my new content. My standard goal is 2,000 new words, but I don't hold myself to that (higher or lower). When I hit a place where I'm stuck, sometimes I go as many as three weeks without writing. Usually when that happens, the reason I start again is because I have the epiphany that I've been waiting for. That usually spurs my most productive times, when I can write 3,000+ words per night for a week or two. On super-rare occasions, I've spent 12-17 hours in one weekend day, and written 8,000 words of content. That's only happened like three times, and is usually surrounding some sort of climax in the book. Most of the time, it's pretty consistently 2,000 words per sitting.
All of that is how THE GUARDIAN got written, anyway. In fits and spurts. I didn't write anything that I wasn't genuinely excited about for whatever reason, and I didn't just "press on" when my good ideas were drying up. Instead I read, watched movies, listened to music, or just generally relaxed until those good ideas started returning, or until something I read or watched or heard triggered a new idea in me.
Some unpublished writers talk about keeping their ideas "pure" by not reading anything else while they do their work. I had to do that at first, before I really found my own voice, but now I try to do the opposite. If I'm having trouble writing, I do all I can to take in quality, unrelated media, music, and literature, and see if anything sparks something new.
Overall, this would be a hard approach to recommend to somebody. I mean, I can't in good conscience even recommend it to you. The only reason it works for me is because I have that underlying drive to write, and that's what keeps me coming back to the keyboard. Since I have that drive, I essentially get a manner of quality control by limiting my writing to my really prime times. It works for me for now, but I'll let you know how things change as writing becomes less hobby and more career.