Thursday, February 1, 2024

Programming in the 19th century

Music Box Coding

COMMENT: Dear Marty,
your blog post on programming and programmers having same results with different programs brings back memories. i went to high school in hawaii in the late 70’s and we had a mainframe and 2 courses for 2 languages, FORTRAN and assmebler. i took FORTRAN, the smart guys took assembler and we all did our programming on punchcards. woe to student who drop his stack of punch cards. it was almost better to re-type a new stack than to try resort them. there was a guy in the assembler class who was a kind of genius. there was a time he wrote a program in assembler for an assignment and his stack of cards was about less than an inch while others in the class had stacks that there 6+. when they turned in the assignment, the teacher look at his code and output (printed out of course) with this shocked look and said, oh, i guess you could do it like that! i would never have that kind of talent so i gave up programming and went the lawyer route. the logic is not quite the same but if you hum a few bars it rythmes.
cheers,
frank

REPLY: OMG, you indeed bring back memories. Programming with punch cards predates computers for all the programmers writing in. This all began by recording on a cylinder with protruding nobs that when it revolved, the code embossed on the cylinder corresponded to the notes of a song. This is how music would play as the cylinder revolved. This was the forerunner to punch cards used in early computers to input data and run a rudimentary program.

ibm-punchcard

This idea of a punch system was also widely used throughout the 20th century for controlling textile looms during the Industrial Revolution. However, the idea first emerged during the 1700s with a musical snuffbox called carillons à musique. By the late 19th and early 20th century, this system controlled fairground organs and related instruments.

Punched cards were used through most of the 20th century in what became known as the data processing industry – the use of unit recording machines organized into data processing systems for data input, processing, and storage. This was the logical extension of its use in music and repetitive machines during the Industrial Revolution. Early digital computers employed punched cards that were prepared using keypunch machines as the primary input medium for both computer programs and data.

Even former Chairman of the Federal Reserve, Alan Greenspan, wrote:

“As I wrote programs using punch cards in the 1970’s. I’d used this technique myself, writing programs on punch cards at Townsend-Greenspan. It’s never entered my mind that such programs, extensively patched, might still be in use at the end of the century, I never bothered to document the work.” 

Writing in Assember was cleaner and brief. It was difficult at first, but once you got the hang of it, it was faster than anything. I would write in BASIC back then, compile it to Assembler, and then optimize it to run as fast as possible. The programmers on staff today still marvel at an old DOS program I wrote, which runs in 640K, yet it swaps out sections of memory back and forth to maximize its use of memory, and it is still faster than anything written with today’s languages. That is all because the routines were in Assembler.

No comments:

Post a Comment