Setting up your yeast for a good fermentation, every time. Practically speaking this means temperature control (both fermentation and pitching), having enough fresh, healthy yeast (i.e. making starters), proper oxygenation prior to pitching, and of course proper sanitation.
If you can do all that, you will get drinkable (and probably very good) beer, regardless of whether you're using extract or all grain, and dare I say regardless of your recipe (assuming your grist wasn't something unreasonable like 100% black patent or crystal 120...)
I've only ever dumped two batches. One was my very first batch, which was a hefeweizen that ended up fermenting at 80 F. I got temperature control after that. The other was my 4th batch, an altbier which ended up with a stuck fermentation and some weird off flavors. I severely underpitched that one and didn't oxygenate well. I started making starters and got serious about oyxgenation after that.