Just to add to the debate, I believe writing, whether a novel, short story or whatever, is something you can't NOT do. The story, the characters, the exploration of an idea, are things that are inside your head and simply have to be written.
And its not impossible to get that first lot splurged out onto the page, before you need think about ordering it, tidying it, improving it.
And only now I'm four(ish) novels down the line do I feel ready to think about approaching anyone with a view to possibly publishing.
There are never, ever any certainties in creative work, however market-minded you set out to be. There just aren't. The only way to be sure that your work won't be rejected is never to send anything out.
That's partly because no writer is wholly and totally in control of what ends up on the page, because we're not wholly and totally in conscious control of our writerly selves.
And it's partly because there are dozens or even hundreds of reasons why a creative work will get bought, or won't get bought, and only some of those reasons are to do with how good it is, and only some are to do with how well it seems to fit the market ... or, rather, what an editor thinks the market will be in eighteen months' time when the book comes out.
Every editor has a tale of buying work of a sort they'd said they never buy, or had no idea they wanted. And every editor, even more often, looks at something which ticks all the boxes of what they're looking for and... just doesn't buy it.