For years I thought writing could be accomplished by working whenever I got around to it. I thought I had to have the right setting all of the time. Eventually, I started trying to set my own deadlines, but, my form of creativity didn't like deadlines. Creativity chose for itself when it was going to happen. So I learned to always carry some type of writing tool with me.
During those initial years of attempting to learn to write as a profession, I set terrible examples for myself by not sticking to a schedule. I would dilly-dally around during the day waiting for inspiration to strike or simply convince myself I was writing the world’s next best seller all inside my head. Let me be succinct about this lesson: books in your head have no value to others.
As the years went by I began to learn to write with goals in mind, not so much by word count or number of pages completed per day; but more by daily idea exploration. Some ideas would pan out; some would lead me nowhere. Some are useful for the current novel I am working on; some go on to become a part of something else. Another lesson I've learned: don’t ever assume "nowhere" is nonproductive. Writing, like living, is a lifelong learning process. As long as you are doing it, you are learning something.
I’m still working on setting the goals of pages or word count per day. The important thing I have learned, however, is to simply keep writing as much as possible.