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).
I would love a reference about the yellow legal note pad thing.
In reality, writing a program in longhand is something everybody could do -- but because nowadays programming is mostly plumbing, you have to empirically test everything.
I saw it with my own eyes when I was in his office to discuss some typesetter-interfacing issues, but I suppose that's not enough of a reference. Perhaps the story is repeated in an old issue of TuGboat, the journal of the TeX Users Group, but I couldn't find it. Here's a more extensive description from a decade ago though: https://groups.google.com/d/msg/comp.text.tex/9quGg7j6U0k/tl...
I don't know exactly when TeX was written, but back in the ed days before vi and emacs, a yellow legal pad was a substantially better full-screen editor than the line editor. Computers were for executing programs, not editing text.
Knuth developed the first version of TeX in 1978, on the Sail mainframe, a 36-bit DEC PDP-10 with a unique hardware graphics system called Data Disc: a single-platter disk with 32 fixed read/write heads, where each of the 32 tracks contained exactly the 512 X 480 bits that constituted one frame buffer's worth of pixels. The amazing hack was that the rotational speed of the disk was just right so that during each rotation, the raw bits coming off of each head produced a video signal with just the right frequency for piping out through a coax to a completely dumb black-and-white video screen! (Actually, there was a cross-switch in there, so that there could be 64 of these special screen/keyboard units, of which 32 could be in use at a time; in fact, you could walk up to any of them and "grab" the channel that you had been using from a different office, or, for that matter, peek at anybody else's channel.)
Anyway, the custom OS ("Waits") made good use of the Data Disc graphics system: it had a built-in interactive line editor, so that when you were in the shell, you could edit your command line (control-d deletes a character, etc., etc.) and see the result in realtime. (This was years and years before Unix got similar features in tcsh and bash and the readline library). All programs inherited this functionality automatically, so Wait's full-screen editor ("E") was simply built on top of it. (Again, years and years before emacs and vi, and all on a system with a per-process address space of only 256K words (about 1Mb), split evenly between data and code.)
So, to finally answer your question: while Knuth did spend his early years programming on punched-card batch systems (where you pretty much had to write out code long-hand before keypunching it), by the time he had started working on TeX he had been exclusively using a full-screen editor on a graphical display for many years.