This is about the most fundamental question there is, when you're developing a product from scratch.
But no one sent me this question: it's a scary question, and I think we're all afraid of the answer.
The answer to it is the secret sauce that separates products that win from products that fail.
A good rule of thumb is that during the time you are first developing your product you should spend 50% of your time on marketing activities, and 50% of your time actually developing it.
To be a little more specific, here's a time allocation chart for the first 3 phases of your product:
First, before we begin, is a "listening" phase. This is pure research. (There's another word for it... a dirty word, that I don't want to use... it starts with 'M' and rhymes with Harketing. If you just call it 'listening' you won't need to feel ashamed.)
Our first milestone is when we commit to a specific product. Development begins, but only half our time is spent on Development. (Engineers need to learn this!)
The other half of the time is spent first on 'Listening' and eventually on what I'm choosing to call 'Talking'.
By 'Talking' I mean documenting your product, describing how to use the product, finding ways to ease your customers into the product, writing blog posts, emailing your list, creating content to promote what you are building, and all other activities that make your hard work visible to the outside world.
The third phase is the pure promotional push as you move toward launch.
The fourth phase is not shown here. The fourth phase goes forever. The infinite fourth phase is one of continual improvement.