My first computer program was written on optical cards in the late 70's. I was 11 years old, and our maths teacher showed us how to write simple basic programs.
We'd write them out by hand, work out the ascii code in binary for each character of the program line, then using a soft pencil would painstakingly fill in the 'holes' for the binary code of each character on an optical card. One card for each line of program.
These cards were sent off to a university to be batch-processed on their mainframe. If you were lucky you got your output a week later with vaguely sensible results. In my case I think I only got a print-out back saying 'syntax error'.