A method for preparing a hydrophobic coating by preparing a precursor sol
comprising a metal alkoxide, a solvent, a basic catalyst, a fluoroalkyl
compound and water, depositing the precursor sol as a film onto a
surface, such as a substrate or a pipe, heating, the film and exposing
the film to a hydrophobic silane compound to form a hydrophobic coating
with a contact angle greater than approximately 150.degree.. The contact
angle of the film can be controlled by exposure to ultraviolet radiation
to reduce the contact angle and subsequent exposure to a hydrophobic
silane compound to increase the contact angle.