A method for forming a nanocomposite material includes introducing a nanofiller material having polar end groups into an extruder having a polymeric material therein. One of the two measurements is of resistance per unit length. Such a TiN layer may be used as a diffusion barrier underneath another conductor such as aluminum or copper, or as an electro-migration preventing layer on top of an aluminum conductor.