the present invention provides a method for making a high temperature coating comprising applying to a surface a precursor polymer which decomposes to a substantially pure product selected from the group consisting of a refractory metal carbide and a refractory metal boride , and exposing the precursor polymer to conditions effective to decompose the precursor polymer to said substantially pure product .