Out walking with Simon, I stumbled over the last line of a story. It lay there in my mind all by itself, but as soon as I wrote it down, I could see the whole tale. Then it became just a matter of filling in the details. It is a short story now, but given enough details, it could be a novel.
Stories are seldom written all in order. Sometimes the beginning gets written last. Life is not lived in order, either, though when we've been edited, we remember it that way.