History, theory, and practice of the electric telegraph