Sunday, November 05, 2023

In the bad old days we had Punchcards. How did people deal with that?

In the fall of 1976 I started as a Freshman at SUNY Stony Brook intending to major in Math and Computer Science.  I took Honors Calculus I and CS 1. The CS course was in Pascal (which I still think is a fine teaching language; however, since I have rarely taught a programming course I am not qualified to debate this point). We had to write programs using

Punch cards.

(From Sept 1, 1976 until Nov 5, 2023 I thought punch cards was one word. I also thought Stony Brook was one word. Wow- the things you learn from blogging!)

It was awful. It took a long time to just write a simple program and mistakes were hard to avoid. The turn-around time for submitting the program and getting the output was 1 hour if you didn't do the project the day before it was due but a lot longer if you did. I recall spending 6 hours debugging a program only to find that I had a 1 (the numeral) instead of a capital I (the letter). Very bad for time-put-in vs knowledge-gotten-out. 

I DID finish the course but decided to NOT major in Computer Science (I majored in Math and Applied Math instead). I had the following thought, though I could not possibly have expressed it this well back then:

I'll return to computer science once they have a better interface.

But I wondered, why didn't everyone think that? The ratio of time-put-in to knowledge-gotten-out was so bad that I would think people would all realize they should wait for a better interface. Of course, its a good thing that others did NOT give up. If everyone had given up then we wouldn't have our current wonderful electronic society!!

More generally, What did people in that era think? I asked several people who dealt with punch cards and there are some of their responses:

1) Paper Tape was Worse: 

 a) In 1960 I used a Bendix G15. It had paper tape, and I was constantly ripping them. I never imagined I would end up in this field but here I am! So actually punch cards were a major improvement. 

b) In 1976, in High School, we used paper tape. So cards did not seem like a major inconvenience. A bigger problem was the lack of resources (hole-punch machines, card readers, printers, etc) which mean long lines leading up to due dates. 

c) In 1980, to get to and from the computer room we had to walk uphill, 5 miles, in the snow. Abishola was lucky, she had shoes. Bidal  was less lucky, they had socks but no shoes,  Carol was even less lucky, she had no shoes or socks. As for me, I was the least lucky of all since I had no feet. 

Bill Meta comment: Note that the rate at which places went from paper tape to punch cards varied. We will see more variation later. 

2) An Upside to Punch Cards

a) Some of us, however, designed programs in advance of hitting the 029 (Bill Add: 029 and 026 were the post widely used keypunches of that era.)  A reasonable case can be made that the opportunity to reason about what we do first (rather than doing the monkey-typewriter thing on fast interfaces, then debugging by friction) resulted in higher quality code and way more polished critical thinking skills. Thinking. I recommend it. And in point of fact, that is one of the truisms about software engineering writ large. Some of the most successful practices we employ are ones which magically involve freeing developers to think about what the heck they do. Quality improves accordingly. This is not advocating that we return to cards. It is however the polite push-back against your assertion that the appropriate technology of that era was awful. In fact, it was just appropriate for the computing of the day. When leveraged correctly, good things happened. 

 b) One of the best things that came from it was convincing you to go prove theorems for a living. Glad for that! You work your side of the street and we will work ours.

c) While entering / running code was a pain, especially compared to today, there was a hidden benefit:  if your program didn't work you had to think carefully about why, because the number of run / debug / re-run loops you could engage in was very limited.  This made me a better programmer, because I was less prone to "shooting from hip" to get my programs to work.

d) With punch cards, you got a lot more done more quickly if you were disciplined, and your description of yourself does not sound very disciplined. (I wasn’t either.) Dijkstra preaches the importance of discipline for formal reasons, but there is no doubt that his programming experience was that the way to get working code was to think it all through carefully ahead of time, not to write hastily and iterate by trial and error. And Knuth, who shares none of Dijkstra’s sternness, describes his experience learning to program in much the same terms.

3) Did people think that there would one day be a better interface? 

a) Did not think much about it. Compared to what came before this (no access to computers) it was fantastic. I learned my first programming language (Fortran) from a text without access to a real computer at the time, so punch cards or anything was a big plus. In retrospect it's of course painful, but at the time it was just the way it was.  

b) Sure, but people can only see so far into the future. I could foresee the day when we would all have access to a CRT-screen monitor with a text-based interface (with both lower and upper-case characters, wow) all connected to a mainframe. We might even have a light pen that we could use to point at the screen! Of course, we were all looking forward with anticipation to when we would be living under giant glass-domed cities and flying around with jet packs.

4) Why didn't more people do what I do and say I'll wait for a better interface? 

This was somewhat covered by the answers to question: (2) What do you mean better? , and  question (3) Hey, it was what it was. I also got the following:

a) We wanted to be programmers or computer scientists thought we might not have said it that way. YOU Bill could opt out and do Math which was your first love anyway. WE couldn't. And there were scientists (usually physicists) who HAD to use the machine to calculate their electrons-and-whatnot so they HAD NO CHOICE but to deal with paper tape or punch cards.

b)  I was the first class at Cornell not to use punch cards. But I would have used them. Otherwise you are always waiting for the next technology (assembler, high-level language, disk drives, USB drives, dropbox, etc). What if I said in 1981, I'm going to wait until AI writes programs for me. Well, who's laughing now!

c) If you keep waiting for the next version, you never buy anything. Bill, you  still don't own a camera (see blog post here). BILL RESPONSE: I have one in my cell phone, but your point is correct, I never bought a camera that was just a camera.

5) Did you think that this is tedious  but that they were paving the way for a better tomorrow? (I doubt you could have expressed it that well).

a) Yes. And I could not possibly have expressed it that well. Hindsight is 20-20.

b) Not at all. Along with our pocket protectors and calculators strapped to our belts, it was all part of our proud nerdy identity.

6) Anything else you want to add?

a) As an undergraduate (Brandeis) we had PDP-11's, but my graduate school (NYU) had punch cards. Weird!

b) More nostalgia:

 - Classic prank: Get a bag full of punch card "holes", go back to the dorm and stuff them in your roommate's folded-up umbrella.

 - Using a thick magic marker to write the program's name along the top of the deck.

 - Status was determined by the size of your card deck. You knew that you were hot stuff when you had a card deck so large that a rubber band wouldn't hold it---you needed a box to put them in.

 - Heated debates with classmates on the best way to cleanly tear a computer printout along the perforation (fast snap or slow unzip?

- The physicality of machines (see here). 

c) You are only talking about punch cards. There were other issues: lack of machines and to much noise. Plus, of course, we didn't know what we were doing. Unlike now :-)

d)  I am not the best person to ask, but I think the answer is that you are correct — using punch cards turned people away from using computers as anything but a tool, as opposed to something fun or interesting in itself, much less beautiful. Those happier experiences were ones I had a decade before your punch card experience, because I sat down by myself at the console of a DEC PDP-4 in 1966 and never looked back. I actually HAD done some punch card programming a year or two earlier on an IBM 1620 and was left wondering why anyone would want to go into accounting — which was the application domain of that summer job. It never occurred while I was spilling those decks on the floor to me that there was something called computer science. I kind of realized that only when I took a computer graphics course in 1967, again using a standalone minicomputer (a PDP-1).  However, to your point, yes I suspect that that few people got into the field (such as it was) with just a batch-processing experience.




  1. Replies
    1. Maybe we should go to a punch card system for comments.

  2. When I took computer programming in high school we used Fortran. There was one card punch in the classroom, but with 30 students in the class that was obviously inadequate. So we used special Fortran mark sense cards, and you filled in the bubbles on the card with a no. 2 pencil. Assignments were given out on Monday, and you had to submit on Friday. The card decks were put into a special suitcase, and sent over to the other high school that actually had the machine (IBM 1130) and they were run overnight. So you got at most 4 runs of your program before having to submit on Friday. It was a huge deal when the school bought a Commodore PET in 1978 or so.

  3. I used punch cards at Stony Brook. I liked the punch card machine. Yes, the turnaround was slow. But, I don't think I should make mistakes, so it was good motivation to be careful.

    Yes, paper tape was worse.

    I learned long ago to not use "I" for a variable name.

    Pascal is not only a fine teaching language, it is a fine language. Unfortunately, Turbo Pascal was so successful, that it killed off any other compilers, and Borland didn't make it available to schools (I may have my history a bit off, but is is something like that). These days, I write all my Windows apps in Pascal (i.e., Delphi).

    A few years after Stony Brook, I started writing apps for PCs. I did it with a friend. He had an IBM PC with two floppy disks at home (no hard drive). We were using an awful Microsoft Fortran compiler. It took fifteen minutes to compile. We'd start it compiling, then go watch a video. Fifteen minutes later, we'd see how it was doing. If it got a syntax error, we'd fix it, then go watch TV for another fifteen minutes.

    1. My father was a site engineer for one of the first DEC LINC-8 machines, and then PDP-7s, and PDP-8s, so I've seen a lot of paper tape, and it looked fine; quite zippy actually. Things were slower then, and, as you point out, slower means one is more careful. Much later, my high school had an IBM-1130, with punched cards, and it was great fun. I had the line printer printing out life patterns, a friend figured out that he could flip bits in the registers at frequencies to play tunes on an AM radio set up next to the front panel. I started a chess program (didn't get very far) and he actually wrote a Lisp interpreter. Like I said, great fun. The keyboards on the card punches were really wonderful. Recent "gaming" keyboards have gotten better, but only once between then and now did I have a keyboard I really liked (a Toshiba Japanese market "Dynabook" with a 286 and no hard disk).

  4. I have known worse than punched cards as program medium:
    Telex paper tapes!
    :-D :-D :-D

  5. I started university the year after you did. Punch cards were better than mark-sense cards which were the default at our high school and were sent overnight to the Board of Education to be run. The first program they had us do was felt quite brain-dead: mark-sense a bunch of print statements in Fortran to produce line printer images of some picture we had drawn with X's on graph paper. Later my high school got card reader/line printer access.

    I lived a block from the local university computer center with 026 and 029 keypunches that I could use at almost any hour. (The 026 keypunches were still very slow but the 029 keyboards were OK.) By hanging around the computer center I got to use other interaction modes (BASIC on thermal paper printing interactive terminals) but they didn't have much storage so punch cards had advantages of permanence.

    The most painful thing with punch cards in high school was for an extra-curricular project with a professor using Pascal, which had characters like [ ] that weren't on the 026 keypunches. There were few 029 keypunches and only some of them had the characters printed on the keys and they were almost always taken. Others just had codes like 12-8-2 printed on the shift version of the keys which indicated which rows of the card got punched so you had to remember what they meant every time you used them!

    When I was an undergrad Math major at University of Toronto with CS on the side. CS was very punch card focused because, just before I started, the CS building burned down and the rebuild wasn't finished until after my first year of grad school. Because of that there wasn't space to put enough terminals even though they would have been cheaper to run. The first two years were all punch cards and line printers with 15-30 minute turn-around prior to 10 pm and needing to come after midnight to get 5 minute turnaround. There was a certain discipline to being incentivized to really debug rather than just change a few characters and retry. In my first year of grad school we again had punch cards for OS - our group project ran to nearly an entire box of 2000 cards, but it actually was quite satisfying, maybe because everything worked almost immediately. (This was much better than interaction on the VAX for my SE group project that same term.) This was my last punch card project and I probably have a more positive view as a result.

    One thing you didn't mention was the column discipline for punch cards which shares something with Python's "columns matter" style. (Or is it that Python is a bit "Back to the Future".) Columns 1-5 were for line numbers (or line labels). Column 6 was for "continuation" in case your line was too long. Columns 7-72 were for the rest of your program lines. What were lines 73-80 for? Card sequence numbers that were not part of the program. What good is that? The idea is that you put numbers there so that if you dropped our card deck and they spilled out, you could pick up the cards and use a card sorting machine to sort your deck for you using radix sort in multiple passes.

    What is much more painful than typing a bunch of punch cards? Having to write out your programs so that someone else can type your punch cards! This was during a summer job at a large insurance company when I was an undergrad. To run programs on their mainframe (PL/I only) you had to very neatly fill out these big IBM forms with 80 columns delimited and give them to a keypunch typist. Thankfully, I got to switch to a project using BASIC programming on some of the first pre-IBM PC personal computers to do group insurance quotations. The contrast was pretty stark!

  6. I worked with punched cards in my first job out of college in 1974. Several factors made this less onerous than one might think. 1. We had a full-time punch card typist who was very fast. 2. We had a manual card puncher near the computer for last-minute changes. 3. The amount of programming one was expected to get done in a given time period was much less than now. We were slower and the programs had fewer lines of code.

    We also new that things were changing fast and we wouldn't have to put up with it forever. Plus, I knew that programmers in another part of the company had to use paper and mylar tape! The grass was greener on our side of the building.

  7. During my BS for Engineering, I worked for an onsite company selling ‘time share’ computer access and programming and design services. Our part time work included a locked work cell with drop-off window for programmers to deliver their boxes of punch cards for us to feed into machine readers to translate into electronic records for immediate live run of their program. Maintaining exact order of thousands of cards was critical to success. One card out of order could result in hours of manual work by the programmer.

    The work cell had glass windows for people to see their work progressing

    So for humor, we would take the boxes, walk behind a post, quickly substitute boxes of blank cards as we walked, then trip and flip thousands of cards around in full view. Reactions were great. All because guys in their twenties are actually still only thirteen

    The progress of technology at that time was astounding -the move from manual slide rules to calculators to advanced calculators to early PCs was stunning, progressing in fast steps in only months. Within a year or so the time share was all digital via phone systems.

    With no audience to torture, the non-technical guys on weekend shifts would turn off the lights of the large room, open all the banks of computer processors to expose their flashing lights, then get high.

    Millions of years of human evolution and a couple of decades of technology, humans and technology show us the world to come.

    1. Ah, yes, slide rules. My dad taught me how to use one, and I carried one around in high-school chemistry and college accounting. Maybe two years after graduation I decided to treat myself to a circular slide rule; I'd always lusted after one but didn't have the money, but now I had a job and could afford one, right? So one evening I set out to office-supply stores, college bookstores etc to find and buy a circular slide rule.

      The scary thing isn't that I couldn't find a circular slide rule. The scary thing is that I couldn't find anyone working in any of those stores who knew what a slide rule is. They'd disappeared just that fast!

  8. In 1967 I was in high school and my school had 1 of the few computers in the school board. I did programming as an extracurricular activity. We wrote code on punch cards in Fortran IV.
    It was OK . Didn't know better.

  9. I spent 50 years in the business and the dates of peoples experiences indicate how up to date their institute was. I experienced time sharing in 1969 at UCBerkeley but still tolerated all the other technologies. No one mentioned Silent 700? Something that could keep up with your typing and didn’t require ear protection.

  10. I spent 50 years in the business and the dates mentioned in the comments indicate how up to date their institute was. I used time sharing open access terminals in 1969 at UCBerkerley but did experience all the other options. I surprised no one mentioned Silent 700 which could keep up with your typing and program output without requiring ear protection.

  11. My intro to programming language (using punch cards) was AlgolW. Later Fortran on cards. I remember discovering the utility of drum cards.

    What I took from cards and listings was a sense of reading code for bugs and the relatively high cost of a bug or error in terms of repunching and resubmitting the job. That stuck with me for my entire career even with modern environments and languages.

  12. Did any one else 'insert' and 'delete' by manually pressing on the source or target card when duplicating?

  13. University of Waterloo, 1979. The unloved punch card readers at the back of the computer labs were my secret weapon. Most people used the time-share terminals, which submitted virtual decks of cards to the IBM 370 mainframe. In the days leading up to a due date, job queue lengths could easily reach 45 minutes. And in the last remaining hours of an assignment could hit as as long as 2 hours.

    For whatever reason, job queue times from the card readers to the mainframe were always less than five minutes.

  14. "It's good that others did NOT give up"

  15. (Bill) Thanks! Fixed! Very important correction.

  16. University of Waterloo 1969 -- high school day visit...intro to Watfiv programming via punched cards...right there i knew I wanted to to play with computers as a job for 49 have about two dozen Raspberry Pi's

  17. In 1978, I was in the last class at Tulane University to take the 101 course in computers on a machine loaded from punch cards, the IBM 7044 from 1963 or so. Around the corner was room full of monochrome, text-only terminals connected to the DECSYSTEM20.
    I would pass in the hallway, curious over how much better that experience would be.

    I decided to find out and overloaded the CS 102 programming course and as I suspected, the user experience was much less frustrating, but it was more distracting, with system monitoring tools and live print queues, not to mention Adventure and Eliza (ChatGPT V0.000001). It meant less time and attention paid to my mechanical engineering major, and eventually a career in IT.

    With punch cards, you had to line up the columns. Cards had to be in specific order. Programming errors required visualization in your mind, because the stack of cards certainly wasn't going to pop up a debugging tool or diagnostic diagram. When the operator would hand back the desired answer printed out, that was more deeply satisfying than simply watching a terminal prompt reappear without any error messages.

    The focus required to use punch cards was real. If you didn't have a book or magazine, there stood the deck and nothing more. Today's environments are richer but also more distracting: this very comment comes at the expense of a tedious ongoing Postgres conversion that's not getting done over the on the other screen.

  18. As an undergrad in the 70s, I was used to using PDP 11/45s and terminals to code for BASIC and Fortran classes. But my COBOL (on Burroughs hardware) instructor was a stickler for punched cards and insisted we submit decks for each assignment. There was only a couple punch card machines available to undergrads - and they were almost always down when I tried to use them. Soooo... I'd code the COBOL source on the PDP via terminal and then (via some mild "hack" & some social engineering) submit the source to the Bourroughs operator pool with the proper coded internal JCL that resulted in an Operator creating a deck from my source and placing it in an evening professor's output box for pickup. I'd time the pickup for when the Ops folks were on their AM coffee & smokes break. ;^) Fun times.

  19. We used punch cards at Michigan Tech (1979) for my first programming class (Fortran) and that was it. We moved on to terminals afterwards. The programs we submitted were fairly small, so any of the typical problems dealing with them were minor. I didn't know any better anyway, this was my first experience with computers, I had nothing to compare against.

  20. Read on if you are interested in hearing a path other than punch cards ...

    I took my first computer course in high school, learning BASIC on a timesharing system, our I/O device was a teletypewriter and we stored our programs on paper tape. In 1977 I accepted admission at La Salle College (now University) in Philadelphia in Computer Science, one of the primary attractions was they had already migrated away from punch cards (unlike Temple University whose program I also considered). Glad I never had to learn about punch cards or deal with the long turnaround, learning DEC-20 assembly (octal), Fortran, COBOL, and linear math, was challenging enough! I got hooked on microcomputers in digital electronics course building 1 from scratch on punch boards. I continued working at the bleeding edge of technology :) in my first job in 1981 for a startup developing accounting software for Commodore desktop computers (CBM 8032, 6502 processor, CP/M operating system). Although the first IBM PC appeared in 1981 (I remember walking to the IBM store in center city Philadelphia to look it over), CP/M continued to dominate the desktop through the mid-to-late 1980s. Unlike the majority (almost 100%) of my programming peers, I never wrote code for anything larger than a desktop, although by around 1984 I was developing networked, multi-user applications serving up to a dozen users. All in BASIC and 6502 assembly, on a multi-user O/S called TurboDOS. Soon after I began to transition to C on IBM PCs and Novell Netware. Fond memories!

  21. memories - USAF tech school learning to program on Honeywell (JCL that started with $, think the h/w was from GE) in 1975 at Keesler AFB. Discovered why our instructors told us to use sequence numbers in our punch card decks after the (also in training) operators "drop sorted" my Fortran deck...

  22. We sequenced our card decks with a diagonal stripe across the whole top of the entire deck with a "magic" marker. The sequence numbers in the original deck were inadequate after a few additions/dletions.updates.

  23. Monash Uni, Melbourne, 1980. We were taught numerical programming on their bespoke computer system called MONECS. Instead of punch cards, it used mark-sense cards. You filled in the character box with a pencil, like lotto forms. So you had a code-compile-debug cycle like punch cards. Results came out on fan-fold 66/132 sprocket printer paper. After a few runs trying to debug the program, new errors started to appear as the pencil marks wore thin.