12

I am doing a research essay on the history of programming languages, and I was wondering, why did programmers ever write their programs on punch cards? Didn't computer screens and keyboards already exist by the time programmers used them?

I know they were first invented for the use of the Jacquard loom and to control the desired design, but when people programmed, why did they decide to write their programs on a card oppose to writing it on a terminal?

Was it because since computers were very expensive, not many people had access to them, resulting in people writing programs on punched cards, submitting it to a company or someone or some organization that had one to run them and tell them the result?

1
  • more reliable than any scanner could ever be. Commented Nov 13, 2014 at 21:59

10 Answers 10

29

Time-sharing, multi-user, systems were invented in the late fifties, but they were comparatively rare through all through the 60s. Most computers ran in batch mode, running a single program at a time, with no facilities for interacting with users other than the card reader, the line printer, and maybe a separate teletype for the console operator. Terminals you say? Up until the late 60s, electronic terminals with video displays were exotic, fabulously expensive gadgets limited to research facilities and specialized jobs like air traffic control, and national defense. Those computers that did support interactive sessions generally used teletypes. Entering a program on a teletype was just as unpleasant as punching it onto cards.

Let me expand a little bit on the problem of batch processing since it is so foreign to the way most people use computers now. It would certainly have been possible even in the 50's to write an interactive editing program that would have worked with a teletype. However, because of batch processing, the editing program would have completely monopolized the computer the entire time you were sitting at the teletype editing your program. Since several hundred to several thousand other people would have been waiting their turn to run their programs, you would have been a very unpopular person. You would also have been charged several dollars a minutes while your editor was running. It was much more cost-effective to write your program out in long hand, hand the final draft to a key punch operator, and let them transcribe your program onto punch cards or paper tape. That avoided wasting the CPU's precious milliseconds waiting for you to type 'GOSUB'.

Hard disk drives were also invented in the late fifties, but they were small (around 1mb), rare and expensive, not something you gave users casual access to. Obviously users did need some sort of long term storage. The choices were paper tape, punch cards and magnetic tape. Magnetic tape was new and expensive. Paper tape was used by some systems, but punch cards were an established technology used in non-computer business machines like tabulators and sorters since 1928, so a lot of businesses already had a major investment in punch card machinery and storage.

2
  • 6
    even in the 1990s I was given 5 minutes of computer time for an entire semester at university for my programming assignment. Luckily the screen editor used next to no CPU time when typing in the Pascal code, or it wouldn't have been enough to last those months. Everyone wrote their programs on paper, cross checked and corrected themselves and others using paper programming manuals, then had the program ok'd for entry by the teaching assistant, and only then was it painstakingly typed in, every character double checked with the paper original to ensure there were no typos to fool the compiler.
    – jwenting
    Commented Nov 14, 2014 at 7:05
  • 3
    I remember an Ada assignment in the late 1980s: at the end of every session, the CPU time that I had used was expressed in $.
    – mouviciel
    Commented Nov 14, 2014 at 8:24
18

[W]hy did programmers ever write their programs on punch cards? Didn't computer screens and keyboards already exist by the time programmers used them?

We use whatever i/o mechanism our computers have. In the 1960s, paper tape was common. In the 1970s (when I started programming), paper tape was being replaced by punched cards.

Yes, there were machines with teletypes, and also astonishing things called VDUs. But they were not in the mainstream yet. Both of these technologies were more commonly used by the (mainframe) computer operators; rarely for us.

At the peak of the punch-card era, the most common machine was the IBM029

See cs.uwaterloo.ca/40th/Chronology/1967.shtml

In that image, students are punching in their own code. Professional programmers more commonly wrote their code by hand on coding sheets, formatted according to the language you were coding in.

See en.wikipedia.org/wiki/Fortran

We would send our coding sheets off to the data center, where operators would punch them in (at blinding speeds), and then pass the cards to the verify operator. She (90% of data center staff were women; only their managers were male) would type your code again, with the punch machine set to verify mode. The machine would ding if what she was typing was different from what was on the card already. By doing it twice, they achieved speed and accuracy.

When you got your cards back, the first thing you would do was draw a diagonal line across the top of the entire deck. Woe betides if you dropped your cards before doing that! With the line drawn you had a fighting chance of getting your cards back in order after dropping them.

A lot of program editing consisted of inserting new cards, which we would usually punch ourselves, and moving existing cards to another place in the deck. Obviously, the diagonal line you draw originally would now be less useful, so after a few edits, you would draw another line. When the cards were getting too many lines or were starting to produce read errors on the card reader (the fastest readers worked at 1200 cards per minute and higher, so cards took a pounding each time they were read), you would send your deck back to the data center to be duplicated.

Small edits could be performed using a hand punch.

enter image description here

With experience, you would learn the Hollerith code for each character and could punch as fast as using a keyboard.

If no one senior was watching when you made an error, you could fill the wrong hole with a "chad" that had been punched out of the card, rubbing it with your thumbnail so that its edges meshed with the rest of the card. Such patches often came loose during the read process, but they often worked at least once. If the chad came out during the read process it would cause a "crash", and the following card(s) would be crushed and crumpled beyond recognition. The card reader would be jolted out of alignment, requiring a Computer Engineer to come and fix it.

In the late 1970's it become more common to load your program to magnetic tape. The tape held your code in fixed-length 80 character records, and we had "librarian" programs to do the editing. As I recall one was actually called Librarian. You would code another card deck to do the editing, or as was becoming more common, use a teletype or VDU to do your editing online. Wow!

The syntax used to drive those librarian editors was very much like the IBM-PC Edlin syntax.

In summary, we use what tools we have available. The newest technology is always the most expensive, and it can take a while before everyone has access to it. It's also a matter of convenience and skills. I am typing this on my laptop, but when writing an email on my smartphone, I use "Swype" input, where my finger makes a weird zigzag pattern over a keyboard image and the software works out what word I intend.

Good luck with your essay.

15

Punched cards served not only as an input/output medium, but also as a long-term storage device. You could run a program more than once by reloading the card deck for that program. There were no hard drives, no floppy drives, no magnetic tapes.

12

The weight of history...

Lets go back to the Jacquard loom, a mechanical loom invented over 200 years ago.

The loom was controlled by a "chain of cards", a number of punched cards, laced together into a continuous sequence.

Jacquard loom cards

This was a known technology and later on the US Census Bureau used a tally machine - the Hollerith machine to tally census data. Which was collected using punch cards.

Herman Hollerith's tabulator consisted of electrically-operated components that captured and processed census data by "reading" holes on paper punch cards

Hollerith card reader machine

These early tally machines later evolved into computers - but the input method remained the same.

Screens existed, keyboards exists (typewriters), but the idea of hooking those up to a computer? That took some time.

Additionally, punch cards were not just the running program - they were the actual data as well - the storage medium. There were no hard drives, no magnetic tape.

5

I am so old I have used punched cards (and "editable" mark sense cards - pencil to mark + eraser to edit!) at Uni, and we submitted the deck of cards as our assignment. There was not a keyboard or terminal in sight. And it wasn't that long ago: the 80's.

Where do you think the usage of the term "to punch in data" came from (although, see below)? There was a job title "key punch operator" - essentially a typist that sat at a card punching machine and "punched" in code/data.

IBM still refers to a JCL program as a "deck", and each line has a maximum of 80 characters - why? Because a standard punch card had 80 columns, and on their original computers, the operator would put a deck of cards (a program) in the input hopper to run it. The OS (MVS) was locked (due to IBM's promise of backward compatibility) to an ancient hardware limitation.


Q: What's the difference between a drummer and a drum machine?

A: With a drum machine, you only have the punch the information in once.

1
  • 1
    +1 for knowing what you're talking about. If I could've given you another +1 for the joke, I would've! Commented Nov 13, 2014 at 23:31
4

Computer time was extremely expensive back then, so anything that could be offloaded typically was.

6
  • Okay, this makes sense.
    – Jwags
    Commented Nov 11, 2014 at 23:44
  • this doesn't seem to offer anything substantial over points made and explained in other 7 answers
    – gnat
    Commented Nov 14, 2014 at 6:50
  • @gnat notice this answer existed before the other ones.
    – dave
    Commented Nov 14, 2014 at 6:53
  • I noticed that before commenting (checked this with sorting answers by oldest). I also noticed that it reads more like a comment (see How to Answer)... and that it goes against the notice shown at the top: "We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed."
    – gnat
    Commented Nov 14, 2014 at 6:57
  • @gnat this question was originally asked on stackoverflow and it (along with my answer) got moved here, so forgive my ignorance of the rules on the site I didn't post on
    – dave
    Commented Nov 14, 2014 at 7:01
3

Computers did not start off as you see them today, obviously. They were more mechanical. A punch card is used to mechanically represent binary numbers. A mechanical reading head which moves over the punch card reads a "hole" or a "no hole". These combinations of holes and no holes can be used to control the behavior of a mechanical device. There by, we have a program to control something!

1
  • but why were languages like FORTRAN used on punch cards? I'm guessing just because getting time to use a computer was probably expensive and this would reduce the cost?
    – Jwags
    Commented Nov 11, 2014 at 23:44
1

Magnetic tape was first used for data storage in 1951. Hard drives were introduced in 1956. Floppy drives were introduced in 1971. The punched card had a significant head start on all of these storage mediums.

By the 1970s, IT organizations were at least investigating a move away from punched cards. By the late 1980s or early 1990s, the transition was all but complete.

Punched cards held on for as long as they did, when there were other more efficient storage mediums available, for at least a couple of reasons.

1) They were in use, and inertia is a tough thing to overcome. In other words, "We'd always done it this way."

2) Cost. A 1 TB SATA drive can be had for a little over $50 today, but a variation on Moore's Law has been driving down costs over time. For comparison, a Seagate ST-506 5 MB drive in 1980 cost $1,500 (about $4,300 today).

1

In the early days the computer system was in a room that was not accessible to programmers and most systems could only execute one program at a time (batch processing). To have your program executed you submitted it via punched cards or paper tape and came back later to get your results which was normally a print out. Programmers were rarely allowed direct access to the 'console', and if they were it was to debug a program, not to write it.

With the advent of preemptive multitasking circa 1965 (see Multics), many users could be supported at once via 'terminals'. In the beginning these terminals were teletype like machines and then later CRT screens with keyboards. These systems were not widely available until the early 1970's.

My first computer did not have a hard disk. To compile a program the compiler was read into memory from punched cards and executed. It read your source code from punched cards and punched the compiled version. That version was put behind a loader program and read in. It was only then that your program was executing. Oh the good ol' days ;)

0

In order to appreciate the evolution of this technology, "you really had to be there." 🤠 And, I count myself very lucky that I was.

Computers were extremely small and limited, and they had only-recently supplanted data processing techniques that were entirely based on electromechanical tabulators. Video technology was also in its infancy, and computers were not yet powerful enough to support "time sharing." (Not even close ...)

If you were there in the early (4/8/16-bit ...) days of microcomputers, you also remember when "1 megabyte" was "a lot." Or maybe even "64K." Well, the capacity limits of early hardware were also "oppressively small." (I very briefly worked with a computer that actually still had magnetic core memory.)

I still have a "card saw," and I am a proud member of the club that once dropped an entire drawer-ful of punched cards onto the floor ... fortunately all with sequence numbers ... and had to spend the next several laborious hours putting them back in sequence using entirely-mechanical collating equipment. ("No. Absolutely never again.")

But – they were the best thing that we had at the time, so we made the most of it. And, if I may say, we did amazing things with it, especially given what we had to work with. It was a set of challenges that (yay!!) we don't see too much today. ("No nostalgia here ...")

I'd be just as quick now to add that "we've never stopped." Even though today's computers and peripherals are of course vastly more powerful, we're still encountering their limits and trying to find creative ways to exceed them. We're still trying to invent ways to do things that can't be done. That's part of the fun of it. That's why I still enjoy this hobby that became my livelihood: I still enjoy making an un-thinking(?) electronic circuit do useful things for actual people.

P.S.: "Be prepared!" Fifty years from now, your grand-kids will be sitting on the backyard holodeck, sharing a digital drink with their computers and talking with those computers about "the old days." And you'll be thinking to yourself: "I helped put them there." Is that cool, or what?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.