Most projects don't die from bad code: they die because nobody needed them. Before writing a line, validate. It saves you months of building something no one cares about.
The one-sentence test
Write what problem you solve and for whom, in a single sentence. If it doesn't fit, it's not clear yet. An idea you can't explain in one sentence is an idea you don't understand well enough to build.
Talk to five real people
Not your mom, and not someone who'll say yes out of affection. Five people who actually have the problem. And don't ask 'would you use this?' (everyone says yes); ask how they solve the problem TODAY and what frustrates them about it. Their real pain, not their politeness, is your validation.
Build the smallest version that proves something
Don't build 'the app'. Build the smallest piece that confirms someone cares: a landing page that captures emails, a prototype that does ONE thing well. If no one bites there, you saved the whole product. If they bite, you already have your first users.
In surgery we say: the operation is won or lost in the planning, not in the operating room. With software it's identical.
Validating isn't wasting time before building. It's the most important part of building. The right idea, confirmed early, is worth more than a thousand lines of perfect code on something nobody wanted.