What can I put on my golf cart battery cables to prevent corrosion?

Chad S asked:

The battery cables in my golf cart are becoming corroded and I’m not sure why (I’m not exactly the mechanical type). Anyway, what can I spray or put on these cables to prevent the corrosion? Also, the corrosion is occuring on the metal part of the cables where they connect to the batteries.
One of my friends suggested liquid electrical tape. Is that a good idea?