While this might be more urban-legendish, I keep two rules in mind to prevent this:
1. Always format the card in the camera. (I don't erase images from full cards, I re-format)
2. Try not to delete images in-camera.
Not deleting images in-camera is important for another reason. It is difficult to tell on the LCD whether the image is really a keeper or not. It is much better to wait for a decent viewing environement to make decisions like this.
For example, check out this new book that shows contact sheets of the photos taken at the same time as famous photos:
http://theonlinephotographer.typepad.com/the_online_photographer/2010/01/the-contact-sheet-from-ammo-books.htmlWhich ones were the keepers?
Also, LL has an article about an image that went from mundane to provacative with a bit of cropping:
http://www.luminous-landscape.com/essays/excludes.shtml