I wrote a book. It sucked. I wrote nine more books. They sucked, too. Meanwhile, I read every single thing I could find on publishing and writing, went to conferences, joined professional organizations, hooked up with fellow writers in critique groups, and didn't give up. Then I wrote one more book.