Ship, measure, respond. That really is the not-so-secret sauce.
Coding should be done quite late, after validating the market need, that people are willing to pay, etc.
Unless your time is worthless, of course.
Because you were lucky in this instance does not make that good advice for others to follow. (I'm not saying it's bad advice either, just...)
But given that, I stand by the above. You are better off having a product you can iterate on based on real world feedback, rather than a theoretical construct that hasn't been tested.