On Programming: Getting It Right The First Timein col

In my previous post, On Programming and David Corbin’s Challenge: “I defy anyone to pick a hardware platform, and programming language; then provide a small (one page) sample of code, and be able to COMPLETELY describe what happens when the code executes.”, I said of my time-wasting FORTRAN program:

10 GOTO 10

that “The program ran correctly the first time.”

This was my second such program.

Some months earlier, during a discussion about great programming feats during an afternoon tea on the 13th floor of NYU’s Courant Institute of Mathematical Sciences (CIMS), someone mentioned the best coding feat they had ever seen was the work of a graduate student at Cornell. Working solely from the hardware reference manual the student wrote a program of about 5000 lines of assembly language that ran correctly the first time. [1]

Realizing I had never accomplished this feat, I then went down to the computer center and entered the following program using just three punch cards:


It ran correctly the first time.

I boasted of my prowess at tea the next day.

This program, like Seinfeld, is about nothing. It does nothing in a miniscule fraction of the time needed to view any episode of Seinfeld. [2]

By the way, I wrote this program before the time-waster.

I wrote both these programs in the late 60’s, and so believe them to be the oldest known programs that meet Corbin’s challenge.


1. Almost all buildings in New York City have no thirteenth floor. CIMS is housed in Warren Weaver Hall. WWH has a thirteenth floor. No mathematician would tolerate its omission.

2. My son Michael is a big fan of Seinfeld. Daughter Jen prefers Friends. I bought her a complete set of episodes, sending her one or two DVD’s each final exam period during her last few semesters at Yale.

One Comment

  1. Posted May 4, 2009 at 14:31 | Permalink | Reply

    He says “one page” but doesn’t specify the page size. If he can’t even specify the problem completely, how can we design and implement a sufficient solution? Short pieces of portable C that use constants and numerical operations and no input or output might optimize down to a page, but few optimizers remove the cramming of arguments onto the stack, opening STDIN and STDOUT, and then closing it all down and cleaning it up afterward when your own contribution is complete.

    I worked on linkers and loaders for a time (I never got too deep into compilers, although I started porting a JVM once) and I tell ya, there’s a lot going on in that stub that runs before your own C gets going. I had to debug the darned thing more than once. In those days, depending on flags, we allocated segments all over the place, set up big tables of pointers and more.

    The last time I wrote anything that fit within a memory page, it was with assembly, or maybe Forth. And I wrote it with pitch from spent torches we used to see the cave walls and the hulking mass of the DEC 10 in the data center. There’s no modern language that doesn’t have a library so massive that yet fits into one’s complete understanding of each underlying operation… which I think was Corbin’s point.

One Trackback

  1. […] Comments On Programming: Gett… on On Programming and David Corbi…On Programming and D… on On Programming: Compiler […]

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 )

Connecting to %s

  • Pages

  • May 2009
    M T W T F S S
  • RSS The Wayward Word Press

  • Recent Comments

    daveshields on SPITBOL for OSX is now av…
    Russ Urquhart on SPITBOL for OSX is now av…
    Sahana’s Respo… on A brief history of Sahana by S…
    Sahana’s Respo… on A brief history of Sahana by S…
    James Murray on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated

  • %d bloggers like this: