The secret to writing is ...
Gather close. I'm going to whisper.
Are you ready?
The secret to writing is ... there are no secrets.
There are tools, and tips, and techniques, by the score. But every story seems to have its own lock, and I've never found a master key. Just the key to that story, that time.
I wish there were a magic incantation,a guaranteed spell. Wouldn't that be fun? A few words, a wave of the wand, and behold! A story, intricately plotted and beautifully written!
Some people say the secret is simply Butt in Chair, Hands on Keyboard. But sometimes that doesn't work either; the story doesn't unlock until I'm taking a walk or showering or washing the dishes or working on an entirely different story. (Stories can be jealous that way, tugging on your sleeve when you're trying to do anything else.)
The first thing I tell my writing-workshop classes is: YMMV (Your Mileage May Vary), as they say in the car commercials. Meaning to take every piece of writing advice, including the ones I'm about to give them, with a grain of salt. Everything is a tool. Try it out, give it a chance. But if it doesn't work, don't beat yourself up; don't try to force it. Simply try another tool.
Yoda, the Jedi master in Star Wars, famously said, "Do, or do not. There is no try." I beg to differ. Try this, and try that, and try the other thing, because sooner or later, something will probably work. And that's the closest thing to a writing secret I've found.