If you only have a vague idea of what the product will be (or at least what the real problem to solve is) and you don't have any potential buyers to talk to then you really shouldn't be writing a single line of code at all. You should be building your network and experience so that you
do understand those things,
then you go and build an MVP. So many developers fall into this trap.
I always recommend the book The Mom Test to would-be entrepreneurs. It goes into more detail on why asking people if they will buy something is worthless (as you mentioned), and how you can ask much better questions to find and validate problems worth solving.