3 ms·
I didn't really grok how punch cards worked until I went to the Computer History Museum and typed one out myself. Then it suddenly clicked. Each punch card rep
by russellbeattie 4y ago
I didn't really grok how punch cards worked until I went to the Computer History Museum and typed one out myself. Then it suddenly clicked.
Each punch card represents a single line of plain text. That's it.
Usually this was a single line of FORTRAN or COBOL code, but it could also be data like a person's name, age, etc. No idea why I didn't get that before. I may have had the idea that developers back then were writing in binary or something. As you type out the card, the holes are punched and the character is printed along the top, so humans can read it. (Cards can hold binary data as well, but I'm talking about the cards used by programmers and for data input by secretaries - say for new account info, etc.)
How many characters can a card hold? 80, of course. Even today, many IDEs will draw a line at 80 columns. I thought it was some pedantic formatting thing. I think many still do. Nope, just a holdover of 1950s tech. A stack of cards? That's akin to a single file, with each line of text data being an individual card. Need to fix a bug? Make a new punch card for that line of code and swap it out. Code reuse is card reuse. Just take that subroutine from one stack and slip it into your program's pile before your next run.
Sure, there were typewriters and printers for interactive use, but without magnetic tape or anything like a floppy, this is how you stored your program in a machine readable way.