Dr. Norm Robillard has written a great book on how to virtually eliminate heartburn without meds or surgery. I have followed his advice inadvertently and rarely suffer from heartburn or, as it is called when chronic, GERD.
Essentially to cure your heartburn don't gulp Maalox or quit coffee. Simply remove carbs - refined carbs, grains and beans and watch your GERD get gone. His book gives a great explanation for the how and why and it never hurts to be a brain.