>Do you remember your first program?

>The other day we were sitting at lunch reminiscing about how we got started in programming. Every person present had a different story. Here is the story of my first program.

It was the mid-seventies, also known as the Jurasic era of computing, and I was in college taking a physics class. I needed science courses for my future B.S. (Bachelors of Science) degree, so I took physics because I wanted to avoid chemistry. In the physics class we did occsional labs and our professor wanted us to write a computer program to process lab results.

Just to set the stage for the computing technology at the time remember there were no PCs. I had just gotten my first calculator, wich cost $40, not a small sum in the 70s. The calculator had a red LED display and only provided four operations: +, -, * and /. No square root. In fact I learned to use Newton’s method to extract square roots by hand. Mind you, my physics professor could do computations and estimates in his head faster than I could type them on my calculator.

In any case after one of the labs, he wrote some gibbrish on the board (starting with “//JOB “) and told us to get some punch cards, and go to the computing center and write and run a program. The program in question was to read seven numbers from its input and print the average. The programming language we were to use was called FORTRAN.

Step one was to buy blank punch cards at the college book store. They were sold in batches of 100. The I had to find the compuer center with the keypunch machines. A kepunch machine was a desk size thing with a typewriter keyboard and an elaborate mechanism for feeding in blank cards. Each letter you typed was encoded in a column of what seem like random holes in the card. If your particular machine had decent printing ribbon in place the character was also shown on the top. The funny thing was that it was hard to see what it was you were typing, so it was easy to make a mistake. Of course, you couldn’t fix the card – can’t fill in the holes – so a card was wasted and you had to start over.

Once you keypunched you program and the magical control cards that went in front of it, you brought your deck to the RJE – Remote Job Entry – station and handed your card deck though a window to a student employed at the computer center to be read in. He or she would do it immediately and hand you your deck back. The computer would attempt to run job later. The output, a folded print out, would be put on some shelves when it eventually came out.

Nobody told me that if you make a mistake in the control cards (JCL JOB card for you old timers) no output will be generated. So after having my deck read in I hanged out around the computer center wating for results. When nothig came out after what seemed like a reasonable time, I asked for help from one of the local “hackers”. He quickly identified my JCL error and told me how to fix it.

This eventually worked and I got my first program to run and print out a weird looking answer (things like: 000102E02 or some such).

So, what was your first program?

Advertisements

4 thoughts on “>Do you remember your first program?

  1. >While I didn’t have the pleasure of computing in the ’70s, I did get a start in the early ’80s. My first program was on a Sinclair ZX80. It had a chicklet keyboard and 1K of RAM — went for about $100 in the early ’80s (which was not bad http://en.wikipedia.org/wiki/Sinclair_ZX80). I wrote a program to roll dice and got output that looked something like (5,2). Somehow I expected to see dice “rolling” across the screen. It was the first (but not the last) time my code didn’t do what I expected.

  2. >It was my SECOND hack that got me hooked on programming: a trivial bit of file surgery on a very advanced little system called BASIC/4.Because I was new and the job was simple, I was asked to write a loop to reset a flag variable for all the records in a file. First program, no bugs, no sweat.Next task: find a bunch of records in a range of keys, and set their flags to another value. So I learned to do an indexed read, check the key value, set the variable, and loop; simple.Nothing in my prior life’s experience had prepared me for the fact that the key values I was checking were coming from the next-key-pointer, not the record I had just read.It was the first of many wrinkles ironed into my cortex by silicon, this one called ‘off-by-one’.

  3. >I was in high school when Radioshack came out with the first TRS-80 model (lovingly called the Trash 80).I wrote an analogue to the Mastermind game, in TRS-80 Basic.Of course, I didn’t have the $$ to buy one, so I would stand for hours at the local RS store, entering the code using the built-in line editor (full screen editors were not even a concept yet for micros).Ah, good times….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s