Excerpt from
“Notes on Postmodern Programming”

I’ve wanted to cite this passage a few times now, but I can only find the essay in PDF form. So I’m just going to put the passage here, so I can point back to it in the future.

Geeks, if people regularly joke that they couldn’t understand what you do for a living, consider pointing them to this description of the process of writing a program to accomplish a specific task. There’s a lot of debate on Lambda the Ultimate about whether the authors are joking. For the record, I don’t think they are, but that doesn’t mean they aren’t intentionally being funny.

From Notes on Postmodern Programming
James Noble, Robert Biddle
Computer Science, Victoria University of Wellington, New Zealand.
{robert,kjx} @mcs.vuw.ac.nz

A First Example of Scrap-Heap System Construction

In the section “No Metaphor ” we will have stressed that postmodernism has a past, and that this past is reflected in both the structure of the discipline and the practice of programming. In particular, this past exists as a large number of existing programs that the postmodern programmer can scavenge through and reuse.

Instead of presenting (as a ready-made product) what we would call a scrap-heap program, we are going to describe in detail the process of creating such a program. We do this because many programs are just there: they do not have to be made, and the kind of programs we are particularly interested in are those which we feel to be comfortably outside our powers of construction and conception.

The task is to instruct a computer to print a table of the first thousand prime numbers, 2 being considered the first prime number.

To write this program, we first connected our computer to the Internet, downloaded some music from Napster, and then read our email. (You have to receive email to perform a workday [11]). We received 25 pieces of email of which 16 were advertisements for Internet pornography, administrivia, or invitations to invest in Nigerian currency trades. After dealing with this email, we typed “calculate prime numbers” into Google. This found several web sites regarding prime numbers, and some more pornography. After a while, we were interrupted, and so moved on to the prime number web sites. In particular, http://www.2357.a-tu.net includes the “ALGOMATH” C library for calculating prime numbers; another site included an EXCEL macro which was to complex to understand. Although we had not programmed in C for years, after downloading and compiling the library (by typing make), we noticed the documentation included the following program:

int *pointer , c=0; 
if((pointer = am_primes_array(4, 3)) == NULL) 
  printf("not enough memory\n"); 
while( *(pointer+c)){ 

We cut and pasted this program into a file and compiled it several times, having to add a few extra lines (e.g. main () {). Eventually we ran it, and indeed it appeared to generate three prime numbers larger than four. We edited the parameters to am_primes_array to (2,1000), and then ran the output through wc -l to check that it had printed 1000 numbers.

Here we have completed what we announced at the beginning of this section, viz. “to describe in very great detail the composition process of such a [postmodern] program”.

[11] Patrick Chan and Carleton Egremont III. Mr Bunny’s Internet Startup game. Addison-Wesley, 2000.