This document is an introduction to writing classes and packages for LaTeX, with special attention given to upgrading existing LaTeX 2.09 packages to LaTeX2e. The latter subject is also covered in an article by Johannes Braams published in TUGboat 15.3.