Live data from Hacker News

The tyranny of the Hollerith punched card

pub.gajendra.net

111–120 of 148 posts

Re: The tyranny of the Hollerith punched card

#111
post #75
post #14

The article has the causality backwards. We don't use 80 characters because that's what the Hollerith card used, the Hollerith card used 80 characters because that's a good ergonomic width. (Or, if you prefer, the Hollerith card succeeded because it was a good ergonomic width.) Coincidentally (or perhaps ironically) the article itself is formatted for ~80 characters per line, not because it's bound by the Hollerith c…

I researched Hollerith cards and 80-character lines in excessive detail while studying card sorters [1]. The Hollerith card is the root cause of 80-character lines, of course. Prior to 1928, Hollerith cards used round holes and 45 characters per card. IBM wanted to fit more data on a card and investigated two alternatives: binary coding so 90 characters could fit into 45 columns of holes, or rectangular holes which a…

Your article is fantastic. I had no idea that:

> When the Type 80 sorter was introduced, standard AC power hadn't fully taken over and parts of the United States used DC or 25 Hertz AC.[9] Thus, the sorter needed to handle fifteen different line inputs including unusual ones such as 115V DC or 230V 25 Hertz AC.

Re: The tyranny of the Hollerith punched card

#112

Earlier quoted context omitted.

I don't actually know of any project which uses 6 or 8 characters per indentation level.

8 chars is default tab size. So e.g. "git diff" shows you 8-position tabs. Github (and Bitbucket, etc.) diff visualizer also shows it as 8 positions. Any editor should use 8 by default, too. And, believe me or not my space-loving friends, tab-indented codebases still exist.

My first change to any editor is to set tabstops at 4 characters. That's the standard policy at my employer, and I like it for my own projects, as well.

Re: The tyranny of the Hollerith punched card

#113
post #83
post #62

Earlier quoted context omitted.

Has anyone tried enforcing a variable-reference-per-line limit? Eg. if the limit is 4, then these two lines equally hit the limit: foo = bar(baz, qux) myClassInstance.someWritableVar = lib.someFunction(param1, MyOtherClass.constants.FOO) The second line is well over 80 chars, but may be as understandable as the first.

It effectively limits all functions that return a value to 2 parameters. I rarely go over that, but it would seem a bit arbitrary to bump into.

You can press the Return key? :)

    const uint64_t *p=bsearch(&ref->u,
                              df->file_offsets,
                              df->num_file_offsets,
                              sizeof df->file_offsets[0],
                              &CompareU64s);
That's from emacs. It's a bit hit or miss whether editors do something nice like the above, or just indent the arguments by one stop, but other options seem to be fairly rare.

I generally have one function call per line for ease of debugging. Nothing worse than having to do a fiddly step in/step out dance when you're trying to think about what's going on. But it's also good for keeping on top of line lengths too.

Re: The tyranny of the Hollerith punched card

#114
Actually, if you subtract the columns used for sequence numbers and statement labels, in FORTRAN and COBOL you only had about 65 to 68 columns of code.

In one of my early jobs, we used binary format to store data in Hollerith cards. Twelve rows were divided into three groups of four bits, giving us three digits per column, or 240 digits per 80-column card.

The cards looked like lace doilies.

Re: The tyranny of the Hollerith punched card

#115
post #107

Apologies for being somewhat off topic, but does anyone know where I can go these days to get some cards punched (for a small museum display)? Given how common punchcards were, it has been difficult to find someone. Anyone out there have access to an old IBM 026, 029, 129?

The Computer History Museum in Mountain View has 026 and 029 keypunches. Go to the 1401 demo and they'll probably let you punch a card. Or let me know what you need punched and I'll see what I can do. What museum are you getting this for? If you're in the bay area, you should go see the IBM 1401 demo; it's cool to see a punched card computer in operation. Demos are Wednesdays and Saturdays; schedule is http://www.com…

Ha, I had the same thought, but only saw your comment when I refreshed the thread.

Re: The tyranny of the Hollerith punched card

#116
Punched cards were a pain to work with. We used to have a 40,000-card master file that we had to run through twice a day on a Univac 1001, at 1,000 cards/min. per feed, plus jams. The racket was deafening.

When the card reader jammed, it destroyed the card. We had to retrieve the bits of card, and tediously re-create the card on an IBM 026 keypunch, one column at a time.

One time a card got caught between two pinch rollers, and smoke started billowing from the machine.

IBM sold the "Multi-function Card Machine", or "MFCM". Customers called it the "Mother Fletcher Card Masher", except they had another word for the "F".

The computer's card punch could only do 200 cards/min.

In humid weather, cards would swell and jam the reader's picker knife.

I was so glad when we switched to mag. tape.

Re: The tyranny of the Hollerith punched card

#117
post #85
post #65

Earlier quoted context omitted.

> 80 is an _awful_ width for code in a programming paradigm encouraging long variable names Which is exactly why all such paradigms are _awful_.

All hail strpbrk()! Do you have any defense of that? I'd be interested to read it. I think every article on coding advice I've read for the last decade favors long and descriptive function/variable names.

strpbrk() is a bit too short for my taste, but I'll choose that over FindFirstOccurrenceOfAnyCharIn(). There's "long and descriptive", and there's "too long".

Think about it: there's a reason why human languages are filled with pronouns, because if you use the full name for everything, communication will soon become tedious and it will become actually harder to understand.

Any desire for a long and descriptive name should be tempered with a matching desire for conciseness. Otherwise you end up with names like MaybeUpdateDisplayParameterListForValidation. Throw twenty of these names onto a screen, and I have no idea what the hell is going on: I can't even figure out which names are the same at a glance.

Re: The tyranny of the Hollerith punched card

#118
post #85
post #65

Earlier quoted context omitted.

> 80 is an _awful_ width for code in a programming paradigm encouraging long variable names Which is exactly why all such paradigms are _awful_.

All hail strpbrk()! Do you have any defense of that? I'd be interested to read it. I think every article on coding advice I've read for the last decade favors long and descriptive function/variable names.

Defense of strpbrk and strspn:

The "break" and "span" terms were familiar from a time when more people knew the Snobol language, which has two frequently useful pattern matching operators: BREAK and SPAN. Snobol's BREAK(S) pattern matching operator matches the input up to but not including the single-character match for any of the characters in set S. The set S delimits or "breaks" the sequence. SPAN(S) matches a sequence of one or more characters from the set S.

strpbrk tries to fit "string" "pointer" and "break" into a symbol that is different in the first six characters. It was once a common linker limitation that only the first six characters of external symbols were stored.

Actually the C function which corresponds to the concept of BREAK is strcspn (complemented span), because this gives the (length of) the range characters up to the first match in the set. That is to say, strcspn could have been called strbrk! Then we would have had strspn and strbrk as a complementing pair. In any case, the strpbrk function points one character past the substring indicated by this function; giving a pointer to the breaking character. I think, the following equivalences hold:

   strcspn(str, set)          strpbrk(str, set) - str;
   str + strcspn(str, set)    strpbrk(str, set);
which further supports strbrk as a good name for strcspn.

Trivia: break and span appear as functions in the Scheme SRFI 1, by Olin Shrivers [1998]. I think these correspond to the take-while and drop-while in Clojure and imitations thereof like the Emacs Lisp dash library.

http://srfi.schemers.org/srfi-1/srfi-1.html#span

Re: The tyranny of the Hollerith punched card

#119
post #75
post #14

The article has the causality backwards. We don't use 80 characters because that's what the Hollerith card used, the Hollerith card used 80 characters because that's a good ergonomic width. (Or, if you prefer, the Hollerith card succeeded because it was a good ergonomic width.) Coincidentally (or perhaps ironically) the article itself is formatted for ~80 characters per line, not because it's bound by the Hollerith c…

I researched Hollerith cards and 80-character lines in excessive detail while studying card sorters [1]. The Hollerith card is the root cause of 80-character lines, of course. Prior to 1928, Hollerith cards used round holes and 45 characters per card. IBM wanted to fit more data on a card and investigated two alternatives: binary coding so 90 characters could fit into 45 columns of holes, or rectangular holes which a…

Really enjoyable article, thank you -although, could I possible talk you into an honourable mention of the 1801 Jacqard Loom which used punch cards to store patterns? :)

[1] https://en.wikipedia.org/wiki/Jacquard_loom

Re: The tyranny of the Hollerith punched card

#120
I'm a programmer, but I don't have any sort of CS degree. Is the 80 character line limit something that is typically taught to CS students? I had been programming for 15+ years before I ran into references to this limit. I'm still not really sure what it means. Do most developers set up their IDEs to let them know when they have gone over the limit?
Post reply on HN