Is there any way I can try to program with punch cards?
May 15, 2012 5:05 AM   Subscribe

I'd like to try programming with punch cards once in my life. How can I do this?

I'm in my 30s, and grew up entirely in the PC era, programming on computers with screens and keyboards. I want to experience the way my grandfather used to work. I imagine the hardware (and probably the cards themselves) are no longer manufactured. Are there any universities or museums with functioning punch card readers anymore?
posted by Plutor to Sports, Hobbies, & Recreation (26 answers total) 17 users marked this as a favorite
 
I doubt you'd find a functioning card punch anywhere outside of a museum.

War story, (I am old enough to have used hand punches, yes manually depress one or more buttons to perforate the cards). Anyway: I once worked at a University Computer Centre, all the student jobs were submitted as decks of punch cards and fed through very high speed card readers, capable of reading hundreds maybe thousands per minute. Their cards and printer output were then put in pigeonholes for collection.

If the cards were illegal in anyway, bent, mispunched so as to cause an error ... the card reader would stop and wait for operator action, the operators would rip the card in half take out the offending job and return it for correction. Sometimes (there is always someone ...) the student would repair the card with sticky tape (they were a pain to punch) and resubmit, when this card entered the card reader at high speed there would be an almighty bang, and an operator would approach the card reader swearing profusely to effect a repair. The student job would be returned to them with a very stern warning not to do it again. Their name was noted, if they did it again, their job was returned with every card cut in 3 lengthways.

Believe me, you do not want to try punch cards.
posted by epo at 5:47 AM on May 15, 2012 [6 favorites]


Try programming with redstone in minecraft. It's basically programming with the bare metal.

Here's a bunch of CPUs

If you want to load programs into them, you're basically using buttons and levers changing one bit at a time, and you can walk around inside the computers and watch them work.
posted by empath at 5:53 AM on May 15, 2012 [1 favorite]


You're not in the UK, but for starters you can follow Bletchely Park's projects pages, I think some of those are punch-card machines. You might use the contact form to see if they know any small museums closer to you that need volunteers?

For virtual practice oooold skool, The Babbage Pages has an Analytical Engine emulator.
posted by Erasmouse at 5:53 AM on May 15, 2012 [1 favorite]


I'm actually a little surprised that someone, somewhere hasn't done a full emulator, but this guy's page shows how he went about getting pretty close.
posted by jquinby at 6:09 AM on May 15, 2012


I'm sure you can find the cards themselves around, when I was in school (1990s sometime), they were using their overstock of punchcards as notecards and bookmarks.

A end-run around having the actual equipment might be to get an emulator of a simple CPU, and program up an interface to an optical scanner that "OCR"s punch cards or a facsimile thereof into the machine code. Once you got it working, the workflow would basically be the same.

Another analogue would be to write a program of some kind that you put onto a floppy and boot a machine with. That's basically the nuts and bolts of it- programming on the bare metal, without an OS. You are writing the code that loads the code into memory that then executes and pulls in raw data from some input device (no filesystem either!), processes it and then outputs it.
posted by gjc at 6:25 AM on May 15, 2012


I would check with the Retro-computing Society of Rhode Island, who pride themselves on keeping their big iron in running condition; they list an ASR-33 and Univac punch in their collections. You've just missed this year's Vintage Computer Festival, but they have a wonderful collection of resources that are well worth exploring.

(If you just want to punch some cards, memail me -- I've got a Port-A-Punch and a stack of 5081 cards on my desk)
posted by nonane at 6:26 AM on May 15, 2012 [3 favorites]


The thing is, the experience of programming with punch cards is more than simply punching the cards. If anything, that was the simplest bit of the process. The whole experience consisted of:
a) design the program on paper
b) write out the program on paper. It helped to get the special ruled paper that let you space out the letters correctly (in some programming languages column location was important. A symbol had different meaning if it was in column 1 than column 2, for example).
c) sit down at the keypunch machine, copy the program EXACTLY from the paper to the cards, line by line.
d) check to make sure you got your first card correct. This was basically an instruction card that told the computer how to treat the rest of the cards. Frequently people used a different color card for this.
e) turn in your stack.
f) wait, drink another cup of nasty coffee.
g) go back to the printout area, get the printout for your job number.
h) @#$# you mistyped something
i) repeat c through g until you've got a clean run
j) OK, it's now reading into the reader correctly, but you've got a compiler error. Think about how to fix that, go back to b. repeat through i until no more compiler errors.
k) whoohoo, it compiles! Uh-oh, there's a logic error. Go back to b, repeat to j until the program actually does what you want it to do. Hope to all that is holy that you haven't done something stupid like write a program that doesn't end. Hope that if you have that you put in that time-limit on the control card so you're not sitting there for half an hour, bugging the printout operator with "hey, is job # XXX-YYY-12857 done yet?"

Take the resulting stack of cards, and treat it like a holy object. Rubber-band the stack if it's small, box it if large. Even though it's now 4am and your brain has the consistency of oatmeal but you're wired like a puppy on crack from all the coffee, DO NOT PUT THE BOX ON THE ROOF OF THE CAR AND DRIVE OFF! Because that would be bad, and people don't know how to deal with a grown person sobbing in the parking lot surrounded by colored bits of paper.

So seriously, unless you can recreate the whole environment with the surly keypunch operator who's seen at least three idiots already tonight with taped-together cards and who would just like you to FUCK THE HELL OUT OF HIS EXALTED COMPUTER ROOM, with the coffeemaker that hasn't had the crud cleaned out of it in 10 years, with at least one keypunch machine that has a key that just suddenly starts to reeeeeeeeeeeeeeeeeeeeepeat a keystroke, with at least 10 other hopped-out-of-their-skull programmers all who want to just get GODDAMN DONE AND HOME, with the other brother Daryl who keeps coming up to you to ask why his program keeps getting rejected because he's too dumb to close the freaking do-loop, you just won't get the point.
posted by Runes at 6:30 AM on May 15, 2012 [35 favorites]


I started with computers before going to college. When I attended college to get a degree in computer programming, the system they had was an IBM360/370 with punch card readers, page printers, etc.

To misquote a phrase, one does not merely program with punch cards.

That type of programming means that you hand write all your COBOL or FORTRAN statements on forms that are handed to a keypunch operator who can type much faster than you can. The keypunch operator types in you source code and returns a deck of cards to you. You then hand the cards to the computer operator who puts them in the reader to be fed into the computer. The job is run and the deck and a listing of the results is returned. It is all very uneventful.
posted by Drasher at 6:32 AM on May 15, 2012


Response by poster: Runes: "The thing is, the experience of programming with punch cards is more than simply punching the cards. If anything, that was the simplest bit of the process."

Yes, this is exactly why I want to experience the real thing in a way that emulators and Minecraft redstone can't really provide. I mean, I could do without the BOFH, but the rest of the experience is appealing in a "I really want to do that once" sense.
posted by Plutor at 6:45 AM on May 15, 2012 [1 favorite]


From 2003, the vintage computer festival explains how they tied a surplus card reader to an apple IIe. EBay seems to have various card formats available for auction.

FWIW, our high school computer actually read marked up cards- boxes scribbled in with a #2 pencil, a la the SAT- so we didn't need the keypunch machine. That might be easier to arrange, as you can avoid that extra machine and still get the gestalt experience.
posted by jenkinsEar at 6:59 AM on May 15, 2012


Paging user MtDewd; he's in VT and has card knowledge. You may have difficulty getting cards now that Cardamation has shut down, though.
posted by scruss at 7:30 AM on May 15, 2012


You may have to devise some sort of punch-card simulator. I suggest following Runes's first few steps, then:

c) Type your program out on legal paper in a manual typewriter. No backspaces allowed; any typos = yank out sheet and try again
d) Mail the sheets to a friend, preferably in Cambodia
e) Friend attempts to enter program into compiler of their choice
f) If there are any errors (this includes errors your friend could correct, such as pages being out of order or upside down), friend mails you a postcard with the line number of the error, with original pages under separate cover via Bulk Frieight
g) Continue as per Runes above
posted by range at 7:34 AM on May 15, 2012 [3 favorites]


this is exactly why I want to experience the real thing

You're not grokking what "the real thing" means. It means spending hours typing very repetitive strings on a kind of very loud electric typewriter. It means handing decks of cards to a bored operator, and then waiting. For hours. Periodic checks of the dispatch area, FINALLY finding your job in your box. Unwrapping and then unfolding the printout, which should have been a lot thicker (or maybe not near so big) to discover you made a one-character mistake on one card, and have to resubmit and wait again.

I would hope there's computer history museums somewhere that let visitors punch out a few cards on an operational IBM129 keypunch machine, that would be cool... and do they still teach assembly language, in school? Composing something in assembly would be a good experience for the OP.
posted by Rash at 8:12 AM on May 15, 2012 [1 favorite]


Response by poster: Rash: "do they still teach assembly language, in school? "

As an undergrad, I took a required class that covered all kinds of lower-level stuff, starting with memory design and microcode and involved some RISC (MIPS) assembly and then went on to caching and paging and all that stuff modern high-level programmers don't frequently have to deal with. But that was ten years ago now and I got the impression the school wanted to deprecate all of it. I think they moved from C++ to Java as the undergraduate CompSci language-of-choice not long after I left (which seemed strange considering Stroustrup was on the faculty at the time).

Runes: "Dude, it's not cool to ask the survivors to recreate the torture chamber just so you can say "I did that once"."

I don't think I can fairly appreciate debuggers and profilers and meta-languages and all of the other things that modern programmers take for granted without seeing what it was like in the Dark Ages. I understand that process from a theoretical standpoint, but it's not the same.

I've sent an email to RCSRI, as nonane recommended. We'll see if that pans out. The Vintage Computer Festival he mentioned sounds excellent, too.
posted by Plutor at 8:37 AM on May 15, 2012


I think it will be difficult to find a place to do it today. Outside of a museum, there might be a university that still has a set-up, but I wouldn't know where to start. Maybe alt.sys.pdp11 ?

I programmed Fortran this way in high school and it was no fun. Runes write-up is good, but I had it a tad bit worse. The mainframe was not at my school, it was at the downtown mainframe. So I would have to punch my cards, wrap them with a rubber band, and then place them in the bag that was sent downtown. If I was lucky, they would run the job the next day, and I would get my cards and output on the second day.

Any mistake added 2+ days to my work, as I would have to resubmit.

Also, there is no coffee in high school.

The experience of programming Fortran via punchcard or on a terminal was roughly the same. Sitting at the keypunch was fun for the first 5 minutes, but then became a chore.

Maybe a location with a working punchcard system would let you send in the cards via the mail so you wouldn't have to travel there.

I did *love* working at the teletype connected to the same mainframe though. To those without the benefit of teletype experience, it was basically a typewriter hooked up via an acoustically coupled 110 baud modem to a PDP-11. Every interaction was typed on and read on paper. I played endless amounts of Adventure and other text based games. I think I also did BASIC programming via this. Editing was no fun.

Maybe working on a teletype would be something easier to find operational and more akin to what it was like working at a slower pace in the world before copy & paste.
posted by Argyle at 8:54 AM on May 15, 2012 [1 favorite]


"what it was like in the Dark Ages"

Just a note on this, it wasn't the dark ages, or at least it didn't feel like it. It actually was awesome and we felt like gods being able to harness computing power. The first time I got back the results my prime finding program and saw that it had found the first 100 primes in seconds I felt elation that such things were possible.

Each new step forward was great and exciting. Getting a Atari to use _at home_ was amazing. Getting a 5 1/4 floppy drive to replace the cassette drive, was joyous. Getting a 32kB memory extension board was fist pumpingly great.

I find today that people take the pace of innovation and progress for granted. If anything, these are the dark ages, where technology is taken for granted and those that innovate are tarred and feather by the masses on websites focused on picking their work apart. "My iPhone doesn't have _____! My broadband download speeds are only ____! The video didn't have surround sound and was only 720p! The website I use for free doesn't meet each of my specific criteria! The service was down for a half-hour when something broke, haven't hey heard of redundancy?"
posted by Argyle at 9:04 AM on May 15, 2012 [8 favorites]


"Just a note on this, it wasn't the dark ages"

This. The term "Dark Ages" implies that there was a period of light before and after (in historical sense the term most commonly refers to the period after the fall of the Rome to the Enlightenment). What we're talking about here wasn't even truly the early years, as things were being figured out and developed. Card computing absolutely had it's place in computing, and for some applications was indeed the best solution to the problem at the time.

these are the dark ages

A lot of us Old Farts tend to agree with this sentiment, primarily because we see so much slop. When your computer had less than a meg of memory and your storage was on 512k floppies it forced a certain rigor on your thinking. Now my phone has more memory and storage than my first computer and a simple note-taking app requires 16 Mb of running memory and 400Mb of disk space and I just want to cry... Every programmer should be made to read and understand the Story of Mel.
posted by Runes at 9:49 AM on May 15, 2012 [2 favorites]


Also agree, these are the Dark Ages. Because turnaround time was so long, schedules were relaxed and the stress level working in IT was orders of magnitude lower than it is now.
posted by Rash at 10:09 AM on May 15, 2012


Response by poster: (My "Dark Ages" comment was intended to be taken tongue-in-cheek. No harm meant, everyone. I yearn for a time when you could be confident anyone who was programming a computer knew what they were doing.)
posted by Plutor at 10:51 AM on May 15, 2012


If it turns out to be too hard to find a 20th century machine to play with, a fun project might be to concoct an Arduino punchcard reader.. I couldn't find any kits on a cursory search but here's a coupe of examples- Arduino punchcard reader. .. and another one. Even more hands-on!
posted by Erasmouse at 11:55 AM on May 15, 2012


Consider designing and building your own punch-card reader for programming the micro-processor of an arduino.
You don't need mechanical pins - I've seen DIY projects online that uses a few LEDs and photodiodes to make a custom punch-card reader. It's not difficult technology.

Bonus - if you could make it into a kit, there would probably be a small market for it, for you purpose, as well as less programmatic function things like novelty home security cards, private-library cards etc.
posted by -harlequin- at 12:17 PM on May 15, 2012


you might also consider reading this (which i personally think is an excellent) novel in which the entire punch-card-data-center experience plays a prominent role: the goldbug variations by r. powers.
posted by garfy3 at 1:56 PM on May 15, 2012


Honestly Plutor,

That
Way
Lies
Madness

When I was being inducted into one computer job they had a nurse, who told me computing was unsuitable for anyone with any kind of 'personality flaw'. It may not be true with today's kit but I sure know what she meant, though for me the damage had already been done, and largely by cards.

It was a Greek torture. I know you just want to be advised how to do it, but just imagine normal programming but taking 100 times as long and hitting your head against the wall every five minutes.

But if you do manage to get the kit working, remember, the computer will want to be told exactly where on the disk to put the file... and every other daft thing it's supposed to be doing for itself. The true full experience needs an old style computer too, and for perfection, try having to put the chads back into the holes for small edits, instead of running the cards through a partial duplicator, like I had to. At least they don't fall out, even on multiple resubmissions. But your brains will.
posted by Razorinthewind at 5:41 PM on May 15, 2012 [1 favorite]


So, trolling the wikipedia pages on punched cards comes up with link to a company Cardamation, who sells and rents equipment, last checked in 2011. The page doesn't load, but archive.org does.

So maybe try calling Tel. 610-935-9700 or mailing info@cardamation.com to get the full miserable experience.
posted by pwnguin at 5:28 PM on May 16, 2012


Can you get down to Conroe, Texas? These folks might let you use their system; http://www.macworld.com.au/print/45073 Check that 3rd picture, where they keep their programs on a shelf!

You might check with these folks: http://www.vintagetech.com/ If they can't help, they might know someone.
posted by at at 9:41 AM on May 17, 2012


Paging user MtDewd;
My pager finally went off!
Yeah, I've got a couple of dozen boxes of cards if you want some, but I don't have a punch.
(I do have a card gauge, though.)

But if you got the cards punched, how would you read them?
The last known 1401 in New England left in 2008.
If you find a machine, I'll come down and help you get it running.

But yeah, that way lies madness
posted by MtDewd at 7:39 AM on September 18, 2012


« Older Cheap but bombproof II   |   Better than a red phone box cookie tin Newer »
This thread is closed to new comments.