Knuth wrote the entirety of the first version of TeX on yellow legal note pads, and then typed it all in, and then started debugging.  Ditto for MetaFont.  Both are the equivalent of about 10kloc (after the Tangle preprocessor removes the voluminous comments).